Tools we use
I had discovered ReSharper some time ago reading a blog post on more efficient ways to code. At first I was skeptical, but after installing it I became a true believer in this tool. It helps me write more efficient code, creates some pre-defined functions that we all hate doing (standard get/set properties anyone?) and warns me of varieties of potential pitfalls where it comes to coding. One of the most shining examples of how useful this tool is came to me when I accidentally opened an old project that was abandoned quite some time. This particular project was done off site and I suspect that the code behind this abomination is now serving as a part storage for nightmare producing factory of some sort. Ok, that was an awkward sentence, let’s just say that the code is bad, alright? What ReSharper does by default is analyzes the code and provides a bunch of suggestions on how to make it proper. So I am opening this class which is somewhat large in terms of lines of code used (let’s say in the neighborhood of 10000 lines), and what do I see? ReSharper virtually shoots itself in a head from the sheer value of things that are wrong with class. I go through most warnings, and the suggestions that I see are right on the money. Unreachable else statements, unused variables, redundant calls, you name it. It does not pick up stuff like:
bool bGood = true;
if(bGood == true)
{
// then do something
}
and
if (i == 10)
{
i = 10;
}
But honestly, who can count on developer writing this type of garbage anyways? So just for fun I decide to clean it up. Took me about 8 hours, the code is now readable, and runs MUCH faster. No real performance measurements here, this was just a fun project for myself.
While ReSharper is great, I found that I tend to rely on it too much at times. It helps me create code faster, but at the same time I think less of things that might seem trivial, but at the same time under the right circumstances. Tools are here to help, but what happens when tools are making our job too easy.
I would love to hear from you on what tools do you use.
