¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

[TDD] Let's Talk About TDD, Baby!


 

Hi Elliot,

Overall that's a nice post, a good primer for TDD, I just wanted to pick up on a couple of points:

1) At no point do I remember you mentioning seeing the test fail /for the right reason/.? In your first test you move from compilation failure -> test pass.? At no point do you see your test actually fail because the assertion was wrong.? I consider this quite an important step as it both verifies my test is correct and lets me know the diagnostics are useful when the test fails

2) You're using triangulation to reach your solution but for this problem I would suggest some steps could be avoided by applying DRY and removing duplication between the test + production code.? I was running a session lately for some people experienced in TDD and when I talked about this they had an "Aha!" moment that lets them go from the specific to the generic solution quicker

Because this is a toy example it might be worth pointing out how easy it is to actually mess this code up without tests, the usual way is that you write the code as you think about it and how the problem is presented:

if (divisible by 3) Fizz
if (divisible by 5) Buzz
if (divisible by 3 and 5) FizzBuzz

To the naked eye this /looks/ correct but doesn't work as expected.

On Mon, Feb 22, 2016 at 1:40 PM, elliot.chance@... [testdrivendevelopment] <testdrivendevelopment@...> wrote:

?

Hi everyone, this is my first post... Just wanted to get some feedback on my blog post as a started to TDD:



Let's Talk About TDD, Baby! - A Brief Overview
Preview by Yahoo





--
Maybe she awoke to see the roommate's boyfriend swinging from the chandelier wearing a boar's head.

Something which you, I, and everyone else would call "Tuesday", of course.