High altitude programming
I enjoyed reading Peter Norvig’s recent article “How to Write a Spelling Corrector”, in which he remarks.
… I figured that on the plane flight home, in less than a page of code, I could write a toy spelling corrector that achieves 80 or 90% accuracy at a processing speed of at least 10 words per second.
This isn’t the first time Google’s director of research has confessed to programming on a plane. While others sit back and listen to their ipod shuffles, Norvig writes a Python program to unshuffle his.
Why ever would anyone want to write code on a plane? There’s hardly enough space on those teeny tables to balance a laptop, and (as he acknowledges in both essays), an internet connection is unlikely.
Possibly he’s showing off: after all, his intelligent friends, Dean and Bill, had no idea how a computer program could even perform such magic, let alone one written in less than a page of code and on a plane. Maybe he’s overworked, and the plane is the only opportunity he gets for such recreational projects.
I don’t think so. I’ll confess to having programmed on a plane myself, and suspect the real reason is that an aeroplane is — perhaps suprisingly — a good place to get some thinking done. The absence of an internet connection can be a bonus: all too often in this age of instant messaging and syndication, the internet is a distraction. I’m not surprised that a serious thinker like Professor Knuth doesn’t even read email.
Some suggest humans are naturally nomadic, and that movement aids concentration. Maybe so. Certainly if I go jogging at lunchtimes, technical problems seem more tractable on my return. And I can digest a specification or a text book at least twice as quickly on a train as I could in an office.
Spell Correcting Google
$ curl -s http://norvig.com/big.txt -o big.txt && \ curl -s http://norvig.com/spell.py -o spell.py && \ python -c "import spell; print spell.correct('google')" goose
Feedback
-
But it won't be long before mobile phones disturb passengers on the plane.
-
And Dave Thomas likes to write on aeroplanes.
I personally look for an environment where I know I won't be disturbed. It isn't good enough that I don't get disturbed—I have to know that the interruptions aren't going to happen. Without that, part of my brain is constantly scanning the background, waiting for the e-mail ping or the IM window to pop open. So, when I sit down for a writing session, I kill off all my network applications. I put the phone on DND, and I close the door. The risk of being disturbed drops and my productivity rises.
For this same reason I find I'm really productive is on airplanes: I stick the earphones in and I can churn out page after page.
-
And now you can used Google reader on a plane.