Blog Stats
  • Posts - 36
  • Articles - 0
  • Comments - 14
  • Trackbacks - 26

 

Why Developers should like Refactoring!

The refactoring book http://www.amazon.com/exec/obidos/ASIN/0201485672 is really one of the best books that I have seen on programming.   If you are new to programming, I highly recommend giving the book a read.   Learning some of these refactors and thinking about them as you write code will help you write better code.   Being familiar with the various refactors will help you quickly identify ways to improve code.   The concept of code smells is pure genius.

The concept of refactoring is very liberating and freeing.  You don’t have to worry about getting everything right the first time.   You never will.  Refactoring provides a general framework for not only reversing the inevitable deterioration of good code into bad code, trust me it happens.  It also provides a framework to move code that started out not so good into better code.

No one sets out to write bad code, but still it happens.  

Sometimes requirements change during development.

Sometimes requirements are not well understood leading to a bad design from the outset.    

Sometimes you simply run out of time and do the best you can knowing that it is not as you would like to write, but having to do it anyway.  

Sometimes you are learning a new technology and simply don’t know any better.    It’s dangerous writing software while best practices are still emerging.

Sometimes multiple people are working on the same thing and not everyone understands the design, assuming that there was an original design.  

Sometimes new functionality is “bolted on” awkwardly.  

Sometimes incremental changes skew the code base in awkward directions.

There are many reasons bad things can happen to code software.   When you see software that has gone bad, be careful casting blame.  There is no telling how bad your code may look over time.  Let’s face it; most code simply doesn’t age well.

Refactoring helps us limit how long we have to live with our mistakes, helps us improve code over time, and stop the deterioration.

Future blogs will explore some of the refactors that covered in this pivotal book.   What are some of your experiences with refactoring?


Feedback

No comments posted yet.


Post a comment





 

Please add 3 and 4 and type the answer here:

 

 

Copyright © Nick Harrison