Intentionally Writing The Wrong Code

I decided to document the process of TDD with a short screencast that includes the first few steps of the TDD process. In the video, I write a failing test, write code that doesn’t pass, and then write “bad” code that makes the test pass. I’m hoping to demonstrate the principle, as I understand it, of writing the simplest code that makes a test pass. The last step in the video is writing an additional test that exposes the weakness of my simple code and will put me on the path to writing functional code. It’s just a few minutes long, but I suggest you watch in in HD (at least 720) and full screen, if you want to be able to read the code.