Productivity and Self-improvement by Gutata


Turn Django Documentation Into HTML

Posted in Django, Python by Michael on the August 15th, 2008

Want to generate HTML from the Django docs? Do this:

  1. Download docutils (link docutils-0.5.tgz at the bottom of the page)
  2. tar -zxvf docutils-0.5.tgz
  3. python docutils/tools/rst2html.py <name>.txt <name>.html

where <name> is the document file such as model-api.txt

New Books

Posted in Process, Python by Michael on the October 26th, 2006

I’ve missed some cool announcements while on hiatus:

  1. 37Signals released their book Getting Real for free in HTML!
  2. Adrian and Jacob’s Django book has a title and can be pre-ordered.
  3. Geocoding has never been simpler.

Big Thanks to the Django Community

Posted in Python by Michael on the August 15th, 2006

I’m not sure how my previous article got noticed, but while it’s getting some attention, now is a good time to give a big thanks to the Django community for creating a framework that is not frustrating, and dare I say it, fun to use. Kudos to the people who started it: Adrian, Simon, Jacob, and Wilson. And to all those who have contributed.

The community has been great. If there were a bug or some annoyance, any time I searched online for it, I almost always found a ticket or patch in the works to solve the problem. I’ve landed at quite a number of Django-centered blogs that talk about something interesting done with Django: a problem that Django easily solved, a neat trick, or a cool new feature. And I’ve often ended up at Simon’s and Eugene’s blogs because they have something valuable to add in each of their entries.

Keep up the good work!

Django and Ruby On Rails

Posted in Python by Michael on the August 11th, 2006

I’m not sure if this is a good litmus test for popularity contests, but when I mention Django to web application developers, almost no one has heard of it. When I mention Ruby On Rails (RoR), almost everyone has heard of it, including those who haven’t heard of Django. I wonder what it is about RoR that has made it a household name (among developers).

In terms of features and productivity, I can’t say if RoR is worse or better than Django. From various articles and comparisons, it seems Django would have the edge. Maybe I can talk about that later. So let’s just say that the two frameworks, including the languages behind them, are close in terms of functionality. That is, there is no significant increase in benefit. And there are fantastic communities and documentation to help if you get stuck. Like anything, each framework has its strengths and weaknesses.

If this is the case, what other reasons can explain RoR’s greater popularity? For one, I think that 37Signals (the creators of RoR) is good at marketing, PR, and best of all, explaining why they chose their approach. They speak at conferences and hold workshops to share their knowledge and (usually) promote RoR. In defense of Django, the Django community does their share of speaking. Just not to the same extent.

Perhaps the biggest reason for RoR’s popularity is that multiple semi-popular, user-centered, and professional applications have been built on the technology. The list includes 37Signals’ productivity applications, 43Things, Penny Arcade, Odeo, A List Apart, YubNub, and Corkd. Not to take away anything from the Django developers, the current set of Django powered applications, or my own efforts (blondela.com and prrice.com), but it seems like Django is missing the killer stand-alone application that users are passionate about. The one that Django developers can say is profitable or scales to millions of hits per day. Or perhaps Django does have enough applications to warrant some attention, including Lawrence Journal World, Naples Daily News, and Adrian’s (lead developer for Django) Chicago Crime. And to push it over the top, Django just needs a few more applications to add to its portfolio.

This discussion is a bit fruitless however. From a developer’s perspective, who cares if one framework is more popular? Pick the one that benefits you the most or that offers the path of least resistance. The path of least resistance (especially for lazy engineers) seems to be a good method for deciding the best framework/technology. And if we could measure “resistance,” maybe this would be a better metric than popularity.

Why is Python great?

Posted in Python by Michael on the June 6th, 2006

Ruby is the sexy language at the moment. Java has lots of resources. PHP is great for getting things done fast. So why would anyone choose Python?

First, Google is doing lots of Python. They’ve hired most of the Python gurus including the inventor of the language, Guido Van Rossum. So there’s probably something about Python that makes it a good language for developing web applications. You can also read why Eric Raymond loves Python. Next, read why Ruby On Rails inventor, David Heinemeier Hansson, thinks PHP is the devil. Then, read Paul Graham’s essay on Java. Finally, you’ll want to read a fairly technical comparison of Ruby and Python.

These articles don’t mean that you can’t develop web applications with Ruby, Java, or PHP. Ultimately, you need to choose what will work best for what you are doing.

Best Python Books

Posted in Python by Michael on the May 16th, 2006

If you want to learn python, read these books in this order:

  1. Learning Python
    Easy to read and well-organized for beginners to mid-level experience.
  2. Python in a Nutshell
    Very detailed explanation of python, and perhaps the more detailed than you’d like to know unless you’re curious about the inner workings of python. Consequently, more difficult to read than Learning Python.

Use these as references:

  1. Python Tutorial
    Comes with python. Easy to navigate. Similar to the JDK API documentation.
  2. Python Cookbook
    A nice set of implementations for common tasks. You can see additional “recipes” at ActiveState Programmer Network (ASPN).