Professional Documents
Culture Documents
Refactor or Die - Mikhail Matrosov - CppCon 2017
Refactor or Die - Mikhail Matrosov - CppCon 2017
Refactor or Die - Mikhail Matrosov - CppCon 2017
Mikhail Matrosov
Technical Manager at Align Technology
mmatrosov@aligntech.com
Refactor or die - Mikhail Matrosov - CppCon 2017 2
Refactor or die - Mikhail Matrosov - CppCon 2017 3
Impact=Risk=P(bug)=P(💀)
Business process
User
💀
LOC touched LOC touched
Refactor or die - Mikhail Matrosov - CppCon 2017 5
Tests?
• Tests failed. What did we do wrong, exactly?
• Never 100% coverage
• Cannot test tests
• Cannot test users
• Easier to check that nothing changed than to check that a change is correct
Modification
Bug fix
New feature
Refactoring
Trivial change
Modification
Bug fix Unlimited
New feature
Refactoring
Limited
Trivial change
Modification (*)
Bug fix Unlimited (–)
New feature (+)
Refactoring (~)
Limited
Trivial change (=)