Move Over VirtuaCop, Fxcop is here to bust those bad code smells

October 6th, 2006

Some of you older readers out there may remember an OO language called Smalltalk. I luckly had the chance to use this wonderful language. Why so great? Well I like objects a lot, and smalltalk made a lot of object stuff really easy. People had written in unit testing, refactoring and even this code critic for most of the IDEs (called browsers, they’re neat, like virual OSes, check out one called Squeak).

Now, obviously the refactoring and unit testing stuff is great to have, but the code critic stuff, what’s that noise about? Well, its sort of a style-checking tool but also a “correctness” checking tool. By style I mean it’ll check for misspelled variable names and badly cased names, so it’ll catch and complain about variables like bitzhes and ones cased like jennaBOOBSIZE. So, it really help standarize the code when people on the project ran it, and actaully fixed the problems it found. Oh yes, and correctness. Things like using objects before they have a value assigned to them, or having unused parameters in a function call. Those things are probably bugs, or just bad ideas, so they should be changed.

Sadly, I’ve had to give up my code critic as I moved to visual studio, since it did not support Smalltalk, though it would be awesome of Microsoft cloned it and called it something like BaumerTalk. Everyfile code file have to start with the DEVELOPERS!!DEVELOPERS!!DEVELOPERS!! directive, and the compiler would show an animated image of Baumer clapping…..oh wait that’s a horrible idea.

But that brings me to FXCop, which IS a real Microsoft tool, but you need to be using .NET 2.0 for it to work. It basically does the same two things the smalltalk code critic did, but it’ll check your filthy C# or really filthy VB code. And it won’t just FIND the things it doesn’t like, it will give a good explaination of what the problem is along with a detailed way of fixing it. All in all, a great thing to have, since a tool that just bitches at you isn’t that great.
You can download FXCop from here: DOWNLOAD IT!!!

Entry Filed under:

2 Comments Add your own

  • 1. Impossible  |  October 9th, 2006 at 5:05 pm

    But does it work with native C++? That’s the question. Oh wait, us native C++ coders are too hardcore for stupid shit and foreign concepts like “coding standards” and “code review.” :)

  • 2. RohoMech  |  October 12th, 2006 at 12:30 am

    well, FxCop does its magic with reflection, something that C++ doesn’t really have…

    Just look at any open source project, look at is code…well, look at linux. Its crazy bizzare but that’s the standard they want. So even in the hardcore world, we’ve got FxCops running around, they’re just uber nerds instead of friendly programs.

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

September 2010
M T W T F S S
« May    
 12345
6789101112
13141516171819
20212223242526
27282930  

Most Recent Posts