Mill Work

Jim’s mind wandered. The gray fuzz of an afternoon nap invaded his mind, and he began to day-dream. In his dream, he was sitting at a large table in a small cottage in the woods. Sunbeams speared down from holes in the thatch roof, lazily tracking the dust that was filtering down from the straw. At the table were several small creatures who took turns making yapping noises:

“Yap.”
“Yap yap yapyap yappa yup.”
“Yap oop.”

The creatures took turns speaking, but they were speaking nonsense.

Slowly Jim realized that the creatures were holding a status meeting of some kind. Freely translated, he felt it would go something like:

“Dumpy hasn’t finished the supports in the lower gallery.”
“That’s because Chunky hasn’t cut down a tree in two weeks!”
“My axe is busted as Beano, here. I need a new one from Smokey.”
“Okay, you try to fire a forge without coal or wood.”
“Why not just hook Beano up to it instead?”

Jim fiddled with his pipe (his mechanical pencil?) while the creatures argued. Axes and coal and timber were in short supply, fall was coming and Fingal had gone off to the city and wasn’t around to bring in the crops, and there were rumours of another wicked witch in the eastern forest, accosting travellers and asking them annoying questions (“Look, if I knew when we were going to ship, would I be working here?”).

He stared out the window. In CorpLand, bulldozers were uprooting the park across the street to make room for another business complex, but in his day-dream squirrels chattered and chased each other around the base of a huge oak tree, insects batted against the windowpane with a sleep-inducing drone, and somewhere a rope holding a beam creaked. Just beyond the oak was a small yard with a well, then a dense green forest. Several game trails headed off into the trees. He could just see a glint of —

Jim’s fingers had been working idle magic, and suddenly all of his pencil leads fell to the floor. He bent over to retrieve them, and conked his head against the table.

“Owwww.” The conference room swam back into focus. He blinked; he was surrounded by people in white shirts, and whiteboards.

“What about you, Jim?” Peterson eyed him.

“Well, the wicked —”

“What?”

“Oh, uh, we’re on schedule. Just another week or so. Fingal wants some minor features changed, is all.”

“Fingal?”

“Uh, that guy from Finance.”

“Features, like what?”

“Oh, just the front end. And the database. Some of the back-end. And maybe the report generator; he said it could use some ‘pizazz’.”

“Finance wants to change the fonts again? Put Iggleson on it!”

The room roared with laughter. “Ig?” “Old Ig?” “Who-needs-a-metric Ig?” Which was really unfair. Iggleson was a really nice, kind of slow guy who’d simply been “passed over” for promotion the last decade or so because he’d refused to go along with the latest fads in engineering. Ig was a living object lesson in replaceability that management kept stashed away and never replaced, he was so indispensible. They trotted him out occasionally to scare the new fish into working twice as hard at fabricating the milestones in their weekly progress reports. The message was clear: do your metrics, submit your paperwork and job logs (down to fifteen minute intervals) or become like Ig.

“Okay, Iggleson’ll be on it.” Jim knew that submitting a three-inch stack of paperwork to change a font from Times to Helvetica was just the kind of work that Ig secretly enjoyed. Ig’s secret was that only the top several pages of the forms changed from task to task; the remaining pages had remained the same for years, and if management ever bothered to dig into them they’d find flowcharts from the 70s, or autocoder forms from the 60s, maybe even older stuff from the arcane days of vacuum tube computing. Jim wrote a checkbox on his daily goal sheet.

        [ ] See Ig - Fonts

Like most meetings, this meeting didn’t really end. Instead, several conversations branched off to different parts of the table and were carried out the door (and back to whiteboards) by the participants.

The glint of a creek, past the trees. Motion, like the turning of a mill’s waterwheel. Over a decade of faking paperwork, what kind of job was that?

Banana Bread

