You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

kpreid comments on Test Driven Thinking - Less Wrong Discussion

3 Post author: adamzerner 24 July 2015 06:38PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (26)

You are viewing a single comment's thread.

Comment author: kpreid 05 September 2015 08:05:19PM 1 point [-]

Your description of TDD is slightly incomplete: the steps include, after writing the test, running the test when you expect it to fail. The idea being that if it doesn't fail, you have either written an ineffective test (this is more likely than one might think) or the code under test actually already handles that case.

Then you write the codeĀ (as little code as needed) and confirm that the test passes where it didn't before to validate that work.