In this week’s chapters of The Clean Coder, Robert C. Martin talks about the importance of test driven development and ways that programmers can practice their art. Robert talks about the first time he became acquainted with TDD. Although he was skeptical at first, he soon realize that TDD had a lot more to offer than just shortening cycle time. There are three crucial laws one must follow when practicing TDD. One, You are not allowed to write any production code until you have first written a failing unit test. Two, You are not allowed to write more of a unit test than is sufficient to fail—and not compiling is failing. Lastly, You are not allowed to write more production code that is sufficient to pass the currently failing unit test. even though these laws does not guarantee perfection in any program, It is a discipline that enhances certainty, courage, defect reduction, documentation, and design. As professional coder, it would be foolish not to follow these laws because of those benefits.
Moreover Robert explain the importance of practicing. Practicing allows us to keep our mind and skills sharpened and stay up to date. As coders, we should be excited about coding therefore, practicing should be done for the enjoyment. After all, as the author, mentions “Professional programmers practice on their own time. It is not your employer’s job to help you keep your skills sharp for you. It is not your employer’s job to help you keep your resume tuned”. We are responsible for mastering our craft and the best way to do that is practicing. Additionally, Robert correlates Coding and martial arts with a series of activities he calls the coding dojo. In a dojo there are several activities such as Kata, Wasa, and Randori. The purpose of these activities are to synchronize the mind and the body to practice the movements and decision involve in solving a problem.