Day 3: Faking, Mocking and Legacy Code
Controlling Legacy Code
Working in legacy code can be a deadly business,
unless you know how to get it cleaned up and under test.
Your code is a mess and you want to refactor it, but you have no tests and writing tests will first require refactoring!
What now?!?Taming a legacy code base requires refactoring and testing skill, but there more to it than that.In this session, learn the fundamental techniques and patterns for bringing complex legacy code under control.You will do so by stepping your way through our hands-on "CRRAP: Code Requiring Remedial Attention Promptly" exercise, and then by taking a shot at it with some of your very own code.
unless you know how to get it cleaned up and under test.
(Reading...)
Formatting Hints:
To format... | use this markup: |
---|---|
source code | {source:lang=java|lineNumbers=false}...{source} (Supported languages: java, cpp, csharp, c, python.) |
bold text | __some text__ |
italicized text | ~~some text~~ |
underlined text | @@some text@@ |
a method or class name | ``myMethod(...)`` |