#TDD

40 tweets

I am teaching #TDD these days and noticed that there is one step that is not too
obvious but helps to keep focus on what what to implement: using higher level
functions to express logic instead of diving directly into the nitty gritty
implementation detail. >

I am training a junior and outside-in #TDD is a great helper in that because it
frames the current task so they can focus on the implementation itself and not
spend too much energy on fighting the test runner, or learning ~100 assertion
methods.

Replying to @coderbyheart

The problem is that the value of #TDD is not obvious, which makes it hard to
make it a default method for software projects. There are always managers,
colleagues and customers that need to be convinced.

Always write a FAILING test first, especially when testing error behavior and
writing tests after the implementation.

You might be seeing an effect of you not understanding the system under test and
misreading its failure condition.

#tdd