¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Refactoring

Charlie McHenry Inglés

Contenido del mapa

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

Información

Descripción
Mapa Mental sobre Refactoring, creado por Charlie McHenry el 01/08/2024.
Creado por
Charlie McHenry
Visitas
2
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?