YOUTUBE EZ05e7EMOLM Ian Cooper presents at DevTernity 2017
The key problem that Ian says we have is that our Unit tests are about classes. However, what we want to do is express behaviors in our tests.
A side effect of testing implementation details is that it means we've drilled so deep into the domain and it stops us from being able to change our design. It also means we're less productive when building our tests.
Ian characterizes a ducktape developer, a developer who has aligned themselves with the product manager, pumping out features quickly without tests or good structure. This type of character tends to get a lot of credit for getting stuff out quickly at the cost of other developer's sanity.
This very much reminds me of Katrina Owen's talk on Here be Dragons which she gave at BathRuby in 2015.
Ian reminds us of the 3 refactor steps: Red, Green, Refactor
Red is seeing the tests fail. This can be geared, small steps would be 1st or 2nd gear. If you're confident, hit 4th and 5th gear, test something that's a large feature and implement it.
Green is doing what the ducktape programmer would've done-- get to green as fast as possible and commit all sins to do it! You're learning about your code, you're learning about the minimum implementation.
Refactoring motivation comparison, discussed at 45:03
You're now moving at the speed of the ducktape programmer-- but you're moving with the confidence of tests which should mean you can move faster.
Refactor happens once you're green. It's the most important step because now you have more information about the system and you can assess what the best way to move forward is.