< Previous | Contents | Next >
Your programming plan might not be finished after only one draft. Often, pseudocode needs multiple passes before it can be implemented in programming code. Stepwise refinement is one process used to rewrite pseudocode to make it ready for implementation. Stepwise refinement is pretty simple. Basically, it means, “Make it more detailed.” By taking each step described in pseudocode and breaking it down into a series of simpler steps, the plan becomes closer to programming code. Using stepwise refinement, you keep breaking down each step until you feel the entire plan could be fairly easily translated into a program. As an example, take a step from my master plan to make a million dollars:
Create an infomercial about your product
This might seem like too vague of a task. How do you create an infomercial? Using stepwise refinement, you can break down the single step into several others. So it becomes
Write a script for an infomercial about your product Rent a TV studio for a day
Hire a production crew
Hire an enthusiastic audience Film the infomercial
If you feel these five steps are clear and achievable, then that part of the pseudocode has been thoroughly refined. If you’re still unclear about a step, refine it some more. Continue with this process and you will have a complete plan—and a million dollars.