[Tutor] Re: global vars vs. func args

alan.gauld@bt.com alan.gauld@bt.com
Tue, 12 Mar 2002 17:02:42 -0000


> Your response raises one question though -- what's 
> "refactor"?  

Its harder to explain than to show.
There is an example of refactoring in the Case Study on 
my web tutor.
Look at the section where we move to a GUI - we need to 
refactor the code to remove display features from 
processing functions... 

In general refactoring code is about taking existing code 
and reshaping it(splitting small reusable functions out 
from bigger ones, combining functions that are only called 
once or are trivial in nature etc) to produce cleaner, 
more maintainable/more reusable code.

Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld