Code Smells: Your Refactoring Cheat Codes

Sure, the TDD cycle is red-green-refactor but what exactly are we refactoring? We just wrote the code, it’s green, and it seems reasonable to us. Let’s move onto the next test. We’re have a deadline, remember? Whether we’re working with code we just wrote or opening up a project for the first time, being able to listen to the hints the code is trying to give you about how it wants to be constructed is the most direct path toward successful refactoring.

What the code is telling you nuanced however: no code smell is absolute and none in itself is an indication of a problem. How do we know we need to refactor? What are the code smells telling us to do? How do we balance our short terms needs of shipping our software with the long term maintainability of the code base? In this talk we’ll talk through some of the classical code smells and dive into examples of how to put these smells to work for you.

Video producer:

Related Videos: