python

Why Python? The short answer is because I know it and I know I’m fast with it.

I’ve been developing in Python for about eight years, prior to Python I coded in Basic, Pascal, Fortran, C, Tcl, Expect, C++, Java, and Perl; so I’ve seen a few things. I settled on Python because my employer at the time used it, I continue to use it because I’ve not found another language in which I generally can get so much done in short periods of time. Part of it is the expressive syntax, and part of it is all the built-in libraries. I adore the significance of indentation, which almost forces one to write readable code. Python is the only language I’ve used where it is easy to figure out what you (or even someone else) meant by reading the code at a later time.

Python is expressive and efficient. It doesn’t take a lot of typing to get things done. slideboxx has an http server builtin, it talks to the frontend over http using XML and JSON, it also talks to the frontend using sockets, it stores some information in a relation database, it interacts with an indexing library, and controls PowerPoint using COM automation. slideboxx has a lot going on — all the bits you need for any Rich Internet Application (RIA, for short). The source code for slideboxx is less than 4000 lines of Python, and I don’t use a lot of tricks to make the code compact, I keep it simple so it’s easy to maintain. With some refactoring I could trim the LOC count.

Python includes a number of high-quality libraries built-in. As of Python 2.5 sqlite and ElementTree are there — a great embeded relational database and a nice simple way of dealing with XML. slideboxx is not computationally intensive so speed is not a huge concern. If it were, we’d rewrite the slow parts in C.

Now all this Python love doesn’t mean it’s right for you. I looked at using this project as a way to teach myself Ruby, but I knew that for me Python would be faster and could do everything. I’m hoping to do a Ruby project soon!

I believe in Python. I hope if you get a chance, you’ll give it a try on a future project!


About this entry