If you ignore the nuts and the chocolate (and you can leave them out, if you want), this is a great, simple, fat-free banana bread recipe.

  • 3 large (or 4 small) mushy bananas. Frozen-then-thawed bananas work great
  • 2 eggs
  • 2 cups flour
  • 3/4 cups sugar
  • 1 1/2 teaspoons baking soda
  • 1 teaspoon salt
  • 1/4 to 1/2 cup chopped nuts (slivered almonds are good)
  • 8-10 squares chocolate, shaved (tiny chunks are okay)

Mash bananas well. Beat eggs and mix with ‘nanas. Combine flour, sugar, salt and baking soda. Mix bananas and eggs into flour to form a batter (don’t mix too aggressively). Add nuts and chocolate.

Bake in greased bread pan at 350 degrees for 1 hour.

Template Madness

I just learned about template parameters today. Now, you (dear reader) probably fall into one of the following categories:

  • “What’s a template parameter?” or
  • “Duh, what took you so long?” or
  • “…and you haven’t slit your wrists?”

If you are dazed and confused at the following, count your lucky stars, you might be in the position of understanding it.

When I wasn’t looking (I was off at a couple startups for a few years, first doing Java, then doing embedded stuff in C) they went and changed C++ from a horribly complex and convoluted (but logically consistent … if you remember to step on the yellow flowers and not get sucked into the swamp) object-oriented programming language … er, they changed C++ to a horribly complex and complicated object-oriented programming language with an unbelievably nasty and arcane type-based macro system called templates. Templates were gnarly when I looked at ’em six or seven years ago, and like all things that get entangled in C++, they haven’t gotten better.

That sucking sound you heard was me missing one of the yellow flowers and getting pulled down into the mud. At least it’s nice and peaceful here; I can still hear the screaming of those poor souls who are trying to cross the swamp. Did you hear that “Ouch!”? What’s the difference between GCC and Visual C++? (Ans: Neither one is very good at templates). Ouch. Why does Koenig lookup suck so bad? (Ans: Because we need it). Dealing with templates and writing stable libraries that provide (or use) templates is a huge mother of a stinking, sucking swamp. And if you don’t believe me, look up two-phase lookup and (after you’re done screaming) pay me $10.

Template parameters, oh yeah. I’m not going to get into grody details too much. First you define a nice innocent little template class, then you inject it into another template as a parameter using an icky syntax that kind of fell out of someone’s bad experience with Perl, causing the victim to inherit from that first template in a really disturbingly intimate way. (It’s called a policy in this context). You have put one body of code at the direct mercy of another body of code, and now you can turn the screws until they sing soprano in harmony. Turing-equivalent, sentient macros anyone? Two hundred megabyte working sets to compile “Hello, world!”? It’s all coming.

This is all great, heady stuff, but it violates principle #2 of developing a programming language, namely, “Thou Shalt Have a Debugger From Day One (You’ll Need One Anyway).” I can easily see folks pouring over pages of dumped internal compiler symbols, searching for lost scopes and violated commas. In Days of Yore you could give your average IBM 360 programmer a foot-thick core dump and he’d go FlipFlipFlipFlip-thinkThink-Flip and (all in twenty five seconds) stab his index finger at the offending byte in a sea of hexadecimal. Like that, only with angle brackets and about a zillion lookup rules and namespaces sprouting off in all directions. Ka-boom.

It’s been said that one of the best competitive advantages you can have is a technology that your opponent doesn’t understand the value of. This does even better than that, a technology that actively causes your opponent’s head to vibrate and explode. Ka-boom. It’s even funnier when the compiler truncates error messages to 255 characters and you have to guess at the rest or rename stuff so that the diagnostics fit [or — heh — patch the compiler]. Getting a clean compile is like playing Twenty Questions with a pathological liar. God, I love this business.

So: Remember to stick spaces between your greater-than signs, to meditate on the reason why you don’t have to stick spaces between your less-than signs, and to thank Barney, from whose forehead all job security springs.

And I thought the whole idea was to get rid of that bad, evil #define. Silly me.

Fortune Cookie

Yesterday’s fortune cookie said, “You would make a good lawyer.”

I thought these were fortune cookies, not insult cookies….

(more updates, more updates … work is never-ending)