Summary
Specific-purpose code can quickly become messy. But overly general code can add unnecessary complexity. This post, obviously opinionated, argues for a middle ground.
Instead of being too specific or too generic, you build something flexible, simple, and clear. This approach is great because: You’re not adding extra methods for every possible removal condition. Instead, use one method (RemoveItems) Pass a condition that defines what to remove.
Vehicle Rental System – Predicting the Future Wrong with Bad Abstractions. It’s clear, clear, and doesn’t add complexity with external filters or rules.
In the world of business, it is not unusual to see a company or company that has a large number of employees. The company that makes the most money from its employees is often the one that has the most employees.
Find the balance. Create flexible, general-purpose code. It should allow for future changes but avoid over-engineering. Focus on the problem at hand. When it’s time to extend the system, your code will be ready for it.