The Hyperpessimist

The grandest failure.

Ten Years of Python

When I check out the date I signed up at the Python-Forum, it says 20th of June, 2003. Whoa, that’s quite some time. Time for some retrospective, because Python got quite popular since then and maybe people are interested in how it was in the “early days”. Or well, earlier days.

The early days 2003-2007

Initially I started with Turbo Pascal and moved to Visual Basic 6. Visual Basic 6 used to have quite an awesome german-speaking community and since my english wasn’t that good some decade ago, I was doing my save game managers and stuff any high school student might do. Later I signed up for a programming course in school where we used Java. I got interested and bought Bruce Eckel’s Thinking in Java. If you check a footnote in the introduction, Bruce mentions Python. I remember this being the first time I heard about Python.

The first time I used Python was some time later, the polish edition of Chip ran a tutorial on Pygame. That was back then when the magazine was any good. I was quite impressed with how easy things were compared to the struggling I did with C++ (I still have one or two bad books on C++ on my shelf). Back then Python 2.2 was state of the art and I developed on Windows.

Needless to say that my game didn’t work out, I had no idea how to structure my code back then. The world missed out on a great Zelda clone with sprites borrowed from “Link’s Awakening”. Or not.

But I joined a web BBS and I learned a lot. At the beginning I was reading a lot of threads and answering questions. Usually this involved googling for answers, since the questions were often on the easy side. On the tricky topics, I read the responses of more experienced people in the BBS. I learned lots back then in very short time.

The Python landscape looked quite different back then. While Python 2.2 is certainly quite similar to the Python 2.7 we have today (minus decorators, list comprehensions were optional and generator expressions only came in 2.3), the ecosystem looked quite different. In 2003, nobody was speaking about the web very much. There was Zope and Plone but the programmers didn’t like it that much. Everybody else used CGI, which still exists today. Oh and there was a small fraction of Twisted users. Twisted, after all, invented the internet.

There was excitement in GUI frameworks, Qt 3 at that time and GTK+. GTK+ 2.x was in the process of obsoleting GTK+ 1.x and the binding required selecting which version to import. Much like GTK+ 3 is compatible to GTK+ 2, and Qt 4 is incompatible to Qt 3.

When Python 2.3 came out, many C modules were lacking Windows builds, so I started building stuff and publishing it and many people were happy. I’m not sure what the situation on Windows is, these days.

Community wise, there were many people complaining about significant whitespace in block indentation. As these discussions have mostly died down these days, I suppose that was uninformed bullshit by people who never tried. Also, dynamic typing was looked down upon from users holy-grail static typing languages like… Java. No interfaces, how could this possibly work?

The web years 2007-2010

I wouldn’t say 2007 is a hard break, as there was always some experimentation in using Python for the web. I, coming from PHP didn’t know better and experimented with Spyce which was a way to embed Python in HTML. There was also Karrigell which supported roughly the same thing as well as mod_python which could also run Python Server Pages (although it never really worked for me, I was expecting something like mod_php).

Then there was Webware, an application server. It was kind-of like the Java Enterprise Servers. Then the WSGI standard came along and Ian Bicking ported it to WSGI, dubbing it WSGIKit. Then it wasn’t good enough and Ian renamed it to Paste and after trying to explain it one, two, three, four times, probably everybody just moved on.

I think Paste was too ambitious at this time. Consider most people coming from a PHP background and WSGI went right over everybody’s head. Especially as Paste seemed to solve a problem that noone could see.

Roughly the same time, Colubrid surfaced, a WSGI helper library from Armin which made WSGI easier. Think of it as the spiritual predecessor of Werkzeug. If I remember correctly, Colubrid was used in Pocoo. Because in the beginning, Pocoo was meant to be a BBS to replace the phpBB used in the german Python forum. I think it died after the 0.1 release, possibly for being too ambitious and possibly for being too much ahead of its time. But Pocoo remained and became an umbrella organisation, kind of like Edgewall.

