5 ms·
I'm really torn by this article. Part of me wants to dispassionately bark, "They should have obeyed the Single Responsibility Principle and the Open/Closed Pri
by mcantor 17y ago
I'm really torn by this article. Part of me wants to dispassionately bark, "They should have obeyed the Single Responsibility Principle and the Open/Closed Principle from the start!" and coldly click on to the next link that tickles my fancy. But another part of me feels an inexplicable sympathy for the original developers here. Everyone has worked on that one app or library that organically evolved into a monster.
I almost feel like it's impossible to "judge" what happened as described by the author without understanding more context: How brutal were the requirements changes? Could they have been predicted? How much was the app designed before that fateful first revision was written?
I think this also has to do with the framework or language being used. If the app was written in Python, maybe it would have been less ridiculous to create an explicit "fix our stupid mistake" TimeDelta and pass it around. I definitely think that someone, at some point, should have had the sense to take a step back and say, "Maybe we shouldn't be fixing this by manually modifying the second count and checking for DST edge cases." The libraries exist for a reason, but without knowing which one they were working with, one can't really say definitively what they "should" have done.
In summary, it sucks that the author FTA has to deal with this date/time kluge that he didn't create, but... that's software development.
- roc 17y agoAnything that was worth writing will grow and change. It only grows into a monster if you allow yourself to write duct tape code.
- mcantor 17y agoI was meaning to imply more than I did by saying "organic". IMHO, "organic" growth spells disaster for a codebase, because it means (to me, specifically) growing without conscious curation on the part of the developers. I should have explained myself fully instead of using such a loaded word; it seems that the only question these developers asked was "How do I make this new feature work?" instead of "How does this new feature change the silhouette of my application?"