Download presentation
Presentation is loading. Please wait.
Published byAlice Gregory Modified over 9 years ago
1
Test driving to clean CODE Kenrick Chien CTO, Critical Phase
3
Photo by Toni Blay - http://flic.kr/p/5CNcihttp://flic.kr/p/5CNci Code we want to avoid
4
BENEFITS Easy to refactor Cleaner; less time spent debugging Documentation - examples More time to do what you enjoy
5
THE TDD “CYCLE” RED GREEN REFACTOR
6
UNCLE BOB’S Three LAWS OF TDD 1. You are not allowed to write any production code unless it is to make a failing unit test pass. 2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures. 3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
7
MYTHS All about unit tests Testing methods, not behavior Too slow; I don’t have time for this!
8
Limitations New language /framework Database & UI Culture
9
Kata
10
references Beck, K. Test-Driven Development by Example. Addison Wesley, 2003. Erdogmus, Hakan; Morisio, Torchiano. "On the Effectiveness of Test-first Approach to Programming". Proceedings of the IEEE Transactions on Software Engineering, 31(1). January 2005. On the Effectiveness of Test-first Approach to Programming Freeman, Steve and Nat Pryce. Growing Object-Oriented Software, Guided By TestsSoae, Guided By Tests Massachusetts: Pearson Educatio Massachusetts: Pearson Education, Inc, 2009. Fowler, Martin. Refactoring: Improving the Design of Existing Code. USA: Addison Wesley Longman, Inc. 1999. Martin, Robert. Agile Software Development Principles, Patterns, and Practices. New Jersey: Pearson Education, Inc. 2003.
11
Contact e-mail: ken.chien@criticalphase.comken.chien@criticalphase.com website: http://www.criticalphase.com blog: http://geekyninja.blogspot.comhttp://geekyninja.blogspot.com twitter: @kenrickchien
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.