Code Testing and Validation
The software development process has five phases: What (Analysis), Do It (Implementation), Test (Testing and Debugging), Use (Operation or Deployment), and Maintain (Refinement).
From Idea to Working Program
Writing software is not a single action. It is a structured journey from an idea to a working program that solves a real problem. A clear development process helps you avoid building the wrong thing, discovering important bugs too late, or creating code that is difficult to maintain and extend.
The process has five phases: What, Do It, Test, Use, and Maintain. Each phase has a distinct purpose, and together they provide a roadmap for developing software.
The Five Development Phases
The What phase is Analysis. You determine what the program should do and clarify the problem it must solve. The Do It phase is Implementation. You create the program that carries out the plan. The Test phase is Testing and Debugging. You check the program, find errors, and correct them. The Use phase is Operation or Deployment. You use the program on real data or in its intended setting to verify that it works as needed. The Maintain phase is Refinement. You improve the program based on what you learn from testing and use.
| Phase | Alternative name | Main purpose |
|---|---|---|
| What | Analysis | Determine what the program should do |
| Do It | Implementation | Build the program |
| Test | Testing and Debugging | Check behavior and correct errors |
| Use | Operation or Deployment | Use the program in its intended setting |
| Maintain | Refinement | Improve the program based on what is learned |
The five phases and their purposes
The Do It-Test-Use Cycle
Although all five phases belong to the complete process, the practical way to build a program is iterative. Instead of trying to create the entire program perfectly in one attempt, build a simple version, test it thoroughly, use it to verify that it works, and then add another feature. The cycle repeats as the program grows.
Adding features incrementally
Plan the growth of a small program that records daily expenses.
First Do It step: Build a simple version that records one expense.
First Test step: Test the simple version thoroughly so that its basic behavior is checked and fundamental problems can be found early.
First Use step: Use the working version with real expense information to verify that the basic approach is useful.
Next iteration: Add a feature for recording multiple expenses, then repeat testing and use before adding another feature.
The program grows through checked increments rather than through one large attempt. Each stable version provides a foundation for the next feature.
A simple first version reduces risk. It lets you validate the core approach, test more easily, catch fundamental problems early, and make corrections before investing time in complex features.
Testing Before Real Use
Testing is the phase in which you run the implemented version with test data to check for errors. Debugging addresses the problems that testing reveals. Use comes after this check: you apply the program to real data or its intended setting to verify that it works in practice.
The distinction between Test and Use matters. A feature can be implemented without being reliable. Testing provides a deliberate check before the program is used in its intended setting. Use then shows whether the checked version works with real data or in the situation for which it was built. What you learn from testing and use informs the Maintain phase and the next development iteration.
Planning a Small Project
The five phases can guide even a small programming project. Consider a program intended to organize a set of personal tasks. The following plan is an application of the phases; it is not a claim that the source material specifies this particular program.
A phase-by-phase project plan
Apply the five phases to a simple task-organizing program.
What: Describe the task-organizing problem and decide what the program must do before implementation begins.
Do It: Build a simple version that provides the planned behavior.
Test: Use test data to check the simple version and correct errors found during testing.
Use: Use the checked program with actual task information to verify that it works in its intended setting.
Maintain: Refine the program based on what testing and use reveal, then plan the next iteration.
The project has a clear sequence, but it is not a one-time march to completion. After refinement, the next feature can begin another Do It-Test-Use cycle.
Mistakes That Weaken the Process
Trying to build the complete program in one attempt
Complex features can hide fundamental problems and make debugging harder.
Fix:
Build a simple version first, test it thoroughly, use it to verify the approach, and then add features incrementally.Treating implementation as the entire development process
The development process includes analysis, testing, use, and refinement as well as implementation.
Fix:
Use the five phases to give analysis, implementation, testing, deployment, and refinement their own purposes.Skipping testing because the program appears to work
A feature can be implemented while still containing errors.
Fix:
Test and debug the version before using it in its intended setting.Treating maintenance as unrelated extra work
Maintenance is the refinement phase and provides the starting point for future improvement.
Fix:
Use what you learn from testing and use to refine the program and begin the next iteration.
Practice the Planning Sequence
Choose a small programming project and write one planning note for each phase: What, Do It, Test, Use, and Maintain. Then identify the first simple version you would build and the next feature you would add after testing and using it.
Hints
- Keep the first version small enough to test thoroughly.
- Separate what the program should do from how you will implement it.
- Describe what evidence from testing or use would lead to refinement.
What do you think happens?
After you build and test a simple version, what is the recommended next move?
Reveal answer
Answer: Add features and repeat the cycle
The recommended approach is iterative: build a simple version, test it thoroughly, verify it works, and then add features and repeat.
A Reliable Development Rhythm
- The five phases are What or Analysis, Do It or Implementation, Test or Testing and Debugging, Use or Operation or Deployment, and Maintain or Refinement.
- The Do It-Test-Use cycle builds a program through repeated, checked increments.
- A simple first version reduces risk because it validates the core approach and makes fundamental problems easier to find.
- Testing checks an implemented feature before real use, while maintenance uses lessons from testing and use to guide refinement.
- A small project can be planned by assigning a clear purpose and deliverable to each phase.
Key Takeaways
- The software development process has five phases: What, Do It, Test, Use, and Maintain.
- The recommended building strategy is iterative: implement a simple version, test it, use it, and then add features.
- Testing and debugging check a version before it is used in its intended setting.
- Maintenance turns lessons from testing and use into refinements and the next development iteration.
- Applying the phases to a small project creates a structured plan from requirements through refinement.