Archive for February, 2008

Grandfather on the loose

Friday, February 29th, 2008

Grandpa McAleer

My grandfather’s presentation on ‘Classic jazz in the age of YouTube’ made it onto wickedlocal.com. He seems to make it into the news every few months. The money quote:

It’s a social thing — a celebration and an edification, a way to get out of the house and share a common interest. It’s a part of the local culture; we’ve got Thoreau, the American Revolution, and jazz revivals. We’re kind of a dying breed, [but] we stay true to the one glory. — Harold McAleer

The essays I did and didn’t write

Friday, February 29th, 2008

impeder insists

I’m not sure I’d sit in front of a computer all day if it weren’t for Paul Graham’s essays. I’ve tried my hand at writing prose several times, but find that I channel his style too strongly. Everything comes out stiff. And I’m not sure I have the zest for prose that I used to have for prosetry. I say things out loud before I write them.

Here’s a list of things I’ve tried to write about in the past or at least have daydreamed of writing about:

  • The Next OS I did write a rough draft of this essay. I also sent it out to people, mostly Brown CS grads and smart-sounding people from news.yc. The premise: the next major OS should be nothing but a browser with local storage capabilities. Javascript interpreters have to beef up their security. We have to close the distance between the interpreter and the metal. After much criticism, I think I overplayed my hand. The next major browser should perform orders of magnitude better than current browsers. Watching Firefox freeze up when my wife clicks a link convinces me that we may have to tweak the OS to get the responsiveness I envision. Local storage and computation permits hybrid online/offline applications. I want it.
  • Software Inspectability When you build software, you want to tweak it while it’s running. At least, some people do. Hence the power of Lisp, Smalltalk, and any other language with a REPL that lets you change things on the fly. If you haven’t programmed in a language implementation that has a REPL, you don’t know what you’re missing. Every project I’ve been on reaches a point where you need to examine and change running processes, and the lack of an ability to do so leads to all sorts of pathologies: verbose log files, meetings about what to change, getters and setters for statistics, Spring, etc. If you change running code all the time, you lose the institutionalized fear of the unknown. If your language doesn’t have a REPL, you end up building piecemeal parts of one. The more malleable software is, the happier you’ll be — you can see your changes right away. The more static the process is, or the greater the distance between changing something and seeing the result, the more timid you become.
  • Pragmatism I used to hate discussions in high school English. I’d sit in the corner and not say a word. It wasn’t until I aged a bit that I realized why: the arguments that English classes teach you to make don’t hold water. You present an array of evidence, a list of quotes that support your thesis, and hope that pile convinces the reader. You spend a lot of time assigning meaning to sentences that you didn’t write. This approach doesn’t work in the real world. It doesn’t admit tradeoffs, incomplete information, or nuance. It assigns purpose where they might not be any. The world we live in appears to be more mundane and complex than we like to think. We’re surrounded by emergent behavior and evolution, not neat narrative arcs.

Chatter

Thursday, February 28th, 2008

Groundline

Bloomberg won’t run for president this year. William Buckley died. We may have a deal in Kenya. Buttercup Festival returned.

The opening to Bloomberg’s op-ed reads better than most political paragraphs. Despite the fawning over Obama’s soaring rhetoric, I still hate political discourse. The words are never short and concrete. Sentence structures tend towards parallelism, so as to set the candidate up for punchlines and applause lines like bad rap.

Too much in the morning

Wednesday, February 27th, 2008

Filtered sunrise

Woke up at six with the missus. She has to get to the hospital early; I have to give myself time to goof off. I took nearly one hundred photos as the sun rose, read some, then headed downstairs to run. Cover 2.95 miles in 20 minutes. That’s about 6:48 per mile. Each day I drop the pace by about twenty seconds. That won’t last long.

I hope that by waking up early I’ll actually fall asleep tonight. Lately I stay up thinking instead of sleeping. Too much caffeine. Last night I tried to work out how much privacy a site hast to guarantee to win trust. I think it’s less than security experts say, but more than GMail provides.

Shower and go.

Comfortable

Tuesday, February 26th, 2008

Furious blue

I want to run fast this year. Back in high school I ran a 4:47 mile, a 10:27 two-mile, and could at least lay down a 5:20 first mile en route to a 17:00-something 5k. That’s not too fast, but at least I could move. After running two marathons and two halves, I feel lucky to break seven minutes per mile.

Due to laziness, I only trained for three weeks for the Houston Half Marathon this past January. I spent two of those weeks at 8,500 feet in Edwards, Colorado. It rarely broke four degrees Fahrenheit. I hate running in the cold. My only option was to train on the treadmill. The trick to running on a treadmill is to vary your pace every quarter mile. I would run negative splits each mile: start at around eight minutes per mile, then drop 15 seconds off that pace each quarter. Sometimes I’d cut the pace more dramatically. Thanks to that regimen and the altitude, I worked myself to the point where I could run seven-minute miles for long stretches. I never ran more than seven miles at a time, but I was still able to finish Houston in 1:37 (I ran the first half at eight-minute pace).

My dad likes to say that you can train yourself into a range: most of the time you’ll run around some average, with a few fast days and a few slow days thrown in somewhat randomly. I believe him. I had some outstanding races in high school, but most of the time I could predict where I’d finish before the race and there wasn’t a whole lot I could do about it. Part of that was training and talent. I don’t think I could have run any faster most of the time. But a lot of it is comfort level. During the last three quarters of a mile in a 5k, I’ll revert to a hard-but-sustainable pace. At least, I used to. The longer the distance, the more pronounced the effect. A couple miles before hitting the wall in both marathons that I’ve run, I’d fall back to a jog. Sure, I was tired. But I was also mentally bracing for the bottom to fall out.

I know some runners who escape that trap. Rob Goodspeed used to say, “If you run with the slow guys, you’ll go slow.” He pushed himself in practice and pushed himself in races. By the end of high school he’d beat me by a good thirty seconds in a 5k.

So this year I’m trying to raise my comfort level. I’d like to run 5:20 pace for 5k, 5:40 for 10k, 5:50 for the half marathon, and 6:00 for twenty miles. These numbers are ridiculous, but you have to have goals. The past two days I’ve run four miles at 7:26 pace and three miles at 7:07, all on the treadmill.

I plan to attack from both sides:

  • running slightly below top speed for longer and longer
  • running faster and faster at short distances repetitively

We’ll see how it goes.

Work

Tuesday, February 26th, 2008

Wore shoes for this one

Rushing out the door here, but trying to write to keep the flow. Maybe I’ll run after work, but maybe not.

I’m reading Mountains Beyond Mountains, the tale of Paul Farmer’s work in Haiti over the past three decades. My lady wanted me to read it to check if Mr Farmer’s dedication makes him somewhat annoying. He does have a large personality, but I can’t tell yet whether it does more harm than good. To do the work he does, you have to discard niceties. Think of Lancelot returning from the quest for the Holy Grail in a shirt of hair and remarking that the polite exchanges that move our days forward seem so unnecessary to him. Often he and Galahad would sit in a boat and say nothing.

What does strike me is the arc of Paul Farmer’s career. He didn’t know what he wanted to do as a kid. He didn’t know when he left Duke. But he went to Haiti and worked.

Working hard solves a lot of problems. You don’t have to worry about what to do with yourself, just do stuff and see what you like. You force yourself to be empirical.

Mr Farmer has labels for the various people interested in his work. ‘White liberals’ become ‘WLs’ in his language. But I don’t think identity has much to do with it. People who work in the trenches aren’t anointed. They’re just much closer to actual problems and the tradeoffs inherent in solving them.

If you don’t work in a field, it’s hard to understand its tradeoffs. That alone may explain the disjointedness of policy-making on a large scale. If you don’t work in the field, how can you know legislation to write? How do you know whom to vote for?

