|
|
|
|
|
by jfreds
76 days ago
|
|
My issue with this is that a simple design can set you up for failure if you don’t foresee and account for future requirements. Every abstraction adds some complexity. So maybe the PoC skips all abstractions. Then we need to add a variant to something. Well, a single if/else is simpler than an abstract base class with two concrete implementations. Adding the 3rd as another if clause is simpler than refactoring all of them to an ABC structure. And so on. “Simple” is relative. Investing in a little complexity now can save your ass later. Weighing this decision takes skill and experience |
|
Sure maybe its fast to write that simple if statement, but if it doesn't capture the deeper problem you'll just keep running head first into edge cases - whereas if you're modelling the problem in a good way it comes as a natural extension/interaction in the code with very little tweaking _and_ it covers all edge cases in a clean way.