4 ms·
What's your longest-held programming assumption that turned out to be incorrect?
- ntoshev 17y agoI used to think there is One Good Way To Program without realizing there is a lot of cargo cult in the best practices out there. Even the ones that used to do a good job are often invalid in a different context.
- jacquesm 17y agothis is going to be a long long list... - 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...
- quality 17y ago...That you should do only a bare-bones implementation for one part of the program, while simultaneously making other parts ultra-sophisticated - presumably because the other parts are more interesting or more necessary for a wishy-washy long-term goal. 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.)