| YUP My first rule of software programming is: Work Hard to Avoid Writing Code — Code is habitat for bugs; more code equals more bugs, and interactions between separate parts of code can harbor even more "interesting" varieties. — Code takes time to run. Any NoOp is faster than even your best hand-tuned assembly module. Obviously, this is not absolute in any sense — it breaks down as soon as you need the system to actually do something, at which point you must write some code. But it should be the minimal amount to get the job done, and nothing more. Obligatory car analogy: While doing some amateur sportscar racing, a coach asked me "What are the things you do that slow the car down?". I thought for a moment and started saying "when I start into a corner, if I do a bit too much...", he interrupted saying "NO, no, what are the BIG things you do that slow the car down?". "Oh, like braking and turning and lifting off the throttle?". "Right. So what that means is that you should always avoid doing those things. Obviously, you will certainly have to so some of them as soon as you approach the end of the front straight after the start, but make sure you understand your car, the track, and your skills to the point where you do only the absolute minimum." Both the software and sportscar versions are deceptively simple — they take a LOT more thinking than it seems at first glance. And that thinking is totally worth it. |