← Back to posts

[Notes] Takeaways from Reading 'Getting Up to Speed with TDD in 30 Days'

BDDTDDATDDRefactoringNotes

After finishing 《Getting Up to Speed with TDD in 30 Days》, here are some of the takeaways I found most important, shared with you all.

ATDD (USER STORY)
<->BDD (DSL TO Programming Language)
<->TDD (include integration test, unit test and refactor)
In plain terms: users write USER STORIES with ATDD, then BDD turns them into specs that programmers can understand, and finally programmers build and test the code the TDD way.
Ref:
[Getting Up to Speed with TDD in 30 Days][Day 26]User Story/ATDD/BDD/TDD - Summary
2.
Separation of responsibilities ==>
Find out who is doing what!
There’s a very, very simple trick for finding “who does what,” and I’m sure anyone can pick it up right away. For a function you’ve already described in plain language, just identify the “subject,” “verb,” and “object” in what that function means.
What does that mean? It’s simple:
Subject: the class;
Verb: the method;
Object: usually the method parameter;
Adjective: usually the state change an object produces after its behavior is invoked.
EX1-CalculatedByBlackCat(): Black Cat (a courier) calculates the shipping fee.
Ref:
[Getting Up to Speed with TDD in 30 Days][Day 12]Refactoring - Separation of Responsibilities
3.
Interface-oriented ==>
“Look at the world from that object’s point of view: apart from the object itself, everything else it sees out there is an interface.”
Ref:
[Getting Up to Speed with TDD in 30 Days][Day 16]Refactoring - Interface-Oriented

Signed in Taiwan · 2016