Sunday, August 17, 2008

The Laws of Computer Programming

When I was a kid... don't remember exactly how old, probably around 16, I got my first computer, the Apple ][+ (isn’t that cute, the way they make the II out of those brackets?) and I was forever hooked on these magic machines that will do whatever you say, as long as you know how to say it. (My second computer was an Apple //e — more cleverness on the part of Apple, using the cute little slashes.)

Somebody – probably my maternal grandmother – got me a computer-themed coffee cup. Yeah, I didn’t drink coffee at the time (“kids don’t drink coffee”) but I’m sure she thought I would find it amusing. Naturally, I did find it quite amusing... although at the time, I didn’t have enough computer experience to know just how unbelievably true all of these things are.

Despite the fact that I have moved from one house to another 16 times (yeah, I just now counted) this cup has suddenly surfaced. Its thoughts are still just as amusing today as they were when the cup was made... which according to the label was 1982 — quite literally, the horse and buggy days of personal computers.

The Laws of Computer Programming:
  • Any given program, when running, is obsolete.
  • If a program is useless, it will have to be documented.
  • If a program is useful, it will have to be changed.
  • Any program will expand to fill available memory.
  • The value of a program is proportional to the weight of its output.
  • Program complexity grows until it exceeds the capability of the programmer to maintain it.
  • Make it possible for programmers to write in English and you will find out that programmers cannot write in English.
  • “Weinberg’s Law” — If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
  • “Hare’s Law of Large Programs” — Inside every large program is a small program struggling to get out.
  • “Troutman’s Programming Law #1” — If a test installation functions perfectly, all subsequent systems will malfunction.
  • “Troutman’s Programming Law #2” — Not until a program has been in production for at least six months will the most harmful error be discovered.
  • “Troutman’s Programming Law #3” — Job Control Cards (punch cards! ...think CDs, backup tapes, installation disks, etc.) that cannot be arranged in an improper order ... will be.
  • “Troutman’s Programming Law #4” — Interchangeable tapes ... won’t.
  • “Troutman’s Programming Law #5” — If the input editor has been designed to reject all bad input, an ingenious idiot will discover a method to get bad data past it.
  • “Troutman’s Programming Law #6” — Machines work, people should think.
  • “Golub’s Law of Computerdom #1” — A carelessly-planned project takes three times longer to complete than expected; a carefully-planned project will take only twice as long.
  • “Golub’s Law of Computerdom #2” — The effort required to correct the error increases geometrically with time.
  • If computers get too powerful, we can organize them into a committee – that will do them in.

— 2008-08-30 10:30 ETA:

This is ironic. As I look back at the last couple of weeks (and really, some period of time before that) I’ve been in a funk. I knew it at the time, but didn’t know what caused it. I’ve discovered the cause:

Nothing.

No, seriously. What I mean by that is that I wasn’t stressed, depressed, or otherwise obsessed with any particular thing, person, or event. I do think I had been pushing myself too hard, spending too many hours awake — at the computer, playing; at the computer, working; talking on the phone; moving into my new house — I was giving 99.467% of me to everybody else and the 0.533% remaining wasn’t worth having. :)

But what started me on this little ETA was the fact that on the day before I wrote this post, my computer rolled over and died. Most people I know, both at work and in my personal life, consider me their “resident expert” on all things computer-related, despite my set-in-something-that-looks-like-stone policy, stated at the top of the screen: “No, I will not fix your computer.”

I was watching TV on my media center, and importing video of Jenny from my camcorder... two activities I’ve done many times before, without any problems. On that particular day, I was minding my own business when Media Center locked up. Frozen. And there was no escaping to “task manager” or anything of the sort. This computer is under a year old. Pretty much like a car, when you reformat and reinstall Windows [rebuild the engine] the age of your computer starts back at 0.

The hard drive light was lit up solid, but I wasn’t hearing any activity.

Reboot:

“No bootable devices found.”

Come again?

I tried every tool in my toolbox, only to figure out that my hard drive (age uncertain, probably 2-4 years) was utter toast, and there was no recovering it. It wasn’t the contents... it was the actual drive itself. DOA. The specific technical terms for what was wrong:

The hard drive’s controller was recognized by the bios, but the hard drive’s mechanical parts were making sounds officially described as “schwink... thrrrrrr... schwink... thrrrrrr...” ad infinitum.

I had another drive, still shrink-wrapped (doesn’t everbody?!), and I was able to reinstall Windows to the new drive, and recover all 50 gigabytes (!) of my personal data from my backups. (Note to you: you absolutely, positively, need to back up your files, to an off-site location. When your files are gone, they are gone.)

Here’s my point in writing this ETA:

The original post was written the day after the crash and beginning of the drawn-out process of reinstalling all of my software (you should never, ever, ever try to restore your software from backups — always reinstall from the original media) and recovering my personal data, yet for some reason, especially in this context, it doesn’t appear that I actually mentioned that fact. Wierd.

1 comment:

Anonymous said...

“Troutman’s Programming Law #6” — Machines work, people should think.

You would think huh?
"m"