Re:The Fallacy of Premature Optimization (2009)
by SolaceQuantum on Tuesday December 31, 2019 @11:48AM
(#21922384)
IMO part of this is that nuanced processing is actually a very expensive operation and people would be unable to function without some level of abstraction- language as in all things. That's why, for example, Jeff Vandermeer writes in his Wonderbook that each author has a "thorn", something that bugs them and compels them to write and explore infinite nuances of the topic of their focus.
I think this also makes sense. Take a cat. Cats clearly are able to think a lot more complex than they can communicate. They use a set of very basic body cues to communicate, but they are able to process information a lot more complex than these. Why would this not be like this humans too?
I have some very opinionated friends on coding styles, libraries, programming languages, programming "rules", "principles" etc... They're all sort of rubbish. I think it's important to know and study them because they give you different ways to think of engineering. But when it's time to commit code to production does anyone really think about "ah this is not DRY, premature optimization, NIH etc...". I claim no. We always think about the specific situation. Is it good to invent this code. Is it good to optimize this possible future extension. Is it good to repeat this particular code. We all know repeating code is "bad" but we all also know reasonable exceptions.
So yes, all rules are by nature fuzzy. In fact, whenever someone tells me a principle they hold, I immediately start thinking about fuzzy-fying it i.e. thinking of possible niche cases where this principle would reasonably NOT hold.