CSC/ECE 517 Fall 2009/wiki1a 8 rr

From Expertiza_Wiki
Revision as of 05:59, 8 September 2009 by Rdflterr (talk | contribs)
Jump to navigation Jump to search

Categorization of code refactoring

What is Code Refactoring?

Code Refactoring is a technique of reorganization code to change its structure but at the same time preserving the basic functionality of the code. There are many kinds of code refactoring. This wiki tries to categorize these types of refactoring so that it's easy for people to learn these patterns and remember them.

Categories of Code refactoring

  1. Improve readability and code reuse

One of the major motivation for code refactoring is readability.

    1. Improve names
      1. Renaming methods/variables etc to more meaningful names is a good practice.
 display()  => displayStudentNames
      1. Extract package - Extract a sub package depending on their gross dependencies or usages.



  1. Code management
  2. Allow abstraction
  3. Change of logic
  4. Merging/Reduction of code


Conclusion

References

External references