I have been going through various system design examples to understand how we approach any system design question. Here is what I have understood till now.
- Know the system first and find out how it works.
- Think of all use case.
- Identify key components and their responsibilities.
- Connect all the components so that they can communicate to each other.
- Use all standard practices while integrating components and if possible use standard design patterns.
Sometimes we make assumptions about the system, so those assumptions should be used to remove one use case or to add a variation.
I will put this question in context of Parking Lot design.
If I assume that Parking Lot is not commercial, and it is free parking lot, then design of parking lot should handle free parking lot as one of use cases , and it should be generic. OR Simply design parking lot which will never work for Commercial parking lot.
Main idea is that if someone asks you to design a parking lot and that is free parking lot, then design should be generic or specific?