CURRENT ISSUE Contests
Feature Article
|
|
Issue #212 March 2008
LESSONS FROM THE TRENCHES
Do You Want to Do a Design?
Linked Lists
by George Martin
Start | Design Challenge | Database Design | Use A Linked List | Design Implementation | Code Review | Sources & PDF
CODE REVIEW
The design is coded and tested. The test cases and results are in the file LinkListReport.txt. The next step is for a code review. What’s a code review? Well, Wikipedia says: “Code review is systematic examination (often as peer review) of computer source code intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers’ skills.”[2]
Let’s have a code review. I’ll start it. What happens if a string, longer than the permissible size, is somehow entered for the number to dial? Should we protect against that event? How?
What happens if a group number less than 0 or greater than the maximum is entered? Should we protect against that event? How?
You get the picture. Do a code review and post your comments on the blog I’ve created for this design review: CCI C Programming Design Review (http://ccidesignreview.wordpress.com/). Then we’ll keep that active and see where it takes us.
Let’s go. Don’t put it off any longer. Next time, let’s look deeper into compiler output. We’ll take apart the C compiler generated code. Sounds like fun. See you next time.