Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What exactly is refactoring, and how can I do it in VFP.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01302927
Message ID:
01303192
Vues:
16
>>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.

But that sounds real dangerous if the true process of refactoring is employed.
I say this because my understanding is that you change a bit of code THEN TEST IT then move on to the next bit of code. What you describe seems far too 'powerful' and certainly not in keeping with small bits at a time.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform