July 2005 Archives

We meant the product, not the company, but this works, too.
If you're having trouble getting apt-get to tell you what you have installed, it's because apt-get can't do that! Try this:
$ apt-get install apt-show-versions $ apt-show-versions
Compared to the pre-GUI era, the typical workstation display these days is big. We're stocking new engineers with dual 1920x1200 widescreens. That's the equivalent of six side-by-side VGA screens! In spite of this growth over the years, my basic monitor real-estate coding rules haven't changed: stay within 80 columns, and try to keep each function short enough to fit vertically on a single screen.
The 80-column rule is a coding style convention that enhances readability and helps you play nice with your teammates. I'm not sure about the origin of the specific number 80, but it is the default width of a terminal window. A line of a typical book also happens to average 80 characters, and a book page is about the widest the human eye can read without getting lost in the middle. Whatever the exact limit is, it's polite to stay within it because you don't know the width of the window used by the person reading your code.
Resist the relentless pleas of your teammates to increase the 80-column limit. Wider monitors enable greater productivity by allowing activities you can't do on smaller screens, like comfortably diffing two side-by-side GUI windows of 80-column code, or debugging an application while simultaneously stepping through its code. But you lose these new abilities if a wider monitor merely means that your code sprawls farther and farther to the right.
The height rule is more of an engineering principle than a mere style guideline, and as such, it's more subjective. Just as long paragraphs in a book are tough to slog through because they contain too many ideas, long functions contain too much code to understand. Splitting one long function into smaller functions encourages documentation by forcing the programmer to give a (possibly) meaningful name to each new function. At the same time, the programmer will probably shorten the overall code by identifying repetitive, copy-paste code and replacing it with calls to a single general-purpose function.
I haven't had to adjust my function-height rule over the years, but lately it's making me feel lonely. I'm the lone engineer on my team who hasn't rotated his LCD to portrait position. I see no reason to do so, because it'll only make it easier to write longer functions.
Two of the current Apple iPod commercials feature multiple synchronized dancers.
How'd they do that with iPods? Each person in the commercial has his or her own. To the best of my knowledge no iPod can broadcast to another one, nor can iPods receive FM radio. So did all the dancers start the same song at the same moment and hope they stayed in sync? Is there an outtake where they're all quickly exchanging headphones to see if the beats match up? Hmmm, now that I look more closely, one of the rollerskating guys is a bit out of step with the other two. Yeah, that guy -- so you see it, too? Good, so it's not just me.
Maybe they're faking it and actually listening to a boom box on the floor behind the camera.
In my mind, Amazon has succeeded in doing something that no other merchant has: it has created a currency that's as valuable as cash. I buy enough stuff on Amazon that I know I'll eventually consume any Amazon gift certificate I receive, and thanks to their generally reasonable prices, Super Saver shipping, and lack of California sales tax, I don't feel that I'm paying any penalty for buying something from them instead of locally.
In other words, I'd pay $50 for a $50 Amazon gift certificate. But not everyone shares my view.
If you're using xterm and hitting the backspace key doesn't do what you expect, add this to your .Xdefaults file:
xterm.*.backarrowKey: false
(Thanks, Kelly Felkins.) Another solution specific to Emacs is to add this to your .emacs file:
(define-key global-map "\010" 'backward-delete-char-untabify)
(Thanks, Ehud Karni.)
