So, having spent most of my blog time on modeling, process and SOA I'd like to depart at least for now into something different. I have been coding up some samples, examples and experiments over the past few months and decided that given the productivity requirements and costs I decided to leverage a dynamic language rather than the almost ubiquitous Java here at IBM. My language of choice is Python, and I have a long history using it on a number of platforms, though most interestingly I contributed the changes to get Python 1.0.2 working on OS/2 2.x (I even found the email in the Python archives, Re: Python and OS/2 2.x, dated 2nd June 1994). As usual I got started quickly and just kept going using Python then wxPython to develop the application UI and a number of other packages - now this is not to say that I could not have found equivalent packages for Java but even though it has been my primary language now for some time I am just more productive in Python.
But why? Is there something inherent in the language - unlikely it's not radically different to any other; the dynamic nature is certainly an advantage over Java, with meta-programming and the exec() function, but is that all there is to it? After all in 1994 Python, like Perl, was considered a "scripting" language, a term the language theorists say with a sneer. But whatever it is there seems to be a resurgence of dynamic languages and not just Python but of course Ruby and others are really taking on the "serious" languages. But why does it feel simpler? after all there's no fewer language features, in fact Python supports both OO and functional styles, has some really unique features, but still it feels simple. In my opinion a lot of this is not the language itself but the way the language is used, for example in Python if I want to open a database I open the database; in Java I have to use a JNDI factory to get a connection to get a name for a class which is a factory to obtain an instance of a JDBC connection that is abstracting the database as much as possible... It seems that we have layered on top of Java a whole set of patterns, practices and idioms that have become embedded in the libraries we use and therefore become required in using almost any Java API.
But isn't abstraction good? shouldn't the language do it's best to build APIs that allow us to plug in different implementations of things? Well yes, but to a point. It is clear that the use of PHP is growing across the web, the use of Pythonis growing in many places including the web with the Washington Post powering sections of their site with the Django web framework (much like Ruby on Rails, see here) and in desktop applications such as Chandler. Larry Wall is quoted as saying that the principle virtues of a programmer are Laziness, Impatience and Hubris, and I find that dynamic languages play to my laziness (well stocked library), impatience (no compile, so edit and run) and hubirs (I look smarter, faster). Interestingly most Java developers use an IDE with Eclipse being very popular, and in many cases with the complexity of the code we develop they are indispensable, but in the world of dynamic languages there are far fewer tools used let alone required. Now, I do use Eclipse with a plug-in for Python development however only because it saves me having two tools open when I switch between projects, in many cases my tool of choice is vi -- and it work just fine (and it's small, simple and fast).
This has some bearing on an on-going activity here at IBM, an activity that has become known outside through blog postings by Sam Ruby. While I wont go into the background or details, here's a quote that has gotten around already.
Application development using IBM programming models and tools is untenably complex. The Research Division's new Services and Software strategy includes a strong focus on radical simplification. Radical simplification was one of the featured topics at Paul Horn's recent Vision Conference. Over 70 people in IBM worldwide are currently participating in an effort to define the problem, and the scope of the solution, more precisely. Our effort will lead to recommendations to emphasize, grow or refocus selected existing Research projects, to start new projects, and to undertake other initiatives to promote a culture of simplicity. This talk will discuss some of the insights we have gained so far into different perceptions of complexity, the nature of complexity in IBM software, why complexity is a high-priority problem for IBM, and some of the directions being pursued inside and outside IBM to deal with complexity
So, is there a message here? Obviously I have taken a personal message and will continue with my Python projects, but in a broader context I think we all have to learn that just because some software is large and complex and requires layers of abstraction to hide complex underlying infrastructure it doesn't mean that all projects require the additional overhead. By overhead, because I know that will upset some people, I mean not just larger libraries but simply cognitive, I have to know much more to get things done (and personally I have more interesting things to use my neurons for). In really looking at simplifying our middleware platforms we (IBM) have to consider developing offerings that allow people to use simple languages, the right level of abstraction and so forth to develop languages. For the simple prototype just give me a simple system, as the application gets more complex maybe I need more complexity in the libraries and code, but add only as needed.
I know this is a topic much discussed in a number of places, but hope we can have some interesting debate here on developerWorks.
- Python's home, wiki, advocacy
- Sam's Radical Simplification slides
- A recent developerWorks article on Django
- Or try a general search on developerWorks
- PyDev an Eclipse plug-in for Python development
Technorati: Python[Read More]