CodeIt Right!

This is a first blush of a product I have tried out called Code It Right! from SubMain:
I will have to spend some more time with the product to give a more full featured review, as my circumstances are a bit unique.
First, I will start with what I like about the product. It folds into Visual Studio. Okay, so a lot of products do that. But, it also feels a lot like Visual Studio. In fact, if you routinely use Visual Studio Team System, it will feel a lot like the test loaders.
It is also very easy to use. In this instance, I am using Code It Right! on a legacy project, if you can call anything .NET legacy, that is. The project was first designed in .NET 1.1. To start the tool, you simply use the CodeIt.Right menu and choose Start Analysis. You then end up with a list of violations in the code. In this project, it looks like this. Ouch!
In many ways, the product reminds me of FXCop, except it goes through and corrects the code.
Before going deeper, I have to state that this is a very nasty project and most of the code is contained in the ASPX pages. Many of the rules here go contrary to the norm for naming in a website project, even though I would agree with what I saw.
With that disclaimer, I did find a couple of issues with the product. I cannot fully repro them, but when I do I will send them in to SubMain to get corrected.
The first issue was renaming of classes. In a website, Microsoft names the class by the convention folderName_aspxFileName.lang (where .lang is .cs for C# and .vb for VB.NET). This goes against the rules. I found that Code It Right! did not succeed in renaming, as it missed the <@ Page declaration. It is an easy fix to correct these, of course. It does seem to catch all of the code file changes.
One other glitch I found was in the product incorrectly commenting the wrong point in the code. I think this happens only when you apply changes individually, and may only happen when you apply changes it was not planning on making. In short, I believe if you apply the fixes all at once or re-analyze the site after applying selected changes in a file, you will not have an issue.

Other Features

Some other features, other than analyze and fix, are the following:
  • Go to source code where problem lies – this one is expected
  • Report view – This is a basic summary view of problems, but it does allow you to view the data in a variety of ways (and even export to Excel).
  • Configurable rules – I have not played with this feature yet. I did look at the SDK documentation, however, and it appears fairly straightforward.
  • Can exclude/include rules and even set them up in different profiles for different groups/projects, etc.
  • Some refactoring – primarily this is the abilty to fix errors by adhering to proper design patterns for .NET. I had to purposefully code in one of these problems to play with it, so it is not a big problem area for me.

My Feelings

This one is a bit of a mixed bag for me. Overall, I like the concept. As I have stated it reminds me a lot of FxCop with the ability to fix things.

I am not sure about the pricing structure, although I can certainly see this paying off for companies. In this one legacy project, it probably saved me a couple of hours or work with FxCop. At my pay grade, I came close to what it would cost to buy the basic version. And this was only one of a handful of projects created at the same time.

I would definitely like to see the rules understand a bit more about ASPX. This project, as stated, is unique. It is also done counter to my normal push of separating logic from the UI. If I were using this product daily (which I might now), I would opt for a couple of rules.

  1. Supress some of the naming rules when working with ASPX pages in a website (not sure about web applications, but I think they use namespaces instead)
  2. Check in prior to trying to clean a full project – this is good sense no matter what tool you are using
  3. When running selected fixes in a single file, open the file and make sure the changes do not hit the wrong section. If so, unapply the bad ones and then reanalyze prior to trying them again. When I have a more complete repro (and time to repro), I will make sure this one is logged with SubMain, as I see this as the biggest glitch.

If the value of a tool is based on what it saves a company, I believe this one will hold merit for many, if not most companies. I have not checked to see if there is any direct competition with the same features, however.

Peace and Grace,


Leave a Reply

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

You are commenting using your 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

%d bloggers like this: