Re: Let's Talk About TDD, Baby!

"Colin Vipurs [email protected] [testdrivendevelopment]" <[email protected]> Tue, 23 Feb 2016 09:59:11 +0000
Newsgroups gmane.comp.programming.test-driven-development
Message-ID <CAKi4271WiNAfwDETF-0s8iOu+SaQ8=khm-fm9Q=_EwtkEztT9Q@mail.gmail.com>
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, [email protected]
[testdrivendevelopment] <[email protected]> wrote:

>
>
> Hi everyone, this is my first post... Just wanted to get some feedback on
> my blog post as a started to TDD:
>
>
> Elliot Chance - Let's Talk About TDD, Baby!
> <https://elliot.land/test-driven-development-brief-overview>
> [image: image]
> <https://elliot.land/test-driven-development-brief-overview>
> Elliot Chance - Let's Talk About TDD, Baby!
> <https://elliot.land/test-driven-development-brief-overview>
> Let's Talk About TDD, Baby! - A Brief Overview
> View on elliot.land
> <https://elliot.land/test-driven-development-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.