TDD, Where Did It All Go Wrong - Ian Cooper https://www.youtube.com/watch?v=EZ05e7EMOLM
- Book: Refactoring - Martin Fowler
- Book: Refactoring to Patterns - Joshua Kerievsky
- Book: Test Driven Development: By Example - Kent Beck
- Article: Is TDD Dead? - Martin Fowler
Ian Cooper - TDD, Where Did It All Go Wrong https://www.youtube.com/watch?v=EZ05e7EMOLM
Trigger for writing test != new method != new class = requirement
test api
System Under Test (SUT) != class Unit test -> exports of module
refactoring = separate implementation detail from things you do need to test
extra
“The word ’test’ in TDD confuses people about how to do TDD, when I change it to Behavior, it tends to be better understood” -- Dan North
todo: re-read ‘TDD by example’
design clean api first, then realistic
test is first consumer of your code
unit of isolation = test, not sut
===
RED-GREEN-REFACTOR
- write test that fails without implementation
- make test pass asap, sinful, ducttape line by line not nice classes, no patterns speed > design
- make good code
""" You can’t do 2 things at once easily - understand the solution to the problem - engineer the code right You will either - over-engineer - analysis-paralysis """
===
CLEAN CODE WHEN
refactoring don’t write tests private/internal visibility
only in the refactoring step now I know I need it Book: Refactoring to Patterns - Joshua Kerievsky
===
HEXAGONAL ARCHITECTURE PORTS AND ADAPTERS
===
GEARS throw away helping tests with implementation details when implemented
===
ACCEPTANCE TDD Don’t do it - customers are not interested - they’re expensive Maybe you need it, because programmer tests don’t focus on the gist of the system.
===
MOCKS
===
SUMMARY