Programming Languages

A few years ago I got into Python on some rainy weekend and thought I found Zion.

I found it a much better experience than Perl. I got onto Perl in the first place thanks to the guys like Leon, Mark and Magnus from the Bath PM. That’s when I was studying at Bath University. Ancient history.

The reason I was put off Perl is that I couldn’t maintain a program to calculate Maximal Frequent Sequences.
I couldn’t get my head around the Perl code, although I understood the pseudo-code in the papers.

Ok, “The bad workman always blames his tools” I hear you cry, but I did roughly implement the algorithm in shell. It wasn’t perfect, but it was something. I did try Python at this stage, but I found it too slow compared to shell for the very large datasets I was dealing with.

So I am using Python and I am caught up in the hype of it all. I write everything in Python. Web applications are written in Python and various scripts.

I learnt object orientated programming and even re-wrote procedural code into objects. OMG, what was I thinking…

At the height of my delusion, I’m even converting some of my shell scripts into Python scripts. I fealt guilty using bash. Bash didn’t have the X factor.

Though problems time and time again kept on arising for me with Python as a Web applications language. The Python CGI module is really limited. It’s slow too. I did have a look at mod_python but I had awful troubles just getting simple code working.

Time passes and I meet some talented people like Kai-Peter and Aki who use the shell to get similar jobs done. Too slow and they write it in C. Simple. Ok, there is a Python C API, but I had no joy with it. Anyway, I’ve never found shell too slow!

Some people moan that shell code is unreadable. I came back to some of my old Python code and couldn’t understand it. Honest. At least with shell you stare at one line instead of paging about your buffer or files.

So now I am using Bash to write my scripts. My system glue. Whatever. I get the job done with shell.

As for writing Web applications. Python simply doesn’t cut it. There was some Web-SIG but nothing came out of it. I tried these trendy Model View Controller frameworks with Nevow but again I didn’t get very far. Omg, Zope. I hate templating languages, especially those that force me to use something like XML. Nowadays you need to write HTML carefully yourself. I used htmltmpl in my own projects, but I hated it how it needed write permissions for the compile HTML file and the programming seperation. I don’t mind mixing logic and HTML. Problems only generally arise when HTML code sucks.

Anyway to cut a long story short the Web application language winner is… PHP.

Sorry, I’ve ignored this language for too long. When you have amazing examples like MediaWiki, Wordpress and Voidwars shining on you, you’ve really got to see the light. Voidwars?! Yeah, some my other friends from Bath University like Tom, Allan, Ian and Damian implemented their Web application game in PHP years ago and I almost scorned them. :)

PHP is fast. Some people say that PHP has awful security problems. You’re right, but almost any Web application I’ve come across does too. PHP has a ton of features to make Web things trivial.

So there you have it. My tool choice is either Bash for UNIX work or PHP for Web applications. It’s not for everybody or every application, but for me and my interests it does the job and quickly.


If you like this, you might like the stateless Web kiosk software I develop. Webconverger typically replaces Windows on PCs and is deployed in public and business environments for ease of deployment and privacy. Once installed it auto-updates making it painless to maintain. Try it where you exclusively use the only viable open platform... the Web!