4 ms·
Everyone does lip service to simplicity, but in reality simplicity is really difficult. If you have seven conditions driving a decision, a bunch if's might be
by goto11 4y ago
Everyone does lip service to simplicity, but in reality simplicity is really difficult.
If you have seven conditions driving a decision, a bunch if's might be the simplest implementation. If you have hundreds of conditions, a tree of if's becomes impenetrable. There is no one-size-fits-all when it comes to simplicity.
Some problems are inherently complex. You can't design a payroll system or tax calculation system which is simpler than the set of rules and regulations it has to implement.
- lupire 4y ago> If you have hundreds of conditions, a tree of if's becomes impenetrable. I mean, it worked for Amazon. I saw the code.
- goto11 4y agoFair enough, but you probably wouldn't call is simple.
- commandlinefan 4y ago> a tree of if's becomes impenetrable Even in that case, a tree of if's isn't that bad (it's not great), but far worse is when you have the same set of if statements copied and pasted around dozens of places. Because you will forget to update one of them at some point.