E-Scribe News : a programmer’s blog

About Me

PBX My name is Paul Bissex, and e-scribe.com is my consulting business. I build web applications using as much open source software as possible. From September to June I teach web design and other important non-photographic professional skills to photographers. In the '90s I wrote technology commentary and reviews for magazines, newspapers, and web publications, including Wired, Salon.com, FamilyPC, the late lamented Web Review, and the Chicago Tribune. Feel free to email me.

Book Project

I'm co-authoring a book, "Python Web Development with Django", with Jeff Forcier and Wesley Chun. It will be published by Prentice Hall in July 2008, but is available for pre-ordering on Amazon now.

Colophon

This site is built on a fresh trunk checkout of Django, running on Python 2.5.1, served by Apache and mod_python. The database is SQLite. The operating system is FreeBSD, on a VPS hosted at Johncompanies.com. Comment-spam protection by Akismet. Vintage topo imagery from the Maptech archive.

Pile o'Tags

Stuff I Use

Akismet, del.icio.us, Django, dpaste.com, Emacs, FreeBSD, Freenode, jQuery, LaunchBar, MacPorts, Markdown, Mercurial, OS X, Postfix, Python, SQLite, Subversion, TextMate, Trac, Ubuntu Linux, wmii

A Django site.
(Finally!)

Copyright 2008
by Paul Bissex
and E-Scribe New Media

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.

Post a comment

Comments use Markdown syntax. Your comment will not appear until approved, which may take a few hours or more. Spammers will be torpedoed.


(Will not be shared)

(Optional)