Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What exactly is refactoring, and how can I do it in VFP.
Message
 
To
18/03/2008 09:22:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01302927
Message ID:
01303063
Views:
11
>I've heard a lot about "refactoring" your code... Can someone explain exactly what this is, and give me a before and after example of some code that has been "refactored". Is there a tool that does this in VFP? I think .NET has some of this built in Visual Studio 2008, and you can buy 3rd party tools.
>
>Am I missing something big here, or is it just a bunch of mighter-than-thou hot air to make me feel stupid?

Just a fancy name for a bunch of techniques to clean up your code (usually in a way so that you don't break the existing code). Something as simple as renaming variables or method names can be considered refactoring - you named a variable isNotAvailable and then realize it's confusing to understand so you want to rename it to isAvailable. Or if you are writing a method (or function/procedure) that does 20 things and and some pieces of it need to be broken out into their own methods.

I use Refactor!/CodeRush from DevExpress in Visual Studio and it's fantastic - I use it all of the time. It makes a lot of the common things you might do incredible easy; renaming a method and have any calling code suddenly reflect it's new name. Resharper from JetBrains is also slick.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform