Automated refactoring for C++

During the year that I  was on a Java project, I found Eclipse’s automated refactoring tools such a productivity boost.  I remember doing probably my first automated Extract Method and seeing it automatically deduce which parameters would need to be passed, and saying “No way.  No way!” And then you could rename methods (and it would update the dependencies); you could extract a local variable; you could do a quick fix… I would find myself giggling and sometimes laughing out loud – there were all these mundane, tedious and error-prone manual manipulations of source code that I was used to doing, being careful and manually checking everywhere to try not to miss something – and now that I could use the Refactor menu my mind was freed to think about the problem I needed to solve.  Wow!

Automated refactoring was such a productivity and energy boost.  I don’t want to go back to the way it was before.  So, now that I’m in C++,  I’m interested in finding an automated refactoring tool for C++ – preferably one that integrates with Visual Studio.

What’s Out There?

For C++ development, a quick Google search turned up devexpress‘s Refactor! for C++ and Whole Tomato Software‘s Visual Assist product, both of which integrate with Microsoft Visual Studio.  Refactor! for C++ is a free download, whereas Visual Assist costs $249 with $49 maintenance renewals (or $99 for a license that is not eligible for the renewals).

This post on gamedev.net refers to SlickEdit as an alternative.  Ah yes, apparently SlickEdit can do refactorings in C++ .  And it appears that some people around here already use it. Hmm!

For Tonight’s Program, the Screenshots Part Will Be Played By…

Here is the part where I would take a bunch of screen shots demonstrating the use of Extract Method… but Whole Tomato has a nice post about that on codeproject already.  Helpful to see the tool in action.

Out With a Whimper

And to add to the letdown of me not having my own screenshots… I haven’t come to a conclusion yet either.  I have SlickEdit, the trial version of Visual Assist X, and Refactor! for C++ installed.  Guess we’ll try ’em and see!

(Const) References

Refactoring Tools Shoot Out by Legalize Adulthood

All developers are equal, but some are more equal… (Maciek Talaska)

A couple of Stack Overflow exchanges pointing to Refactor and VAX

SlickEdit – Programmer’s Editor (cplus.about.com)

Are We There Yet? SlickEdit’s C++ Refactoring

Advertisements

, , ,

  1. #1 by legalize on September 20, 2009 - 11:49 am

    The giddy feeling you describe is shared by my coworkers who now cannot imagine living without Visual Assist X. They also tried the free Refactor download and found it so horribly slow that it was unusable. While VAX costs money, its a much better tool IMO.

  2. #2 by JimmyBean on October 1, 2009 - 4:28 am

    I don’t know If I said it already but …Excellent site, keep up the good work. I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks, :)

    A definite great read..Jim Bean

  3. #3 by danielmeyer on October 5, 2009 - 8:29 am

    Jimmy,
    I have this odd feeling you may be a spambot… but at this juncture I’m happy to accept compliments from spambots too (kind of like my church softball league when I was a teenager — we lost so often that we didn’t mind if our getting on base was only a result of the opposing team’s error: “We’ll take it!” :)

    So, thanks for the compliment!
    -Daniel-

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s