Hacker News new | ask | show | jobs
by 9rx 59 days ago
If a choice comes down to simply guessing about the future then it isn't an important property of the system and therefore it makes no difference which algorithm was chosen or why. You are right about that being a premature optimization, but that equally applies to trying to decipher "why". When the future comes and an important property emerges, the historical "why" won't even matter as it wasn't rooted in anything relevant.
1 comments

The load-bearing word in my original comment is could.

An experienced developer will often have a good intuition about what might deserve attention in the future but isn't worth the effort now.

It's also useful for social reasons. Maybe the CTO wrote the original code and a junior developer working on the optimization thinks they know a better way but isn't sure about questioning the CTO's choice of algorithm. A comment saying it was arbitrary gives them permission.

> Maybe the CTO wrote the original code and a junior developer working on the optimization thinks they know a better way but isn't sure about questioning the CTO's choice of algorithm.

If changing the algorithm is going to negatively affect the program then the CTO would have written tests to ensure that the important property is preserved. There is really no reason for the junior to be concerned as if he introduces an algorithm that is too slow, for example, then the tests aren't going to pass.

Yes, it is most definitely possible the CTO was a hack who didn't know how to build software and the junior was brought in to clean up his mess. However, in that case the information is simply lost. An LLM will not be able to recover it, but neither will a human.