[Tutor] Re: small program in Python and in C++

Jeff Shannon jeff@ccvcorp.com
Fri, 05 Jul 2002 11:13:40 -0700

alan.gauld@bt.com wrote:

> First of all apologies to the pythonistas for dragging
> things well off topic!
> > A few questions for the less-learned (such as myself)....
> >
> > What exactly is refactoring?
> Taking an existing function (or class) and breaking it
> into smaller more atomic units.

This is the typical case, although refactoring can also mean combining two
existing functions/classes into a single one (to eliminate overlap, for

The essence of refactoring is that it is re-organizing your code to a
structure that is better-suited to the problem you're trying to solve.  Any
time you think "...instead of the way it's being done now, if we did it
*this* other way it would make more sense ...", that's refactoring.

Jeff Shannon
Credit International