3 ms·
I think every line of code is not intentional. People copy code, they make mistakes, there is emergent behavior. If you perhaps worked on a large system, like I
by NotSammyHagar 10y ago
I think every line of code is not intentional. People copy code, they make mistakes, there is emergent behavior. If you perhaps worked on a large system, like I have, databases, the database optimizers do things that you didn't necessarily intend. the plan choices often get pushed in certain directions that were not necessarily what you meant. I worked on a query optimizer, and I tried to model the cost of different kinds of scans and filters, say on ints, vs strings, vs floats. It turned out strings were getting picked a lot of the time, and my choices (my modeling, really), led us to priotize using string based indexes more. Certain bugs and limitations in cardinality estimation lead to accidental but fortuitiously good query plan choices that were sometimes lost (not chosen) when we fixed certain bugs, exposing other bugs.
I definitely believe things happen in large programs that no one really intended.