I’ve learned enough to begin writing programs from scratch, but I’m running into the problem of not knowing how to design the layout and implementation of a program. To be more precise, I’m having difficulty finding a good way to come up with an action plan before I dive in to the programming part. I really want to know what classes, methods, and objects I would need beforehand instead of just adding them along the way.
My intuition is leading me to using some kind of charting software that gives a hierarchal view of all the classes and methods. I’ve been using OmniGraffle Pro and while it does seem to work somewhat, I’m still having trouble planning out the program in its entirety.
How should I approach this problem? What softwares out there are available to help with this problem? Any good reads out there on this issue?
Thanks so much!
Edit: Oh yeah, I’m using Eclipse and I code mainly in Java right now.
I wouldn’t worry about the charting aspect. I would try and document all the entities that you’re going to need, and everything that they’re going to do. In the simplest case, every noun will be a class, and every verb will be a method.
This is a very basic approach, and what you’re asking for is some analysis methodology. Whole books have been written on this and it’s a substantial topic.
You can take an alternative approach and adopt an agile methodology. In this you solve one particular problem (a sub-problem of your ultimate goal), and then refactor (perhaps heavily) as you solve further problems. As you code you write and maintain unit tests such that your refactoring don’t break your existing code. You have to be prepared to throw away work that you’ve done but it’s a powerful technique that means you get something up and running early, rather than relying on a big-bang approach.