Friday, March 4, 2011

Architectural Notes

These are just a few things related to programming I've been thinking about.

  • There's rarely a right answer; if you're fortunate, there will be an obvious choice with fewer trade-offs.

  • Design is very subjective. If you give a problem to five programmers, you will get five different implementations, and it's quite possible that all of them are good. Every carpenter knows that a dovetail is the strongest joint, but the curve of the chair's back, the spread of its legs and the finish of its grain are all judgement calls that go into making something elegant but practical.

  • Programming is a craft, not a science.

  • Expect to do one major refactor of any project or feature. It's OK---you had no way of knowing that what you thought you needed at first wasn't what you actually needed, and your first attempt will finally give you a standard for comparison to create what you actually needed to begin with.

  • Code something with the simplest solution possible without ignoring extensibility or flexibility. Worst case, you have to do a major refactor, which is quite nearly inevitable, anyway (see above point). Best case, the solution works and you're done. Either way, you didn't spend more time than was necessary.


All things considered, this means we're the blue-collar workers of the future. I hope you're OK with that.

No comments: