In my experience it's not the small stuff that kills you: so I iterate over an array rather than caching by ID. Maybe that matters, maybe it doesn't, but it's easy enough to fix if it does.
It's the big stuff that kills you: a snakes nest of dependencies with spooky action at a distance will never be easy to optimize or change. Focusing your design on simplicity of implementation and regularity of interface (in that order) gives you the best shot at reacting to what comes down the road later. And, as you say, it's appears to be experience that gives you the ability to recognize the simplest approach that isn't dead wrong.
http://www.jwz.org/doc/worse-is-better.html
So, basically, beyond not doing anything egregiously stupid, I'm not sure I agree with the general point of the author, at least in the domains I work in (a programming language and web applications).
It's the big stuff that kills you: a snakes nest of dependencies with spooky action at a distance will never be easy to optimize or change. Focusing your design on simplicity of implementation and regularity of interface (in that order) gives you the best shot at reacting to what comes down the road later. And, as you say, it's appears to be experience that gives you the ability to recognize the simplest approach that isn't dead wrong.
So, basically, beyond not doing anything egregiously stupid, I'm not sure I agree with the general point of the author, at least in the domains I work in (a programming language and web applications).