I was lurking in my favorite IRC channel today, and not-so-calmly
read as a fellow user blathered on about wanting to provide useful
exercises to help inculcate a better eye for abstraction. Now, while
as explained in this form, I see no problem with this, one of the
other denizens of the channel raised a minor objection to the idea
as being in a way, the opposite of abstraction, to which the original
fellow replied with how it wasn't, since "abstractions leak." Now,
I know for a fact that this person is miles ahead of me in every
positive way to measure computer skill, and better off in many other
ways not relating directly to said skill (i.e., I'm sure the person is
younger, fitter physically, and likely more handsome than I).
However, there is one place where I have him beat - this is my blog
- and I'm going to unfairly exploit my tiny advantage as far as
possible, starting with reiterating my title:
Abstractions Always Leak - DUH!
First off, I want to make sure I'm being clear: I'm not trying
to insinuate that this fellow is any less knowledgeable than I am;
I think I made it clear that he is miles ahead of me in CS
knowledge, technical ability, scholastic achievement, academic
talent and industrial usefulness. I'm just using his remarks
completely out of context as a means to spout off on a topic
only tangentially relevant to his remarks, and utterly underestimating
his understanding of the topic. Remember, I've already stated:
I'm the dumb one in the line-up. Also, once again: this is my blog.
His is much clearer, relevant, enlightening and fun to read.
Okay, now that I've wasted everyone's time with all of my caveats,
let's go back to my original point: abstractions. They leak. Duh.
To start, abstractions are metaphors. They are encoded means of
make-believe and pretend. They are "what-if" in software form.
As such, they are meant to go so far in the world of "let's pretend",
and no farther. Unfortunately, most of the software industry is
based on folks who don't know what they want in software, and
are at times talented enough to craft some that works well enough
at a task that other people are willing to pay for its use. Part of the
fun of Computer Science (yes, yes, it isn't really about computers
as such, but what can be done with one) is finding out how far we
can push the abstraction and when it "leaks", how does it leak,
and why. The most important part about finding where the leak
begins in that we can put up a nice friendly sign and warn people
"here there be Monsters!", i.e. "Just (Don't) Do It". Those are the
two most important things to know about an abstraction, or
a metaphor in general, how it applies, and how it doesn't. When
you tell someone "it's raining cats and dogs," you have to know
stepping in a poodle is a joke, otherwise it isn't funny, except
to others laughing at you. Even then, it isn't really that funny, 'cause
you'd have to be an alien, or a Turing Test-flunking computer not
to recognize that old joke.
But I digress.
So, I guess there are three main points to a metaphor, what's
the comparison between, how does it hold, and where does it leak.
Then you can figure out how you can rely on it to give you good
answers about the first thing, or on something else entirely that
uses a useful characteristic.
Just watch out for those leaks. You don't want to step in a schnauzer.
What is a photon?
1 week ago