Writing the tests after is usually harder as the design becomes less test-friendly. The tests tends to cover less as well, so quality is not assessed to the same extent. The risk therefore is higher that you have bugs in production.
The longer it takes to fix a bug, the harder it is. Continuously writing tests with the implementation, gives you a short feedback loop.
Realizing that the short feedback loop is the cornerstone of TDD was a real AHA moment for me. Would you say you agree wholeheartedly with this quote from Uncle Bob?
"The really effective part of TDD is the size of the cycle, not so much whether you write the test first. The reason we write the tests first is that it encourages us to keep the cycles really short." - Uncle Bob
Sorry, missed this question. Yes, the short cycle is a great aspect. Bob probably also said other things that are great about TDD that I would agree with. I've met him in person several times and am quite familiar with his work. People like some qualities more than others and to me the best is the feeling of safety. I am confident that the code works in a much stronger way than when I did randomly testing it after the implementation .Glad that you enjoy TDD.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Writing the tests after is usually harder as the design becomes less test-friendly. The tests tends to cover less as well, so quality is not assessed to the same extent. The risk therefore is higher that you have bugs in production.
The longer it takes to fix a bug, the harder it is. Continuously writing tests with the implementation, gives you a short feedback loop.
That is my experience.
Realizing that the short feedback loop is the cornerstone of TDD was a real AHA moment for me. Would you say you agree wholeheartedly with this quote from Uncle Bob?
Sorry, missed this question. Yes, the short cycle is a great aspect. Bob probably also said other things that are great about TDD that I would agree with. I've met him in person several times and am quite familiar with his work. People like some qualities more than others and to me the best is the feeling of safety. I am confident that the code works in a much stronger way than when I did randomly testing it after the implementation .Glad that you enjoy TDD.