Friday, December 23, 2005

'Why Python?' revisited

I've just read this pretty good post by Ben Bangert. It's a welcome respite from all the 'ruby's soooooooo great!!!' posts and books that have kept popping up everywhere recently.

Don't get me wrong - I like Ruby. Its a dynamically typed language and dynamic rulz! ;-) I would much rather use Ruby or Python than Java/C#/C++ for general purpose programming. Its great that Ruby has a framework that has pushed it into the limelight. If you're comparing Rails to programming in the various Java web frameworks or ASP.NET, its a walk-over; you've got a massive productivity win, irrespective of IDE support.

But when using Rails to compare Ruby with Python, its helpful to remember that Python already has pretty good web/internet-based frameworks: e.g., Zope and Twisted are well established; others like TurboGears, Django, and Webware are newer but show the extent to which python has been successfully applied in this domain. Each of these is pretty good, they have a different approach to building web applications, but this diversity is good. Some of these (e.g., Zope, Twisted) are much more than mere web application servers, and attempting to evaluate them on how easy it is to build and deploy a simple db-driven website would be a mistake.

In addition to web frameworks, python has interfaces to useful third-party APIs (e.g., PyGame, wxPython), time/money saving products (e.g., reportlab, trac) and unparalled support amongst dynamic languages IMHO for being used a wrapper over existing C++/C code, thanks to the like of Pyrex, Boost.Python, and SWIG. The latter has both Ruby and Python bindings

As Ben points out, Python is used in lots of places. One of these is Google who 'have used Python right from the beginning' and have just employed the BDFL. Many of these places use Python, not because it lets them write web apps quickly, but because in a large code base, Python's clear syntax leads to enhanced productivity and benefits long-term maintenance. The maxim

" Code is more often read than it is written"

becomes more important. For me, Python just about (!) edges Ruby on that one, although I'm open to being proved wrong.

Wednesday, December 14, 2005

Google Firefox extensions

A new Google labs project has produced a firefox extension that adds Google Suggest functionality to Firefox.

There have been other extensions that have upgraded Gmail functionality in FF e.g., Gmail manager, but AFAIK this is the first time that an official one as been released by Google.


Sunday, December 04, 2005

Why Ruby is an acceptable LISP

This article argues that Ruby has the power of LISP's lamda's and macros and may be a better choice overall due to the availability of developers and quality of its libraries.

This article poses a very interesting idea - the article itself and the comments it attracted are well worth reading - but I doubt that the idea is correct. Still, it is interesting to hear this from an avowed Lisper who has recently become an avowed Rubist.

The main problem with the article is that its starting premise, that 'all there is to Lisp is functional density and macros' is wrong. I would expand a bit more on this, but don't need to - the various commentators (e.g, here) and here) do this very well.


read more | digg story

Continuous Integration with Buildbot

Continous Integration is a software engineering term describing a process that completely rebuilds and tests an application frequently. Cruise control is one of the more popular ones. it is written in java, and boasts tight integration with java tools like Ant. Buildbot by Brian Warner is a continuous integration server built from Python and Twisted.

Funnily, although Buildbot is a mature CI server with unique advanced features, it does not often get mentioned in traditional XP/Agile circles. E.g, this feature matrix at the Damage Control website merely leaves a question mark on most entries for Buildbot. This is likely to be because a lot of the momentum in XP community has been on "Enterprise" application development projects that tend to use Java and C#, so continuous integration servers written in those languages have been more prominent. In this respect, Damage Control itself is another interesting CI server - it is written in Ruby, so is probably worth another post on this blog (Dynamic languages rule!).

Despite the current lack of awareness about BuildBot, nevertheless it is quite popular in the FOSS world. As this google search shows, a lot of FOSS projects use it to continuously integrate their source code. A key distinguishing feature of BuildBot is that is designed from scratch to be a distributed build tool.

Buildbot consists of a single buildmaster and one or more buildslaves, connected in a star topology. The buildmaster makes all decisions about what and when to build. It sends commands to be run on the build slaves, which simply execute the commands and return the results.

This means is that Buildbot can be configured to simultanously perform different builds on completely different machine configurations in response to commits in the source code repository or at user request. This feature makes BuildBot uniquely useful in multi-platform build scenarios.

Another nice feature that I've not seen on other CI servers: BuildBot learns how long each build takes - so that when new builds are triggered, it lets you know how long there is to go before the build completes.

If these are not enough to whet the appetite, BuildBot has a feature that allows developers to see what would happen with if they checked in their source trees prior to commiting them. What use is that? If full pre-commit builds take a long time on single developer machine, as is often the case if one has extensive unit/functional test suites or needs to test these on multiple deployment configurations, they can be delegated to a cluster of build slaves!

Find out more from http://buildbot.sourceforge.net

Run Python Scripts on Your Nokia Smartphone

While Java and Symbian C++ are powerful programming languages, their learning curves are too steep for most smartphone users. Most users do not need a full-blown programming platform to develop small hacks for their phone, here is a good example of that.

read more | digg story

TurboGears RAD web framework, written in Python with AJAX

TurboGears is an amalgam of four powerful web packages: MochiKit for Javascript, Kid for templating (like TAM crossed with XSLT without the complexity), CherryPy for app logic, and SQLObject (an ORM library) for easy database access. The creator has put together a nice video tutorial where he creates a wiki application in 20 minutes.

read more | digg story