Confirming everything that’s ever been said about Python
Sean Lynch | July 16, 2008As mentioned earlier, I’ve been working on a medium-scale project written in Python. It’s the first time I’ve used python beyond a few lines in a script. After a few weeks of working in Python I returned to an application I had been developing for the Mac in Objective-C over the weekend. It wasn’t until I made the switch back to a “traditional” static typing language that the sheer beauty of Python struck in full force.
It’s really not fair to pick on Objective-C here. A number of languages could sit in its place. Nonetheless, after working with Python for only two weeks, coding in Objective-C felt like being stuck in the middle of a traffic jam where all the other cars are driven by lobotomized chimps.
Every one of my intentions had to be slowly and laboriously explained in great detail to the computer lest I cause a massive digital pile up. To avoid, I was required to take several trips to Apple’s mediocre documentation before I assembled enough square brackets to build the Eiffel Tower. Even once the appropriate method was called, trying to break down the over-abstracted object return types to get the simple data I wanted resulted in so many code-compile-crash loops it hurt.
I wondered how much of my life I had already wasted prefixing all the class names with “NS”, or how many more times I would have to chase down some archaic memory error only to find that I had forgot to put a @ before my string.
Don’t get me started on strings in Objective-C either. I don’t know how the language designers at Apple can respect themselves when it takes almost 50 characters to do a replace (Actual Method Signature: stringByReplacingOccurrencesOfString:withString:), oh and you have to give up backwards compatibility with 10.4 if you want to use it.
This only showed me just how much I loved Python. String slicing. Unicode strings. Dictionaries and Lists everywhere. Generator Functions. List comprehension and filters. Easy to understand/parse syntax. Lots of Third-party modules. With simple APIs. That are open-source. And are actively maintained. Mature. And well documented.
I found myself writing far less code and accomplishing much more. In fact, I distinctly remember feeling excited about just how much functionality I had accomplished in such little time (Django is partly to blame for this).
I has used Ruby a reasonable amount before, but I didn’t fall head over heals largely because of the lack of maturity. The maturity of the documentation of both the core library and third-party modules is one of the most important features of a language for me, and something I missed tremendously coming from a Java background. In fact, I’ve re-written the ruby script that powered my Pitchfork Reviews gadget to be Python. It took me about 30 minutes.
I’m in love.
I fell in python/django about two years ago...I started a
Darb | July 16, 2008I fell in python/django about two years ago…I started a custom project and looked if I could build it on an existing web cms like joomla, drupal, etc. ended up with the decision to use a framework (they were buzzing all over), and finally decided to learn a new language, so I settled on RoR. I struggled for over a month to grasp how I could get what I wanted done. A friend pointed out Django, so I decided to dedicate a weekend to exploring it (I had been itching to try python for a while). One weekend later I had caught up the work I had done in rails, and shot off on a productivity binge.
We recently started using Redmine for our SCM (source code management?) which is a RoR app. We needed some customizations, and I decided to dive in and do them. Shew but RoR makes Django/python look and feel easy.
Hey Sean, you just described my recent experience as well.
Nathan | July 16, 2008Hey Sean, you just described my recent experience as well. Python+Django is a refreshing cool breeze. Now if only more hosting companies would get with the program and explicitly support it.
[...] hadn’t even finished writing my post announcing my new
Gripe: XML in Python — CS and the City | July 18, 2008[...] hadn’t even finished writing my post announcing my new love of Python when I stumbled into one of its skeleton-filled closets: [...]
*facepalm* PS - The label/input layout of your comment form confused
Brad | July 18, 2008*facepalm*
PS – The label/input layout of your comment form confused me.