The Core Dump

A strong conviction that something must be done is the parent of many bad measures

[By Nic Lindh on Tuesday, 18 November 2003]

Software’s lizard brain

Interesting InfoWorld column by Jon Udell about the problems backwards compatibility is causing in software, and how software is evolving at a much slower rate than hardware. Mr. Udell argues that software is evolving through increasing layers of abstractions:The arc of software progress is defined not by increasing speed or capacity, but by the growing complexity of the data, events, messages, and relationships flowing through software systems. We deal with that complexity by layering abstractions on top of abstractions.

Abstractions are really nice in that they let the developer focus on the task at hand instead of getting bogged down in implementation details. There are two frustrations with abstractions, though: The first one is that they slow things down. So using ODBC to talk to a database instead of using a driver written specifically for that database will always be slower. But heck, computers are fast. The other and more serious problem is what Joel Spolsky calls ”leaky abstractions.” Sometimes the underlying details of the abstracted layers pop up to the surface, forcing the developer to understand those details in order to understand why the abstraction broke.C++ string classes are supposed to let you pretend that strings are first-class data. They try to abstract away the fact that strings are hard and let you act as if they were as easy as integers. Almost all C++ string classes overload the + operator so you can write s + “bar” to concatenate. But you know what? No matter how hard they try, there is no C++ string class on Earth that will let you type”foo” + “bar”, because string literals in C++ are always char*’s, never strings. The abstraction has sprung a leak that the language doesn’t let you plug.I’m dealing with this sort of thing when teaching students about HTML (although granted, at a completely different level than what Mr. Spolsky is discussing). Basically, where do you draw the line? How much of the underlying issues should a person be expected to understand in order to create HTML? It is so tempting to go for the high-level abstraction and turn students loose on Dreamweaver, which is a lot of fun and lets you create sites with very little effort. But it also means that when the student needs to accomplish a task Dreamweaver isn’t equipped to handle through the GUI, the student needs to have an understanding of the underlying HTML.

The classic example is the Dreamweaver site folder. Whenever you start a new project, Dreamweaver asks you to create a site folder. If you don’t, Dreamweaver makes all local links absolute instead of relative. This means that instead of a link like “images/logo.gif”, you end up with “D:\Documents and Settings\images\logo.gif” and when the site moves to the server, every link and image is broken. Tears and gnashing of teeth ensues. Note that this isn’t Dreamweaver’s fault. It’s just unable to abstract away the concept of a site root folder.

The abstraction boat leaks a lot.

« Secret Agent


Enjoy the ten latest posts!

Book roundup, part 27

Includes Hollywood Dead, Tales from the Loop, Things from the Flood, The Court of Broken Knives, and Port of Shadows.

To see what is in front of one’s nose needs a constant struggle

“Cancel everything. You’re going into emergency surgery today”

Nic has a retinal tear and has his vision is saved by a laser.

Book roundup, part 26

Includes The Storm Before the Storm, White Trash, Calypso, Tell the Machine Goodnight, Prince of Fools, and Provenance.

Renewing the nerd card: Installing Ubiquiti UniFi in the house

The Internet tells Nic to install Ubiquiti gear in his house, so he does, and now he has thoughts.

The greater the ignorance the greater the dogmatism

Working in the pod mines

What I wish I’d known when I started podcasting.

It is impossible for a person to begin to learn what he already thinks he knows

Smell the Foam Finger

Nic starts a new podcast about—gasp!—American sports.

Book roundup, part 25

Mostly excellent non-fiction in this installment. Includes Fantasyland, The Miracle of Dunkirk, Das Reich, The Undoing Project, Waiting for the Punch, Vacationland and Points of Impact.