This is how my coworkers and I honed our skills, both when defending our own code and when critiquing others code. If the reviewer couldn t understand somebody s code, the code had to be redesigned. If the reviewer thought that the names of variables were too cryptic, they had to be changed. Yet I couldn t say it was a solid piece of programming that I would like to sign with my name. The fact that the program works has no relevance.
Any fool can write a program that runs.
I decided to give the calculator a thorough code review. My role was to help the person turn this piece of amateur code into an industrial strength program. What follows is a series of code reviews that result in quite substantial changes in the program. Fortunately, we don t have to toss out the calculator. As you ll see it is highly maintainable.