Coding is fun. It sure is easy to open up your favorite IDE and start banging away on a solution to a problem you think you understand. Resist the temptation! If you start coding without any sort of design, you'll quickly find yourself doing more work than is necessary.
What is Design?
In my mind, design is an explanation of the solution. More importantly, it is an explanation that is easily understandable. Really Good Developers probably have the design in their head as they're coding along. That's cool. But keep in mind that designs change and you will likely need to explain the design to someone besides yourself at some point. When that time comes, you could waste time drawing, talking and explaining the design to someone each time. Or you could whip out your design document, ask them to read it and come back to you later with questions.
Design Well
UML. That's what you're all thinking. UML is for design, right? Well, yes it is, but it is not something I would call easily explainable. Frankly, I think the best design is the one that works for what you are trying to explain. Do you need a flowchart? Use one! Class Diagrams? Create them, but don't get too hung up in notation. A random picture? Draw it! Words? Keep them brief.
Words can be a problem. Don't write a book to explain your design. Language is ambigious to people, so there is not point in putting a lot of verbiage that will just be misinterpreted anyway. You could try to be really precise, but then you would write something long and boring that no one would read anyway. Be brief, to the point, and then draw something.
For most of my designs, I prefer to sketch them out on paper and then just scan them into the computer. Scanners are cheap. You can even throw the PDF of the scan into your source repository.
So, don't just start coding. Think about it first.
Technorati Tag: softwaredevelopment
August 11th, 2006 at 5:47 am
I prefer using mindmapping software.
It works great to explain and organize the design.