Hosting Python web code was terrible back then. I’d even say that classical PHP shared hosters never improved, they just got obsolete with the dedicated hosters that began surfacing.

Then Rails appeared. Let me rephrase: THEN RAILS APPEARED. If I were to pick one disruptive technology in the Python universe, I’d say Rails. After it got massively popular, a lot of Python frameworks inspired by Rails started appearing. And by a lot I mean a crazy lot: web.py (by Aaron Swartz), WebCore, Pylons, TurboGears, Grok (building on Zope 3), Repoze (kinda like Zope with WSGI), Paste, Aquarium, Nevmod Nevow, Snakelets, Django and a million others. At some point you saw a new framework every week and though “no, not yet another stupid ripoff”.

At the beginning, TurboGears looked like the most promising alternative, with a “best of breed”-approach on components. Unfortunately, Python didn’t really have decent components back then, so TurboGears was burning through template systems, ORMs and other small parts quite fast and the documentation was never up to date. Plus, it started having more and more dependencies.

On the other hand, Django seemed quite polished from the beginning. In the beginning there was no release so everybody ran the SVN version and even after they did releases, the pace of releases was too slow. But it worked, had great documentation and while not best of breed, it was Good Enough™. Plus, the strangest things were fixed before the 1.0 release (magic-removal, anyone?). The automatically generated admin was certainly the cherry on the pie and while many projects tried to mimick it, no decent alternative ever surfaced.

So yeah, we got Django. Good think that we converged on something.

The community years 2010-now

This is another semi-arbitrary division, but at some point, the web stuff was “solved”. These days, it is less about choosing the base technology but rather on integrating stuff and building things with Python.

I think we got vastly more Python programmers than a decade ago, using Python has become quite the no-brainer. A startup using Python these days? Hardly even worth mentioning. But the people using Python started to be more and more. When I started, there was a EuroPython (one of the organizers even asked me to do a talk but going to Sweden was not really financially possible for 16-year old me), but now PyCons appear in many countries. 2012 was the second PyCon DE and there were enough people attending to warrant another one. Also, there are Django conferences in Europe.

Apart from conferences, there are some user groups. I can only speak for Germany, where there are two or three larger user groups with regular meetings, but they are there and doing well. The Munich user group that started as a meeting of three people from the forum back in the Pocoo days still exists today and meetings are held every second week.

The position of Python has changed in the last 10 years. With Ubuntu making Python their lingua-franca (while Debian was more focussed on Perl) Python got some boost, but nowadays Python bindings are usually not just a bonus but more like a first-class feature. I can’t remember searching for some library and finding half-assed code or nothing at all. These days, software is written in Python from the get-go and if not there are bindings. The Raspberry Pi community has embraced Python. PyPI and setuptools/distribute have made it possible to reuse vast resources of code. Maybe not yet up to the variety of CPAN, but we’re getting there.

My personal involvement has lowered, though. In the beginning I rapidly became moderator and then co-administrator of the German forum (which also celebrated its 10th birthday 2012 on the PyCon DE with beers and obligatory cake), but studying has taken a lot of time and I often dabble in other technology where Python is not popular or even feasible.

Python on mobile phones is, well, “kinda” possible. Python in the browser is even less “kinda” possible. Systems programming is not a strong point of Python either. But don’t let that discourage you, for the rest it is hard to find any reason not to use Python. Maybe we are getting close to “nobody got fired for using Python”.

What changed? The indentation debates are basically dead and buried. The feasibility of using Python was demonstrated. Also, I believe many developers switched to Linux or Mac systems since 2003, so Windows (and the awful recompiling stuff) has lost importance. Or maybe the fact that Python 2.7 is out for a really long time now and everything is compiled for it has played its part. Or that platforms have lost their importance since web apps only need a browser and the backend system doesn’t matter much.

There is now a lot of resources on Python, free eBooks, paper books. Yet somehow more beginners manage to call the language “Phyton” or “Pyhton”. No idea why. Gotta be this terrible youth, when I was young…