annathyst: (Default)
Anna ([personal profile] annathyst) wrote2006-02-08 10:36 pm
Entry tags:

Pithy principles of programming that I've learned this year, so far

1) It is better to seek forgiveness than to ask permission. (Don't check to see if you can do something before trying to do it, because the answer might change under you.)
2) Laziness is a virtue. (Delay calculating values until you actually need the values)
3) Adding another layer of indirection solves everything. (I don't really have a pithy explanation of this, it's just true.)
4) Just because something is impossible doesn't mean it can't happen.
Corollary: Impossible behavior is your runtime screaming at you to pay attention. Ignore or work around it at your peril.

Is this worth expanding on? Am I just being overly pretentious? Should I go into more detail about situations that gave rise to these?

[identity profile] stargazer.livejournal.com 2006-02-10 03:31 am (UTC)(link)
I SAID DON'T ASK! But okay, fine. It's actually exactly the story you'd probably guess: the Knowledge Base that I work for has actually been around for a long time. It used to be just text files on a common machine, and then it was served over Gopher. So when someone first wrote a search engine for it, off-the-shelf solutions weren't really available. And we've just been porting it forward ever since.

We'll replace it someday, but first we have to make sure our mission critical machines aren't going to die tomorrow....