Without changing the functionality of the program, it is possible to improve the code of a program by refactoring.
Typical refactoring operations:
- change the name of a variable
- change the name of a class or structure definition
- change the name of a method or function
- change the type of a variable or class member
- change the name of a parameter in a function/method definition
- convert an inner class to a top-level class definition
- convert inline code into a method or function
etc.
@tunixman: if there is no unit test, why should we use refactorings?
@bigballofmud BrianFoote: Technically yes, but so is blindfolded brain surgery.
You unit test guys crack me up. You're like heroin junkies, but funnier.
See WhatIsRefactoring for a more complete description and explanation.
See also: