Free SOLID and design smells lessonsSOLID and design smells · Stage 2 · Spotting trouble · Step 2
Design smells and refactoring
The patterns that tell you a design is going wrong, and the small, safe refactoring that answers each. About 13 minutes.
What is the defining property of a refactoring?
- AIt changes the structure of the code without changing its observable behaviour
- BIt adds a new feature
- CIt makes the program faster
Show the answer
It changes the structure of the code without changing its observable behaviour. Tests should pass before and after.
4 questions on this idea
Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.
Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve