0_Unsorted_Convert switch statements into classes.
- Easy to change. When change is needed, it should be done in one place instead of multiple places.
- Easy to debug. Problems should be easy to find.
- Easy to read and understand.
- Small functions. Split big functions into multiple small functions, split big process into small steps.
- Single responsibility. Every function should do only one task.
- Prefer composition over inheritance. Credits to this stackoverflow answer.
- Loose coupling of components.
- DRY ( do not repeat yourself). When value is used multiple times, it should be assigned to a variable.
- to make the code understandable
- Everything from the "Flexibility" section supra.
- Prefer meaningful variable names instead of comments.