(Note: you can substitute the word “function” or “web app” wherever you see the word “program” in the following– it all applies.)
1. Understand the Problem.
Make sure you are solving the right problem (there’s no substitute for understanding).
If the problem description does not include an I/O specification, design one yourself: what will the program look like when it runs– what will it need for input and what will it produce as output?
2. Write an Algorithm
Sketch out a set of steps to solve the problem. Use scratch paper, an old envelope– whatever’s handy.
You’re done with this step when your convinced you have a good idea of how to solve the problem.
3. Write a Program.
For us, that’s JavaScript. This is the coding step, so head for the computer.
4. Test the Program.
Is one test ever enough? No way. Test it until you know it works.
5. Deliver the Program to the Client.
Deliver a correct, well-documented program to the client, on-budget and on-time, and success is yours!