Skip to main content

Smell Identification Clinic

Attempt these five tasks before opening feedback. Keep a contract, observation, candidate change, alternative and verification limit. These P tasks are required; extra lesson drills are targeted repair or optional depth.

P11: Challenge a smell diagnosis​

A serializer reads twelve fields from one immutable record. Decide whether Feature Envy is established, and name evidence that would change your decision.

P12: Discriminate extension axes​

Compare adding a new shape and adding a new operation to a class hierarchy versus a closed tagged representation. Include validation and dispatch wiring.

P13: Inspect a change set​

A new user preference touches a model, database migration, API and accessible UI label. Distinguish necessary integration edits from a repeated rule that should have one home.

P14: Evaluate a single-provider seam​

A clock interface has one production implementation and a deterministic fake. Compare keeping it with inlining a one-provider formatting wrapper used by one caller.

P15: Clarify value semantics​

Specify Money validation and plus. Explain why wrapping a float and asserting equal currency is insufficient. Decide whether negative Money and negative deposits are the same domain question.

Reuse lab evidence and record assistance. If a book gap remains, locate the topic through the Refactoring book index and the selective reading guide.