Tuesday, September 29, 2009

GAE + Django = Godlike

Imagine you are given tools and the platform simultaeneously to show off your talents and everything at free( as in free beer ;) ) of cost. Wouldn't you start right away!!!.
The tool here is Django and the platform is GAE - Google App Engine.

I first time I heard the name Django was in a blog post. Though at that time, I didn't know the beauty of philosophy behind Django, the excitement to try something in the web building domain pushed me to go for it. Adding to my excitement was the fact that Django was implemented in Python. The next moment, I installed Django and started reading Django-docs. Since this was the first time I tried something on web building, I got stuck at a point and couldn't proceed further. But I still had the dream of designing a very small website or at least a web page. Luckily, I was able to attend a talk on Django at PyCon India 2009 and got the solution for my problem.

On the same day, my friend suggested me "google app engine", when I told him I was interested in Django. Though the name says its a Google project, I had no clue what it was. It was then lost in the jargon of my "to do" ideas I got after attending PyCon.

The excitement of continuing Django from the point where I left it got to me on the day on PyCon itself, after attending the talk on Django. I started reding Django, now from an e-book. After reading it for 3-4 hrs, I was totally lost and had no clue what was going on. I googled for a good book on Django and found the awesomest source for Django tutorial, The Django Book. As I started reading, I not only found the book very easy to learn, but also very clear on the concepts. The whole book can be finished in a quarter of a day even by an intermediate python programmer if he has a fairly good knowledge of HTML. The greatness here is not of the book but of the framework. The design was so thought of and researched to fit every need that, you will start appreciating it after the first hour of reading itself. Django follows the DRY-Do not Repeat Yourself principle and adheres to it in every possible way. I got some very simple ideas and decided to implement them. Wait!!! What if I had a chance to host it. Then suddenly it stuck to my mind that I had a new topic to read about, GAE.

I googled and started off with installing and getting started. GAE is a platform with which you can host your website on the google architecture and monitor it. GAE supports website backends in two languages viz., Python and Java. GAE itself ships with an appengine, a framework. But it also supports any any WSGI-compliant framework. Hence, it also supports Django and I am already starting to hit the limits of my imagination on the possibilities using them.

GAE also supports many frameworks like CherryPy, Pylons, and web.py. There is a debate on whether to use Django or appengine framework. Here are a few links that help you decide http://aralbalkan.com/1348.

I am going with Django because it is simply too good.

Saturday, September 26, 2009

PyCon India 2009 - Day 1

I came all the way without staying at my home town even skipping Dusshera celebrations to attend PyCon.
So you can understand how excited I was.
The day before the event..
I went thro' the list of presentations and wanted to be ready with all the software incase I suddenly feel like coding sometime during the event.
So I got the py3.1( since some talks needed py3.x ) source and went to sleep early since I didnt want to miss the keynote which was the first talk the next day.

The day of event ( Today )
I was expecting BOF tents ( even brought my laptop with charger and spike !!! along ) and stalls as was the case for FOSS.IN 2008 but didnt find any.
My first opinion about the organization was, it is good ( looking at the registration and stuff ).

The first presentation was the keynote, 'My Adventures with Python' by Prabhu Ramachandran.
I have already seen a video of the talk he gave at scipy conference and felt he is simply too excellent at giving presentations. His voice, body language, presentation slides evetything are simply awesome.

He talked about his relationship with python and the areas of using python( almost everywhere ).
Then he talked about 3d simulations in python and how Mayavi came into existence.
The presentation in overall was so nice that every other talk after that seemed dull.

Then there were many talks that ran in parallel and here is an overview of the talks I attended.

After the keynote, I attended the talk on network security tools using python.
This one discussed briefly about pypcap,dpkt and scapy.
I wasnt much interested in the first place and even the talk wasnt so gr8.

The next talk I attended was on algorithms in python and it was about the merge sort, bubble sort and stuff.

Then the next talk was about Design Patterns in python which I was really looking forward to.
The content of the talk was a little advanced and required much more detailed explanation and cleaner examples. But the presentation wasnt so gr8 but I got links to a few resources that are useful to get a better knowledge of design patterns.

The next talk was on Idiomatic Python.
Though I have already read about Idioms in python, I attended the talk.
The guy who gave the talk was some college student in his final year.
The presentation was excellent. He precisely knew what he was talking about.

The last talk was on Django.
There were some three guys giving the talk and even this one was awesome.
I got few doubts on Django cleared and decided to develop applications using django.

The day 1 went on pretty well.
Now looking at the schedule for day 2, I dont see any interesting talks,
There were a few proposed talks on python for mobile app development and stuff.
Dunno why they have been cancelled.

The PyCon India 2009 conference is good.
The talks were also decent enough considering this is the first PyCon in india.

Looking forward to many more talks and a much more better PyCon in 2010.

Monday, September 7, 2009

Python OOP tutorial - made simple

This is my third post and I actually thought of writing a tutorial on python.
But I see a lot of tutorials on python on the web at various levels of detail.
Here are a few for a newbie.

A Byte of Python
Python website
Python in 100 session lines

Now Python is an OO language.
For someone new to concept of OOP, the above tutorials are a little confusing
Here is a great tutorial that explains the concept of OOP and how it is done in python.
Introduction to classes

Saturday, August 22, 2009

When I first saw python

I wrote the "Hello World" program in perl and showed it to voodoo. He showed similar hello world program in python. I already heard of python once from punch. But I was happy with perl at that time and so didnt bother much about it. The next day at office was not the way I expected. Things were not moving as fast as expected with my perl and so my firend and colleague asim( who was a pythonista by then ) suggested python.

I thought "another language!!!". asim suggested me "A Byte of Python" by "Swaroop Kumar C H". As I started reading, "The interpreter is nice" and then "hey the variables are friendly" and after a while, "this language is awesome". But I wasn't comfortable with the indentation. Now after telling a few people about this feature, I understand why I felt that way. Now after using python for more than a year, I understand how useful this feature is for maintaining code.

And that was how python became my favourite language.

Friday, August 21, 2009

My first programming language

I was doing my ps2 at TSae,Bangalore. It was my 5th day. My project manager Sateesh gave me a brief introduction about the project and assigned my job. He was a gr8 man wid lots of patience. I told him I am totally new to software development and all i know is doing some basic math in C. He suggested me to learn Perl first and then he would guide me accordingly.

I started with the book "Teach yourself perl 5 in 21 days". As I went through, I thought "These variables are gr8, they can store strings, numbers, anything ( except for $ sign before every variable )" and then "these RegEx are fun ( If exceptions are taken care )" and

Recently when I was learning perl properly for regular use, I came across this in some book that describes perl in one line. It said "Perl is all about thinking like Larry". Larry is the creator of perl.

Usually perl code is very small and a lil cryptic, it can be fun for programmers and nightmare for debuggers.

Finally the language is awesome ( except for exceptions ) :P .

Thanks buddies

Thanks a lot punch and nine for your brilliant idea LaThCoRe.

If not for lathcore, I would have totally forgotten that I had a blog and was suppose to update it.
Anyways the moment I heard about this project, I had hell a lot of ideas to brag about.
I could not sort them out( actually lazy ) and so din bother much.

today after chatting with punch, I've decided to blog something and then it struck to me that sometime back I wanted to create a blog about python. Here's my chance and hence this blog.