Refactoring - Hannes's Mind Maze

Refactoring

One of my favourite activities is to take code (does not always have to be my own) , rip it apart and make a rocket out of a tortoise. And believe me there are plenty of tortoises in my neighbourhood.
 
 
refactoring
 
Improving a computer program
by reorganising its internal structure without altering its
external behaviour.

When software developers add new features to a program, the
code degrades because the original program was not designed
with the extra features in mind.

This problem could be solved by either rewriting the existing
code or working around the problems which arise when adding
the new features. Redesigning a program is extra work, but
not doing so would create a program which is more complicated
than it needs to be. Refactoring is a collection of
techniques which have been designed to provide an alternative
to the two situations mentioned above.

The techniques enable programmers to restructure code so
that the design of a program is clearer. It also allows
programmers to extract
reusable components, streamline a
program, and make additions to the program easier to
implement.

Refactoring is usually done by renaming
methods, moving
fields from one class to another, and moving code into a
separate method.

Although it is done using small and simple steps,
refactoring a program will vastly improve its design and
structure, making it easier to maintain and leading to
more robust code.

"Refactoring, Reuse & Reality" by Bill Opdyke
(http://st-www.cs.uiuc.edu/users/opdyke/wfo.990201.refac.html)
.

"Refactoring, a first example" by Martin Fowler
(http://www.aw.com/cseng/titles/0-201-89542-0/vidrefact/vidrefact.html)
.
Published Thursday, September 15, 2005 2:35 PM by hannes
Filed under:

Comments

# re: Refactoring

Thursday, September 15, 2005 3:07 PM by Angie
Shame the poor tortoises...

They won't know what has hit them

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above:
Powered by Community Server (Commercial Edition), by Telligent Systems