CodeIt.Right Takes Refactoring To The Next Level


I’m a big believer in using refactoring tools to help improve the quality of the code I right.  I just added another tool to my arsenal called CodeIt.Right from submain.  I can’t say for sure whether the other tools commonly used will somehow perform the refactoring I’m going to show, but I can say I really like how CodeIt.Right does it.  When I say it takes it to the next level, what I mean is it shows me things I know I should be doing (or in this case I’m fixing code that I got from someplace else.   As it turns out, the place I got it from was Microsoft’s samples for building Windows Store 8 apps.  If you want to find the original code, take a look at the WindowsBlogReader example to find the “before” code.



I’m just going to show two examples below of what CodeIt.Right suggests. I’m going to show them as a before with Suggestion by CodeIt.Right, and after which is what CodeIt.Right did automatically if I accepted the suggestion.



Example 1


And, code it right gives a little background on why it is suggesting this (you can customize your own rules, but this is the default)


I chose “Change type of the exception..” which gives me:


And now, I have:



Example 2

And finally, this one is pretty self explanatory:




CodeIt.Right is a keeper!

About Peter Kellner

Peter is a software professional specializing in mobile and web technologies. He has also been a Microsoft MVP for the past 7 years. To read more about Peter Kellner and his experience click here. For information about how Peter Kellner might be able to help you with your project click here.

Follow me:


Get every new post delivered to your Inbox

Join other followers: