3 ms·
I'm reading Working Effictively With Legacy Code. I cannot recommend this book enough. It gives practical advices on how to improve legacy code with small steps
by louhike 11y ago
I'm reading Working Effictively With Legacy Code. I cannot recommend this book enough. It gives practical advices on how to improve legacy code with small steps, without rewriting everything from scratch (which is too often considered as a magical solution which will resolve everything).
- eldavido 11y ago+1. Really can't recommend Feathers enough. Along with "Refactoring" by Fowler, these books have influenced my development style a ton even on non-legacy code, by providing structured approaches to improving code quality, and a shared language for talking about it. Without looking at the book, a few things from Feathers I think about often: - The concept of "sensing" is useful when thinking about test design. I alternate between state-based TDD vs. a more behaviorist/mockist style depending on whether the code's job is fundamentally about managing state, or routing requests to other components (a surprisingly useful distinction) - Converting methods to "virtual" can be pretty useful when it's too hard to introduce an interface, but you want to mock/stub out a component - "Sprouting" is a nice way to think about how a class can "Grow" out of existing code, same for methods and parameter clumps (from Fowler) - It's also a darned humorous and funny book. "The case of the irritating parameter", "Help, this code just calls a bunch of other code", "This class is impossible to get under test", etc. I love the writing style and how he stops just short of hyperbole while still making me grin.