I may have mentioned this before but someone recently posted Rob Pike’s 5 Rules of Programming. The rules are simple and beautiful, almost obvious, but very often ignored. The five rules can be condensed into three principles:
- Your intuition stinks. If you’re not measuring program performance, you’re flying blind.
- Complicated algorithms are generally not worth the overhead.
- Data structures, not code are the secret to good programs.
The five rules drill down on those principles a bit and are worth printing out and putting up besides your monitor. As I say, we all tend to forget them and it’s almost always to our detriment. When guys like Pike, Brooks, and Thompson recommend a course of action, it behooves us to pay attention.