[ Team LiB ] Previous Section Next Section

Interlude 1. Smells and Refactorings

I1.2. Refactorings that Fix the Most Smells

Move Method, Extract Class, Move Field, and Extract Method

I1.3. Refactorings Not Mentioned

It's a long list. Some are just code manipulation; it's not that either way smells, but rather the refactoring provides a safe way to move between two valid alternatives. Others are a bit specialized (especially the "big" refactorings). Others are used as steps in applying another refactoring; the smell for the other refactoring triggers this one.

I1.4. Other Smells

Everybody's list will be different. I added these:

  • Intertwined Model and UIDuplicate Observed Data, Separate Domain from Presentation

  • CastEncapsulate Downcast

  • Unclear CommunicationRemove Assignment to Parameter, Replace Error Code with Exception, Replace Exception with Test, Replace Magic Number with Symbolic Constant, Split Temporary Variable

  • Conditional LogicConsolidate Conditional Expression, Consolidate Duplicate Conditional Expression, Introduce Null Object, Replace Error Code with Exception, Replace Exception with Test, Replace Nested Conditional with Guard Clause, Replace Conditional with Polymorphism.


    [ Team LiB ] Previous Section Next Section