GoConqr has a new look! Let us know what you think.

Mind map

Refactoring

Charlie McHenry English

Map content

Refactoring

  1. Small independent changes with the goal of improving

  2. Rename

  3. Collapse Hierarchy

  4. Extract Method

  5. Consolidate Conditional

    • Could write a method to evaluate larger conditionals
  6. Decompose Conditionals

  7. Extract Class

  8. Important in industry where quality is important

    • Test Driven Development
      • Dynamic Verification(testing)
        • Performing levels of tests on the system to make sure it responds correctly
      • Static Verification
        • Examining code without executing it
      • Inspections/Reviews
        • Human intensive and often group-based review of the code
      • Formal Verification
        • Mathematical proof to ensure the code is 100% correct, can be very expensive
      • Writing the tests before the classes
      • Make it fail(TDD), make it work, make it better(refactor)
  9. Should not refactor if code is broken

  10. Code Smells

    • An indication that a deeper problem exists in the code
    • Technical debt - the amount of work created by trying to save time up front
    • Helps us identify problems
    • Bloaters
      • Classes that become too large
    • OO Abusers
      • Long switch statements instead of a method
    • Change Preventers
      • Shotgun surgery: having to make many small changes every time we make changes
      • Divergent change: making too many changes in one class when making changes
    • Dispensables
    • Feature Envy

Information

Description
Mind Map on Refactoring, created by Charlie McHenry on 01/08/2024.
Created by
Charlie McHenry
Views
2
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?