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.


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!


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.

Pile o'Tags

Stuff I Use

bitbucket, Django, Emacs, FreeBSD, Git, jQuery, LaunchBar, Markdown, Mercurial, OS X, Python, Review Board, S3, SQLite, Sublime Text, Ubuntu Linux

Spam Report

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

Quora questions I've seen enough of

I really do like Quora (you may have seen my SadQuora tweets, a side effect of the time I spend there). But when somebody asked, "What are the most annoying types of questions on Quora?" I couldn't resist. Maybe it's just my feed, but I see things like these a lot:

Tuesday, October 4th, 2016
+ +

Window throwing in OS X and Ubuntu

When I first switched from OS X to Ubuntu for my daily development work, one of the things I missed a lot was Divvy.

"Window throwing" is the purpose of Divvy (and Spectacle, which I later replaced it with). With a single keyboard shortcut, I can make the foreground window fill the right half of the screen. Or the left half. Or the bottom right quadrant. Or the whole screen. Any rectangle I care to define. I can even send it to the other monitor.

Once I had gotten used to this power, I was hooked. Manual resizing and repositioning of windows with the mouse felt fiddly and inexact. Like trying to align icons on your desktop by eye. Bother.

On Linux I hunted around for a while before finding out that the Compiz system has a Grid plugin for this sort of thing. Divvy's window size/position options are more granular, but Compiz gets it done.

Then, probably a year later I discovered the solution I currently use in Ubuntu: Unity actually has built-in keyboard shortcuts for window placement. They use the numeric keypad and they go like this:

Look at the layout of the keypad and you'll see these are their own perfect mnemonics.

One final note: anybody who has ever used a tiling window manager like Xmonad is familiar with the pleasure of instant and exact window control via keyboard. I use Xmonad as well and love it. (I just had to mention this because if I didn't, somebody would be like DO YOU EVEN XMONAD DUDE)

Friday, April 29th, 2016
+ + +

What happens when you screw up?

Non-engineers want to know: what happens when a big bug is found in your software, and the bug is causing real users real problems, and you're the one who wrote the code?

Engineers do sometimes write bad code, and sometimes it makes it into production, it's true.

But shipping production software involves a lot more than writing code. It goes beyond that one engineer. That engineer is not the only person who saw or ran that code.

In short, in a sizable professional software organization a single person doesn't really have the power to screw up all alone. So the right thing to do when a production bug bites you is, figure out how you - as an organization - let that happen.

What "happens to" the engineer who typed the code in question, hopefully, is that he/she participates in a post-mortem review that helps the team figure out how they can improve things to reduce the likelihood of similar problems in the future.

For more on this, read the utterly excellent and inspiring "Blameless PostMortems and a Just Culture" essay by John Allspaw of Etsy.

Friday, April 1st, 2016
+ + +

Good Python Interview Questions

When we were growing our team of Python devs at CMG, I was involved in a lot of interviews. I really enjoyed it, meeting and hiring interesting and talented engineers.

I'm not a big fan of quizzing people on technical minutiae in interviews. I do think that asking some questions about technical likes and dislikes can be very illuminating though.

For example, "What's your favorite standard library module?" (Best answer in my book here is itertools or functools, but anything that shows they have hands-on appreciation for the depth of the standard library is good.)

I've also asked, "Tell me something you don't like about Python." This can be a great gauge of someone's level of sophistication and breadth of experience. If they say "But I like everything about Python!" that's a red flag (and I say this as a bona fide Python lover and career man). It means they either lack enough breadth of experience to see Python's weak points, or they lack the confidence to answer truthfully.

My favorite answer to this question was, "I don't like that lambda expressions can only be one line." It had never occurred to me to see this as a defect, but now every time I am writing code that drives me to the same feeling, I think about the engineer who gave that answer. (We did hire her and she was great!)

Wednesday, March 23rd, 2016
+ + +

Teaching Non-programmers what Programming is Like

How do you comprehensibly explain to non-programmers the challenges of programming? Why can't you "just tell the computer what you want it to do"?

A classic teaching tool for this is the "make me a peanut butter and jelly sandwich" demo.

Put out on the table a jar of peanut butter, a jar of jelly, a loaf of bread, and a knife. Tell them you are a robot (computer) that is physically capable of making a peanut butter and jelly sandwich, but you need instruction (programming). That's their job.

If they say, "OK, put the peanut butter on the bread"... put the jar of peanut butter on top of the loaf of bread.

And so on.

In your supremely patient robot way, show them that while you make no inferences and have no common sense, you're happy to follow specific instructions.

To get you to spread peanut butter on a slice of bread, they'll learn they have to tell you to...

Getting all the way to the end may be more than is needed (and more than you or they have patience for).

But once they've gotten the idea, you can explain that if they had guided you all the way to a complete sandwich, all the instructions they gave you to achieve that would amount to the first, alpha version of the program. A version which doesn't yet account for things like what to do when you run out of peanut butter or jelly or bread, or what to do if the bread tears...

(Full disclosure: I have not taught this lesson yet myself!)

Saturday, March 5th, 2016
+ + +