Skip to content

CoderKungfu/refactoring_php_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Refactoring Like a Pro

What is refactoring?

  • A change made to the internal structure of software to make it:
    • Easier to understand.
    • Cheaper to make future changes.
  • This does not change the observable behavior of the software.
  • Tests help ensure that we didn't change behavior.

Why do we refactor?

  • Software left alone will decay.
  • Makes it cheaper to make changes.
  • Make it easier to understand.
  • Improves the design of the code.

Common refactoring techniques:

  1. Change names to communicate intent
  2. No magic numbers / variables
  3. One responsibility per function / class
  4. Do not be obsessed with primitives

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published