November 28, 2008 at 17:26 Tags Internet , Python

This blog runs on Wordpress, and I'm quite happy with it. It's simple to configure and use, is very well supported and the huge amount of plugins and extensions make every wish come true almost automatically. When we had to open a trave log , I didn't think twice before using Wordpress for that too. Regardless of the general theme of this post, I'm thankful for Wordpress, and do think that its developers and maintainers deserve kudos on creating such a great piece of software, for free. Wordpress is implemented in PHP, like most popular web applications. In the world of (open-source) web applications, PHP is a 500-ton train sweeping everything else aside. Do you need a CMS ? No problem, have Drupal or Joomla. A photo-album ? There's Coppermine (which I'm also using for our online photo album ). Need a forum ? Everyone knows that phpBB rulez. And some of the big competitors, like punBB and Invision are also written in PHP. There are literally truckloads of articles online explaining the popularity of PHP, so I won't just drop another leaf into it. Rather, I just want to express an opinion that it's a damn shame that this is the situation, because PHP is a bad language that encourages bad programming practice, which makes tinkering with large PHP painful. I'm a natural tinkerer, and my Wordpress blog is self-customized in several minor ways. I've also customized some of the plugins I use for my special needs. I can't describe the disgust and horror I sometimes experience when fixing or changing something in Wordpress's PHP code. So much things are global - the variables, the hooks, the functions. Even after PHP added OOP, most code doesn't use it, or only uses it in a very rudimentary way as module-like wrappers. PHP is probably an ideal language for applications to which many sub-competent hackers add code. It has almost no "accepted style" and people place no limits on what they do. This is a real shame. I firmly believe that Python is a superior language to PHP. In all domains except web programming it's also much more popular, so I'm really saddened by the lack of competition to PHP web apps from Python's side. There's absolutely nothing in Python that makes it less suitable for web applications than PHP - it's simply a matter of custom. Therefore, I think it would be really great if at least one of the big-gun web apps was written in Python. Maybe a competitor to Wordpress, or a forum software. I, for once, would be delighted to use it once it's stable enough. And it shouldn't be too hard, either. All it would take is a single dedicated and talented Python hacker, perhaps in a setting like the Google Summer of Code . Take Wordpress for instance. It weighs less than 30 KLOC of PHP code. Even assuming that PHP-Python translation is 1-to-1, brushing some of the more advanced features aside the Python replacement could easily be written in a summer. At first, it can mimic the Wordpress architecture to make the transition easier. Then, once the project gains users and momentum, the code can be slowly and surely refactored to bring more good Python practices in. I hope someone will start such an endeavor. Perhaps the Django team could offer it as a GSoC project for a Wordpress replacement using Django (which would surely shave lots of code, as WP itself is written in pure PHP w/o any framework beneath).