Comment by jamesfinlayson
1 day ago
I haven't worked at that many companies to have an informed opinion, but I've certainly been at a couple of places where smart people went along with ridiculous complexity, but part of the reason was there was already a hugely complicated mess with way too many people working on it for a simple solution to be politically feasible.
While the post seems simple, it's arguably complex, as the comments here point out.
Simple solutions are good enough some of the time, perhaps even most of the time, but often fall down with edge cases. But edge cases add up, and dealing with them is complicated.
For example, calculating pay for hourly paid workers is a "simple" problem. Deduct start time from end time and multiply by rate. Covers 90% of the workforce.
But the other 10% take much more work. That team that rotates an on-call worker (which earms an allowance), who gets a call (first hour is free, next is double time etc.)
So it is with software. Adding 2 numbers is trivial. But what about overflows? What about underflows? What if one number is infinity? What if it's i?
The simple solution is "just add, ignore edge cases". The complex solution handles the edge cases. Which is better in the long run?
Essential complexity is a class full of methods to compute your complicated payroll.
Unnecessary complexity is a microservice architecture to do the same thing.
I think it's important to understand the domain to know if those edge cases are likely to happen. If no one on payroll is ever on call, then no need to design for that. Solution works as intended. If it turns out we need a more robust calculator later, then we can design for that. But adding that complexity before the domain requires it seems unnecessary to me.
But also, just because there is complexity in the domain doesn't mean there needs to be complexity in the software. An elegant, simple solution could be implemented for calculating payroll or adding infinity. That's the hard part though.
This is true, I think there's also quite a lot of folks sticking their head in the sand about complexity. Software should be as simple as possible _but no simpler_, yet I see a lot of people floating "simple" solutions that don't actually meet the requirements. By all means be skeptical of requirements, but disregarding them without any work to remove them, is just bad engineering.