Skip to content

CodeIt.Right Takes Refactoring To The Next Level

Updated: at 02:12 PM

Background

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.

 

Examples

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

image

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)

image

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

image

And now, I have:

image

 

Example 2

And finally, this one is pretty self explanatory:

image

 

Conclusion

CodeIt.Right is a keeper!

Check out the ORM (Object Relational Mapper) PRISMA. The database access method I use in all my projects