Possibility and Probability

Coding Python and making businesses…

16 November 2004

A year (almost) of Python

by Nick

Well, it was almost a year ago (mid December I think) when I got my first Python book and started to really seriously work with it. In the time since I think I’ve come a long way in my understanding of the language/platform. I still think Python is the greatest thing since sliced bread. The readability factor alone is worth the price of admission to me. Due to other commitments (i.e. real life) I’m some times forced to put down my python projects for a few weeks at a time. But once I get back to them, I’m usually able to pretty much pick up where I left off. I’ve never been able to do this in C/C++, and its only been in the last year or two that I’ve been able to do this with Java. Obviously, part of this is due to my programming habits (good naming conventions, comments, etc.).  But I think a lot of it is due to how python makes you think: how it allows one to write object-oriented code, but still break free from OO idoms when necessary. For example, I’ve spent a lot of time reading up on and subsequently implementing a state machine in python. With python it was a snap to do (a benefit of dynamic languages). More importantly, it was easy to change things around to experiment and tinker. Trying to do this in other languages would have been much more challenging. In fact looking over some old code it looks like I’ve tried to do state machines in C and Java. Neither one of them turned out like I wanted them to. I think part of that was the implementation curve that was necessary for those languages. Python on the other hand, was more inviting, more open. It allowed me to get in there and quickly try things out. To me, that’s really important. I’m really into the little RPG game I’m building, but sometimes I only have 10 to 20 minutes of free time to work on it. I know, poor pitiful me. The ability to get in there and over the course of 3 or 4 of these little sessions and make huge architectural changes is big. Especially when everything works like you want it to when you are done. ;)

Wrapping up

But this little blurb is not to say that python is perfect; there’s a lot of areas where I think it could stand to be improved. (tools, packaging of executables, etc.) If python is the future of programming then I think we have a very sunny future ahead of us.