The Purpose of Re-Factoring

Refactoring is about reorganization, it comes from mathematics when you factor an expression into an equivalence – the factors are cleaner way of expressing the same statement. Refactoring means equivalence; the original product and the end product must med functionally identical. There are generally two reasons to do refactoring:

  • Maintainability – it is easier to fix bugs because the source code is easy to read and the intent is easy to grasp. This might be achieved by removing monolithic routines into a set of individually concise, well-named, single-purpose methods. Or it might be achieved by moving a method to a more appropriate class, or by removing misleading comments.
  • Extensibility – it is easier to extend the capabilities of the application if it uses recognizable design patterns.

In order to ensure that the function is identical is common to create a solid set of unit tests. The test should demonstrate that the behavior of the module is correct. If the test fails, you undo the change. Refactoring shall make your code clearer, cleaner, simpler and more elegant.



21 comments on “The Purpose of Re-Factoring

  1. Pingback: US Direct Protect

  2. Pingback: free online strategy war games

  3. Pingback: ecommerce solutions

  4. Pingback: 鋁圈

  5. Pingback: Stop sweating and start living

  6. Pingback: miss america 2012

  7. Pingback: Scholarships for Minorities

  8. Pingback: gears of war 3 multiplayer

  9. Pingback: best digital camera

  10. Pingback: High Protein Low Carb Diet

  11. Pingback: oxygen barauto car

  12. Pingback: affnan aquaponics blogspot

  13. Pingback: light stage party

  14. Pingback: Payday Loans In Chicago

  15. Pingback: Payday Loans Detroit

  16. Pingback: Best Appetite Suppressant

  17. Pingback: Great Clips Coupons

  18. Pingback: movie hong

  19. Pingback: air operated grease

  20. Pingback: XXX

  21. Pingback: charger apple ipod

 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up