What's your longest-held programming assumption that turned out to be incorrect?
stackoverflow.com
stackoverflow.com
- being able to out-optimize a compiler (that one hurt, I attribute this to the fact that modern processors are so complex it takes a machine to correctly figure out the best way to schedule code, on a simpler processor a programmer has a much better chance of beating the compiler by being able to spot global optimizations)
- thinking that any program can be written in almost every language (theoretically yes, but in practice this really does not hold water, especially not with all the domain specific languages that are now popping up everywhere)
- thinking that I could do a piece of code 'right' in one go (over the years, reviewing old code I see room for improvement everywhere)
- that I am a pretty hot shot coder (I'm sure I'm alone on that one)
and so on...
Now I've realized that the #1 thing is that every piece of code should provide good user value and justify its presence, even if the code itself is written in a simplistic or unattractive way.
(My second longest-held assumption is that I should be "efficient" and write great code once and forever that will solve all my problems for some domain. It never happens, and these days I'm more patient and happy to see possibilities for improvement down the road.)