Microsoft Office 2000/Visual Basic Programmer's Guide   

At the Drawing Table

When you've gathered as much information as you can from your customers, sit down with pencil and paper and sketch out the initial design for the solution — the technologies to be used, the user interface, the organization of the code. Doing this not only gives you a basis to begin working, it's also likely to bring up all kinds of new questions that you need to ask your customers. Nailing down as many issues as you can before you start coding will save you time in the long run.

If your solution is complex, you may want to write a specification for it. A specification is a document that outlines your goals in creating the solution, discusses the details of the solution's implementation, and notes unresolved technical and design issues. It's a valuable document, both for you and for your customers, that helps you agree on how the solution will work before you begin creating it. It also provides you and any other programmers working on the project with a road map for the development process.

Of course, you may not be able to foresee every aspect of your solution's design ahead of time. As you develop the solution, you'll most likely learn new ways to do things, encounter unplanned obstacles, and refine your understanding of your customers' needs. The key is to create a flexible design, so that making a change doesn't send you all the way back to the beginning. For example, creating custom objects is a good way to build in flexibility. If you need to modify an object, you need to do so only once, within that object's class module. Using constants in your code is another way to make your code more organized and easier to modify.

If you suspect there may be a more efficient way to do something, indulge your intuition before you dive into the code. There's no point in re-creating the wheel if someone's already built the component that you need.