Lately, I’ve become very careful about practicing my preachings. If you make exceptions for your own values, they cease to be values and become, instead, a quaint set of rules.
Today’s exhibition involved my recent foray into Python web development.
My primary goal behind Python is to convert an existing Java web app over. One of my projects at U of M entailed efficiently presenting and collecting data coming from sensors deployed on bridges. Last summer, I whipped together a Java web app, using DWR to facilitate reverse-AJAX communication between the Java back-end and a Dojo-based line-chart in the front-end. Now that I’ve graduated, a civil engineer is planning to take over that application for me. She has Python experience, but not Java, so I’m reimplementing that application in Python so she can have an easier time.
My secondary goal is to reimplement another project of mine; a real-time Google-translate-on-the-fly chat web application. As I head back to industry, I first want to see the same application done in Java, Python, Ruby (Rails), Clojure (Compojure), and perhaps Scala (Lift?).
For Python, the question quickly arose: TurboGears or Django? After some reading, it seemed the Django’s community is more active, yet it’s geared more for CMS-like applications. TurboGears, on the other hand, is more flexible for more general-purpose applications. The latter appeals to me, and I know the founder, Kevin Dangoor, who lives here in Ann Arbor, so I decided to take the risk.
My obstacle has been the documentation.
Now, I’ve long lectured my programmers that working with open source projects can be frustrating, but that you have to take responsibility for using it. People too-often interpret open source software as free magically-created software that they’re entitled to, and if there are bugs, or if the documentation is lacking, that warrants pounding the table and cursing the developers. But if there are bugs in an open source tool that you’re using, that’s your failing, too.
So, instead of giving up on TurboGears and badmouthing it, I started taking careful notes on the corrections that need to be made to the introductory tutorials, and the improvements that could be made to the rest of the documentation. Then I joined the mailing list and entered the IRC channel, and instead of sending flame-tongued complaints, I asked them how I could help. And they quickly gave me working instructions on how to do so.
And that’s why I’ve been playing with reStructuredText files and Sphinx all day, correcting typos and being the good netizen I want to see.