Michael C. Feathers on the code legacy we leave behind

vutran | June 23, 2020, 5:15 p.m.

"We start to refactor the code a bit. We extract some methods and move some conditional logic. After every little change that we make, we run that little suite of unit tests. They pass almost every time that we run them. A few minutes ago, we made a mistake and inverted the logic on a condition, but a test failed and we recovered in about a minute. When we are done refactoring, the code is much clearer. We make the change we set out to make, and we are confident that it is right. We added some tests to verify the new behavior. The next programmers who work on this piece of code will have an easier time and will have tests that cover its functionality."

—  Michael C. Feathers


Leave a comment

Certified

2025 Reading Challenge

2025 Reading Challenge
Better has read 12 books toward his goal of 36 books.
hide

2024 Reading Challenge

2024 Reading Challenge
Better has read 2 books toward his goal of 52 books.
hide

2023 Reading Challenge

2023 Reading Challenge
Better has read 17 books toward his goal of 52 books.
hide

2022 Reading Challenge

2022 Reading Challenge
Better has read 2 books toward his goal of 36 books.
hide

2021 Reading Challenge

2021 Reading Challenge
Better has read 0 books toward his goal of 60 books.
hide

2020 Reading Challenge

2020 Reading Challenge
Better has read 10 books toward his goal of 36 books.
hide

2019 Reading Challenge

2019 Reading Challenge
Better has read 21 books toward his goal of 24 books.
hide