Those daring young men in their…

I thought that the Europeans were self-panicking and over reacting to the volcanic eruption of <unpronounceable name> in Iceland, but the ever-practical Fins have flown in the dust, and have provided photos of what it did to their engines:

http://www.flightglobal.com/articles/2010/04/16/340727/pictures-finnish-f-18-engine-check-reveals-effects-of-volcanic.html

I trust they are being honest about any warranties they have voided.

Some books

A few books that I’ve enjoyed recently.

Sandman Slim. (Richard Kadrey). It’s been years since I’ve this much fun with a “bad-ass comes back from the dead to wreak retribution” novel. It’s a little predictable and somewhat repepepetititititiousify, but you’ll enjoy it.

The Gone-Away World. (Nick Harkaway). Don’t let the stupid fuzzy dust jacket on this book confuse you; there is madness and power in these pages. The old world is gone, replaced by terrible, mysterious menaces resulting from man’s quest for better and better weapons. There is humor, there is beauty, there are terrible secrets, there is love and war, and there are ninjas in a desparate battle with midgets.

K. J. Parker’s Engineer trilogy: Evil for Evil, Devices and Desires and The Escapement. From the opening chapter of E4E I was hooked; an engineer (quasi-medieval technology, at the level of catapults and spring-driven spear-throwers and so forth) is betrayed, condemned to death, and escapes his home city-state to take refuge in the “great unwashed” cities outside. How he gets his revenge takes up three books, and it’s worth it.

Wireless. (Charles Stross). Collects many of his recent short stories, including Missile Gap, one of my favorites.

Hacker’s Delight. The first chapter — everything you’ll ever need to know about bit twiddling — is worth the price of admission. Beyond that, just about every simple algorithm I’ve ever heard of for doing efficient low-level, wacky stuff is covered here. BCD arithmetic on modern 32-bit architectures? Covered. Population-counts? It’s all here, and tons more.

Programming Erlang: Software for a Concurrent World. (Joe Armstrong). Erlang is a refreshing programming language. While reading this book I kept having flashbacks to reading the original The C Programming Language (which I think is one of the best programming language books around). Erlang is crisp, expressive, and looks like lots of fun (wish I had time to do a project in it).

The Eerie Silence (Paul Davies). Good discussion of the Fermi Paradox (basically, where are all the ETs?).  More than just a re-hash of the tired old stuff (Drake equation, etc.), he’s got some interesting points about what the likelihood of and might mean to make contact with a million-year-old technological civilization.

Solaris Internals (Richard McDougall and Jim Mauro). Yet another goopy “here’s the innards of a modern(ish) real-world OS.” Reminds me of the Vax/VMS internals docs and the various books on the 4.2bsd kernel by McKusick. I don’t like Solaris much, but the details are fun.  (Heh, speaking of million-year-old technologies 🙂 … )

Compiler Pragmas We’d Like To See

#pragma expiration(date)

Refuse to compile the following code after the specified date.

#pragma moran(email address)

Emails the specified address every time there is a compilation error in any code that follows.

#pragma tricky

Tells the optimizer to go easy on the next bit.

#pragma borken

Tells the compiler to do its worst; it hardly matters, the code is busted anyway.

#pragma stfu

Tells the compiler to shut up and compile. That’s your job, and that’s it. Your job is not to announce banners about compiler versions, or display company logos in blinking text, or declare with amazement (and a full line of “!!!!!!!!!” marks) that the compilation has finished with 0 errors, 0 warnings, 0 flatulent events, and 0 animals harmed.

#pragma blame(username)

If there are errors in the following code, arrange with the source code control system to blame it on some other checkin made by the specified user.

#pragma whew

Dear reader, take a break, you have earned it.

#pragma notme

This design was someone else’s idea, not mine. Don’t blame me.

#pragma myway

If I were to do it, I’d write it this way. I feel like a total moron doing it that other way, but nobody listens and nobody appears to care. (Implementation-dependent side effect: The code is enabled when the project is cancelled).

Uncomfortably full

Somewhere, a voice is calling. You’re neck deep in iterators, destructors are going off all around you, and if the bloody river full of pirhana and man-eating allocators doesn’t get you, the bunker of locally scoped nuns armed with automatic variables on the far bank will ruin your day just as soon as your schnozz clears the mine field. These runtime missions always suck. “A walk in the park, Sarge. Sure.” A star shell goes off and illuminates the whole scene, and when your vision un-dazzles you get your first clear look at the far bank, which is simply crawling with the ugliest damned set of indented curly braces you’ve ever …

That voice again, faintly: “You ready for lunch?”

The haze clears. Things looked bleak there for a second. You blink. The source code in front of you still looks bleak. Lunch sounds like a great idea.

You tell a story at lunch. The one advantage of being an old fart is that you can tell some great stories. You don’t even have to make the crazy shit up; that would be harder.

—-

I’ve been on a number of projects where it’s gone like this:

“Okay folks, the ROM is full. Put down your keyboards, it’s time to stop typing, we’re all done now.”

Team: “Yay! Ship it!”

And so final ROMs are burnt and shipped to Asia for manufacturing. The ship party is glorious; we finished three months early (the ROM was full, yeah) and customers are very happy.

Urm, well no, not really. What usually happens is:

“Oh golly gosh jiminy jeepers [not really those exact words], we’re out of ROM space. Whatever in [someone’s or something’s name taken in vain] shall we do?”

“Roight-O. Bring out [music: duh-duh-duhhnnn!] . . . the Code Squasher!”

“Not [duh-duh-duhhnnn!] . . . the Code Squasher!

“Yes, I’m afraid so. If we don’t, things will only get worse.”

The [duh-duh-duhhhnnnn!] Code Squasher is about three stories tall, with a hopper on top where you stuff in the programmers, and a little tray at the bottom where you collect the . . . final product. It uses three phase power. You lure the programmers by dangling a Mac Powerbook over the —

No, not really (thank goodness). What usually happens is:

“Out of ROM space again?”

“How did you tell?”

“You’re carrying that monster copy of Compression Algorithms around, just like last month. Look, that’s not going to save us this time.”

“Another five percent and we might be able to –”

“Nope. We need to [duh-duh-duhhnnn!] … delete code.

[look of horror] “Delete code? Doesn’t that mean we have to get rid of features?” He’s expecting Marketing Ninjas to leap down from a skylight, scream something in MadisonAvenueSpeak and whack his head off, I think.

“Look, there are probably sixteen implementations of linked lists in the system, half a dozen hash table classs, two XML parsers and any number of ways to zero a miserable block of bytes, half of them ‘optimized’. Even if you only find half of the places where people have re-written strcpy and printf, you’ll find enough space to make the next release.”

“Okayyyy. But that’s still not going to help. Maybe we need overlays, or a p-code engine, or some kind of compressed paging manager that….”

“The real disease is that you’re practically paying engineers by the line of code. Re-examine all the mini-parsers, all the places where a routine is just re-shuffling its parameters and passing the buck to another useless layer of abstraction, all the code that is in there for a rainy day that you’re just not ever going to use. Remove that junk.”

“Then what?”

“Toss most of it away and start over.”

[heart attack]

Systems age, just like people do, and it takes exercise of diligence to keep the fat at bay.  I don’t have a silver bullet, but good organizations have people who are nosy about every single checkin.  Be one of those people; you’ll learn a lot, and you’ll catch bugs, too.