Simple Design Steps (Think, Design, Code)
- Brainstorm about what the application/system will do
- Write down some goals
- Develop some requirements
Requirements are very hard to write.
Requirements are "what to do" rather than "how to do" something.
- Develop a preliminary design
Do not code yet. Design on paper. For example:
- what data is available; what is its format
- what data is output; what is its format
- what data structures to use
- what web pages might look like
- ...
- Prototype to make sure you understand how to do things
This allows you to test ideas about how to do things,
especially things that you have never done before.
Prototyping may show that you need to change the design or
even the requirements.
- Code the design
Do not change the design while coding unless absolutely forced to
(You can change the design later). It is better to have
something that works rather than something that is constantly
changing that never works.
Do not code the whole thing at once. Break the project down
into small tasks that can be coded and tested.
This will test your code,
and validate your design. This may also cause you to change the
design if something is very wrong.
Create a Collection of Code Snippets
Code snippets are code that:
- Help you solve problems on the next project.
- Help you answer the question, "How did I do that last time?".
- Helps you "not reinvent the wheel".
- Reuse code.
As your collection of code snippets grows,
it is important to document what it is and how
it works for next time.
Small (and sometimes large) programs can be put together like LEGOs with
code snippets. Sometimes little or no change is required.
Cutting and pasting (good code snippets) can speed up development,
especially for common capabilities.