E-Scribe : a programmer’s blog

About Me

PBX I'm Paul Bissex. I build web applications using open source software, especially Django. Started my career doing graphic design for newspapers and magazines in the '90s. Then wrote tech commentary and reviews for Wired, Salon, Chicago Tribune, and others you never heard of. Then I built operations software at a photography school. Then I helped big media serve 40 million pages a day. Then I worked on a translation services API doing millions of dollars of business. Now I'm building the core platform of a global startup accelerator. Feel free to email me.

Book

I co-wrote "Python Web Development with Django". It was the first book to cover the long-awaited Django 1.0. Published by Addison-Wesley and still in print!

Colophon

Built using Django, served with gunicorn and nginx. The database is SQLite. Hosted on a FreeBSD VPS at Johncompanies.com. Comment-spam protection by Akismet.

Elsewhere

Pile o'Tags

Stuff I Use

Bitbucket, Debian Linux, Django, Emacs, FreeBSD, Git, jQuery, LaunchBar, macOS, Markdown, Mercurial, Python, S3, SQLite, Sublime Text, xmonad

Spam Report

At least 236604 pieces of comment spam killed since 2008, mostly via Akismet.

OSCON 2007, Day 2

Python and WSGI

This morning I took Mark Ramm's "Modern Web Development with Python and WSGI" tutorial. Mark had people build stuff during class, which was a great way to have these concepts sink in. I successfully built a little WSGI-powered site in just a few minutes. As Chas promised (but I didn't actually believe him), it's pretty simple stuff.

For a long while I've pointed people to Joe Gregorio's Robaccia as a way to understand concepts behind web frameworks, and to get a sense of why you shouldn't just dive in and make your own without grasping those concepts. Ironically, Joe's "throwaway" framework has refused to die, and now it's got a home on Google Code.

I chatted briefly with Mark and Ben Bangert afterward about WSGI and Django. They explained one basic architectural difference that I had missed, which is that while individual Django view functions expect to receive HTTP request objects and return HTTP response objects, the WSGI/Pylons model is based on global request and response objects. As I understand it this is the major sticking point in terms of WSGI-fying Django apps.

Time management

In the afternoon I took Time Management for System Administrators with Tom Limoncelli. Tom has written a book of the same name for O'Reilly. I'm a sucker for this kind of stuff, and Tom is a very good presenter.

He led the class through a paper (or "Personal Analog Assistant") example of managing to-do tasks and calendar items, including notation for done/moved/rejected/delegated status glyphs for tasks, and a system for keeping the day's tasks from expanding beyond available time. It seems that a significant part of this system, similar to agile development methodologies, is regularly reviewing progress and adjusting expectation and goals accordingly.

Some tips:

A lot of the techniques he outlined were familiar to me. One the one hand, this made me feel like I knew something. On the other, it made me think thoughts like, "If I've been using technique X for 15 years, how come I still have all this stuff on my list?"

Overall, though, it left me with that fuzzy optimistic feeling I get whenever I get inspired by the promises of a new system. As Fred Brooks says: all programmers are optimists.

Tuesday, July 24th, 2007
+ + +
2 comments

Comment from Ian Bicking , later that day

I think there's some confusion about Pylons/WSGI and Django there. The request/response thing isn't too big a problem with Django. Django has global configuration, not per-request configuration, which does cause some problems. And maybe there's a problem that it has long-lived request objects that are modified in place, and can't be easily turned into WSGI request environments. But I'm not sure. Nevertheless, there's some confusion in there about the issues.

Comment from Paul , later that day

Hi Ian, thanks for trying to puzzle that out. It's pretty likely that the confusion is mine rather than Mark's or Ben's -- I'm wading into WSGI for the first time and still mapping the distinctions. I'm going to keep going with it though, since I do believe it's an important part of the web app landscape these days.

Too bad you're not out here! We could use more Python in the proceedings.

Comments are closed for this post. But I welcome questions/comments via email or Twitter.