Refactoring is moving in small steps, with each step verified by unit tests. As I demonstrated last time, these steps are much smaller than most people are used to. Let’s continue the same example to learn some new things about refactoring. Reading is not as good as doing. I learned from the folks at Big
Refactoring remains a much-misunderstood discipline. Even when folks do have unit tests to back their changes, how long does the code stay broken? Let’s return to the idea that refactoring happens in very small steps. No, even smaller than that. Table Of Contents 1Motivating example2Take smaller steps3Move Field refactoring4Reducing the amount of change5A sequence of very
When you refactor, do you have unit tests covering you? …If not, why not? …If so, how do you know? To me, it seems that the state of refactoring has gotten worse across the industry. Both managers and programmers and managers say the word “refactoring” more than ever. But they almost always mean, “I’m going
Does your code have comments? Sometimes they’re helpful. But most of the time… Disclosure: The book links below are affiliate links. If you buy anything, I earn a commission, at no extra cost to you. As Jeff Atwood explains, code tells you how, comments tell you why. A well-placed code comment is a level above
It’s time for a quick exercise in code smells! How many code smells do you see below?