skip to main bit
a man slumped on his desk, from 'The Sleep of Reason Produces
      Monsters'

Oblomovka

Currently:

in which i wish i was donald knuth

I spent an hour or so today trying to solve a problem that I just knew had been solved a million times before: I don’t have that knapsack of programming solutions that CS students, and other people who’ve actually read The Art of Computer Programming naturally have.

I’ve been writing a parser that would suck in Latvian legal texts (don’t ask) in Word format. I realised about half-way through that I’d have to take my parsed outline, and wire up all the various sections, subsections, and so forth into a sensible tree. Well, actually, I’d always known that I’d have to do that, but it was only this morning that I realisd that that I didn’t know how to do that, and it was going to be harder than I’d envisaged. I

My solution sucks (so badly that I can’t bring myself to show it you — oh all right then), but I was reasonably pleased that I managed to fence off my sucky solution into a separate object, only lightly connected to the code it was helping. Even its API is rubbish, but I know that at some point when it finally dawns on me how to do this in a smart way, I’ll be able to pull out this blob and slip in something a bit better.

The rest of my time has been spent hitting reload nervously on the current electoral polling (there’s a complex joke using the computer science meaning of polling, but I’m too tired to go there). Lots of people I know need to see this, I think.

2 Responses to “in which i wish i was donald knuth”

  1. Sumana H. Says:

    I take it Beautiful Soup was of no help?

  2. Danny O'Brien Says:

    No, BeautifulSoup was great! It would have been even harder without it!

                                                                                                                                                                                                                                                                                                           

petit disclaimer:
My employer has enough opinions of its own, without having to have mine too.