views:

300

answers:

4

what are the advantages and disadvantages of refactoring tools, in general?

+1  A: 

Advantage: the obvious one: speed.

Disadvantages:

  • they push you towards the refactorings they include and you may ignore the ones they don't, to your disadvantage;
  • I've only tried one, with VS, and it slowed down the app noticeably. I couldn't decide if it was worth it but had to rebuild the machine and haven't re-installed it so I guess that tells you.
serialhobbyist
+1  A: 
  • Code improvement suggestions. (can be both advantage and disadvantage)
  • Removes code noise (advantage)
  • Renaming variables, methods (advantage)
P.K
+1  A: 

I'd say that the speed of making code changes or writing code is the biggest advantage. I have CodeRush and I am lost without it.

I'd say the biggest disadvantage is the memory footprint, if you are tight on memory then its probably going to hurt more than help. But I've got 4Gb and 8Gb on each of my dev boxes so I don't really notice. (Not that they take huge amounts of memory, but if you are 2Gb or less then it is going to be noticeable)

Also, I've noticed that the two big refactoring tools for .NET (RefactorPro/CodeRush and Resharper) both have problems with web site projects (A legacy inheritance so out of my control) with their code analysis/suggestion engine. Seems to think everything is bad (actually, that's probably a fairly accurate assessment for a web site project, but I don't want to be reminded of it constantly)

Colin Mackay
+1  A: 

Advantage

  • You are more likely to do the refactoring if a tool helps you.
  • A tool is more likely to get “rename” type refactoring right first time then you are.
  • A tool lets you do refactoring on a codebase without unit tests that you could not risk doing by hand.
  • A tool can save you lots of time.
  • Both the leading tools (RefactorPro/CodeRush and Resharper) will also highlight most coding errors without you having to a compile
  • Both the leading tools will highlight were you don’t keep to their concept of best practises.

Disadvantages

  • Some times the tool will change the meaning of your code without you expecting it, due to bags in the tool or use of reflection etc in your code base.
  • A took may make you feel safe with less unit tests…
  • A tool can be very slow…, so for renameing locals vars etc it can be quicker to do it by hand.
  • A tool will slow down the development system a lot, as the tool as to keep is database updated while you are editing code.
  • A tool takes time to learn.
  • A tool push you towards the refactorings they include and you may ignore the ones they don't, to your disadvantage.
  • A tool will have a large memory footprint for a large code base, however memory is cheep these days.
  • No tool will cope well with very large solution files.
  • You will have to get your boss to agree to paying for the tool, this may take longer then the time the tool saves.
  • You may have to get your IT department to agree to you installing the tool
  • You will be lost in your next job if they will not let you use the same tool :-)
Ian Ringrose