Testing ? Yes. that was really what most of us did after coding.
Wait a minute, there may be something worthy of your effort before testing the code you written.
That is , in briefly, CODE INSPECTION.
so what is code inspection?
code inspection, in literraly, means inspect your code carefully even before testing your code. It has been proved that best inspections would yield stunning results. Data from many IT service providers such as IBM, AT&T and HP show that code inspection imporves software quality significantly. (refer to Ganssle’s website for more information)
How TO
Now you may wonder how to put the code inspection into practice.Follow me step by step
step one: the inspection team
A well organized inpsection team do help in the process of code inpsection. Normally, there exist four roles: Moderator, Reader, Recoder, and Author of the code.
Moderator, who must be competent technically, leads the process of code inspection. Note that the project manager may not be a good choice to act as a moderator, for the author of the code is unwilling to show his senior the defects of the code.
Reader extracts the meaning of code, and try his best to find bugs and defects in the code.
Recoder fills checklist for code inspection to record defects found.
Author’s role is to illuminate the unclear code and understand bugs found.
Step Two: Process of Code Inspection
Planning: The moderator makes a plan for the inspection and distributes “to do” lists to the member of the inspection team.
Preparation: In the case where members in the inspection team are not familar with project, the author must provide backgroud to them. Also, members in the team must have a basic knowledge on the project.
Meeting: each of members in the team play his role as he is.
Step Three: Rework
After the inspection meeting, we fill out checklist that record defects found. It is time for the author correct them and send the code again to the moderator. After check by the moderator, the test for the code begins.