Weekly bits and pieces, a bit thin on the ground this week. However I did learn that NDC has a great video collection of all their talks (e.g. http://ndcoslo.oktaset.com/Agenda for this years talks.)
- Every new test adds a new constraint to the problem.
- As the tests get more specific, the code must get more general.
- A refactoring is a change of code structure that doesn’t affect behaviour. A transformation is a small code change that does affect behaviour.
- TDD is a mixture of refactoring and transformation.
- TDD can be used a means to derive algorithms. The Transformation Priority Premise postulates that choosing certain transformations over others could lead to better algorithms.
- A bunch of different methods working on a bunch of different state suggests low cohesion in a class.
- A good analogy for the law of Demeter: someone wants some money from you. You can either: a) take the correct amount out of your wallet and give it to them; or b) give them your wallet and trust them to take the right amount…
- It’s the domain model that adds value to a business, not data. The data and its structure follow from the domain.