I think op is referring to something you’re ignoring. Simple algorithms can often become quite gnarly if you can’t ignore some base assumption. I’ve seen some really elegant mathematics represented in a single equation turn into thousands of lines of code simply because reality means we can run out of stack space.
Similarly, I can tell you that dealing with ill formatted feed data, parsing any given value can be trivial, until you find some random example of data that abuses some seperator. Then suddenly you need to do thing like try seperating on X and see if you get data that looks right, else seperate on Y. Oh, and include some data (if it exists) from a prior seperation based on Z. I feel bad for anyone who has to modify my code. Hopefully they won’t ignore the unit tests that include all the gnarly cases...
> Similarly, I can tell you that dealing with ill formatted feed data, parsing any given value can be trivial, until you find some random example of data that abuses some seperator. Then suddenly you need to do thing like try seperating on X and see if you get data that looks right, else seperate on Y.
Yes, if you accept complexity, this is where you end up. The other alternative is to reject complexity. Stop accepting and trying to make sense of broken data.
At this point, we get back to my point because you'll say that someone (a stakeholder) demands that the program works with existing legacy/broken/misguided systems/users. Sometimes that is genuinely the only reasonable option, but all too often I see people introducing more and more features and complexity instead of figuring out whether it's really necessary or whether the intended end result can be achieved with less.
Similarly, I can tell you that dealing with ill formatted feed data, parsing any given value can be trivial, until you find some random example of data that abuses some seperator. Then suddenly you need to do thing like try seperating on X and see if you get data that looks right, else seperate on Y. Oh, and include some data (if it exists) from a prior seperation based on Z. I feel bad for anyone who has to modify my code. Hopefully they won’t ignore the unit tests that include all the gnarly cases...