“In programming, the hard part isn’t solving problems, but deciding what problems to solve.” – Paul Graham
I am fortunate enough to work with new, genius, competitive developers who have fresh perspectives. They often talk about faster algorithms, data structures, new-generation technologies, and buzzwords in the software industries. They are eager, motivated and wanted to change the world!
However, I did not hear from them about problem-solving using object-oriented analysis and design.
Some people try to solve the problem by directly jumping into programming solution without doing an analysis. They believe in trial and error methods. It’s like solving problems without knowing what problems to solve.
The well-proven OOAD techniques are there for decades, It’s a very beneficial technique for problem-solving. They will help you to know what problems to solve.
We should focus on what problems to solve rather than just writing the code.
IMO, we should start slowly to finish fast. What I mean here is, we have a problem at hand, divide it into three parts: Analysis, Design, and Programming.
These three are related terms.
The object-oriented analysis is meant for understanding the customer problem. Write use cases to capture what is needed and what is not. You can write lightweight use cases. Thus, you’ll focus on what is needed than trial and errors.
Benefits of writing use cases!
The next step would be the object-oriented design which emphasizes on designing the conceptual models i.e. classes to achieve the various use cases.
This classes will have attributes and behaviors. They interact with each other to solve the problem.
Try using outside in approach, class diagrams, sequence diagrams. You could use the whiteboard to evolve your conceptual design that tries to solve the customer problem.
Object-oriented thinking, the big picture!
Then comes the programming phase. Now you know “what part” of the problem and conceptual models, you can focus on how part i.e. coding.
The good analysis and design would help you to understand problems to solve, prepare good conceptual models, that intern leads you to good programming solution for the problem at hand.
Remember, don’t directly start coding without understanding the problem to solve.
Instead, use object-oriented analysis and design.
Start slowly to finish fast.