The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Tuesday, July 01, 2008

Proto-thoughts on “You aren't gonna need it” back before Extreme Programming hit the mainstream

Here's one of the rants I handwrote about a decade ago. I don't know … I think I may have lost my mind back then. There were a few bits I couldn't make out—I tended to be a bit lazy in the handwriting department, and I suspect I inherited my Mom's inability to write legibly.

The Lego™ Theory of Programming

Okay, I should point out that I have no idea what the following has to with The Lego™ Theory of Programming. It's not even close to what I understand The Lego™ Theory of Programming is today, and I have to question what I was thinking back then.

Hmm … I seem to be fisking myself here. But oh well, I'm having fun with this, and I can always claim to have changed my mind in the presence of more and better information.

Onwards …

This goes beyond the Theory of Software Reliability. Software Reliability simply states that software should be written with reuse in mind. This leads to the following Theorem:

Um, not quite. “Software Reliability” has nothing to do with “software reuse” and everything to do with “not crashing and losing a hours of work, or maybe a patient or two (or twenty-one).”

So, the names are bad. But not necessarily the theory itself.

The more general the subroutine, the slower it is, the larger it is.

Proof:

int a;
int b;
int c;

c = a + b;
anon a;
anon b;
anon c;

c = a + b;

if (typeof(a) == int && typeof(b) == int)
  c = intplus(a,b);
else if (typeof(a) == string && typeof(b) == string)
  c = strcat(a,b);

The more general the code, the more code is required to isolate the needed cases.

Proof of b)
larger: more code is required to isolate the particular case, or to extract the particular result from the general case.

Proof of [GD?] ([Anon?] B)

Code that isn't there executes faster than code that is executed. Duh!

I'm not sure if I would accept that as “proof” or not, although it does get the point across. And generally speaking, I'm not a fan of generalized code not because it bloats code, but because it complicates the code unnecessarily. And I'm not the only one who feels that way (link via flutterby).

I should probably expand my thoughts on this …

Obligatory Picture

[It's the most wonderful time of the year!]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2019 by Sean Conner. All Rights Reserved.