Election coverage rarely focuses on tradeoffs. They’re boring and not easily summarized. But that’s what work is — constantly choosing one method over another, then going back to fix your mistakes.

Premature optimization

Tuesday, February 26th, 2008

Andy Warhol Sears Tower

The first draft of my random-title script read the entire list of words file (1.7M, about 170,000 words). The next draft read as far into the file as needed. Both scripts ran in about a second on my PowerBook G4.

Letting go of the notion of streams and chopping up the data into 4096-word files works even better. The script runs in about 150ms. These numbers are not scientific. I did repeat experiments with files of various lengths. I thought 4,096 bytes might be a significant size, but performance didn’t vary considerably until I started reading 65,536 lines. Of course, everything was in RAM all the time for these runs.

More importantly, stripping and checking each word wasn’t necessary. And I don’t need to worry about plurals until they become a real problem, i.e., when the script starts generating repetitive titles. So I pull a random file, then pull a random word from that file, then check if it’s eight characters or fewer. If not, I pull another word from the same file.

Tweaking things before I even have a short, working program has always been a bad habit of mine. The impetus for dstowell.org is to create first and ask questions later. I’m getting there. Iteratively.

Twenty-two lines of python, available in the public repository:

from random import randint

def randword ():
    f = open( 'pre/' + str( randint( 0, 42 ) ).zfill( 2 ) )
    try:
        words = f.readlines()
        while 1:
            w = words[ randint( 0, len( words ) - 1 ) ]
            if len( w ) < 9:
                return w.strip()
    finally:
        f.close()

if __name__ == ‘__main__’:
    from sys import argv

    if len( argv ) > 1:
        count = int( argv[1] )
    else:
        count = 1

    for c in range( count ):
        print randword(), randword()

Naming

Monday, February 25th, 2008

Drifting snow

I can’t think of more than a title or two at a time. To generate titles for dozens or hundreds or thousands of photos, I need help. Preferably, the titles will be

  • unique,
  • memorable,
  • and short.

I snagged a list of words from ITA Software’s puzzle site and cooked up a quick script to pull random pairs of words. It’s in the public svn under title.

Outed

Monday, February 25th, 2008

My grandfather wrote to say that he couldn’t get enough pixels from the larger sizes of the Chicago Skyline photos. Just because it looks good at smaller resolutions doesn’t mean you actually have a good photo. I should have known that. Oh well.

The tallest buildings stand around a mile from our place, so it figures that you can’t snap a photo with your consumer-grade camera and see the window washer picking his nose. Also, my camera can’t focus too well in the dark. So the evening shots will contain more mystery than precision.

The gallery now has an RSS feed. You’re not an amateur until you’re syndicated.

WAH

Monday, February 25th, 2008

Drifting fire

In the Chicago Endeca office, we Work At Home every Monday. Which is great, because it’s ugly out and I don’t want to put on suitable clothes when it’s ugly out. I’ll go into the office in the afternoon, when the blood sugar settles and you need to force yourself to be somewhere doing something.

The above photo is a reflection of the sunset reflecting off of buildings in the Loop. That’s just a fancy way of saying I took a picture of my neighbor’s window. I haven’t seen anything good yet, and I don’t plan to. Making smalltalk in the elevator is tough enough without knowing little secrets.

In the op-ed pages today, we’re talking about whether or not Barack Obama wears an American flag pin. I’m going to write a list of things I don’t care about. This immense apathy prevents me from watching TV. It’s not because I’m virtuous. I’m not. I watched seven hours of football in a row last month. With the sound off, of course. I don’t care what the commentators say. It’s always the same. The ads stay the same. The evening news stays irrelevant and lacks context.

In the event pages, the Magnetic Fields will play six shows here in one weekend next month. I don’t know whether to go early or late (they play two a night). You should come with me and sing along.

Gray