How can I start designing my program on paper without over engineering things?
design-patterns, oop, paradigms, uml
Solution
I try to split the problem usually into two different issues:
- who is involved (this are good candidates for classes)
- what is happening (similarly, this tends to be good methods, and also things that one might want to focus on to establish performance requirements).
For example: when searching for the cheapest car inside a set of possible cars, I'd identify 'cheapest' as something that probably wants to be a separate function, as I may want to change the conditions later, or apply it to SUVs as well, and 'car' and 'set of cars' sounds like good candidates for classes that I'd need in the problem domain.
To establish those:
- search for verbs in the problem description: those make methods
- search for nouns in the problem description: those make classes
- find the constraints, and what they are relevant for: is cheapest a property of something, or rather a result of an operation?
Eventually I move from drawing those relationships further to pseudo-code and small prototypes to play around and learn what other unknown constraints appear in the problem description.
Problem
I'm interested in starting to properly design my software on paper before I ever start coding. What is the standard approach for this? I'm thinking something along the lines of UML but I feel that it's a bit overkill for a one-man project. What are some of the things professionals say is best to do when developing hobby projects? Anticipating the votes to close as usual, this isn't argumentative. It's a clear cut answer, and I'm expecting something established. :P