In chapter five of Robert C. Martin’s The Clean Coder, his topic is Test Driven Development (TDD). Last semester I took a course called Software Construction, Design, and Architecture, in which we practiced a bit of TDD. I also took a class called Software Quality Assurance and Testing, and if the title did not give it away, was mostly about software testing. With the benefit of those courses I do know a bit about TDD, and because of this, I can confidently say that Martin was spot on with this chapter. The most important thing to take away from this chapter is Martin’s three laws of TDD. The first is, “you are not allowed to write any production code until you have first written a failing unit test.” The second is, “you are not allowed to write more of a unit test than is sufficient to fail—and not compiling is failing.” Finally, the third is, “you are not allowed to write more production code that is sufficient to pass the currently failing unit test.” The rest of the chapter is dedicated to explaining the benefits of TDD. My suggestion is to try a simple program, and if you follow his three laws, you should be able to determine the benefits for yourself.
Chapter six was entitled “Practicing.” The message of this chapter was, that to be a professional programmer, you must keep your skills sharp, and in order to keep your skills sharp, you must practice. Martin discusses his experience with the Coding Dojo, and the activities associated with it. Kata, Wasa, and Randori are three coding activities used to hone your programming skills. Martin also suggests working on Open Source Projects or mixing up which languages and platforms in order to expand your knowledge. I certainly believe that practicing is an important part of being a programmer. Once you become an experienced programmer it makes sense to repeat older problems and try to hone your skills. I, on the other hand, still consider myself a novice, and I think my time is better served expanding my knowledge as much as possible before I begin repeating past projects.
From the blog cs443 – TayNock's Blog by taynock and used with permission of the author. All other rights reserved by the author.