Microsoft unveils new refactoring tool: CSCop

According to the German .NET developer magazine dotnetpro, Microsoft has shown a prototype of its new CSCop refactoring tool at CeBit 2005 (read full article here (in German)).

CSCop stands for Code Smell Cop and is developed by Microsoft Research. CSCop analyses .NET code (C#, VB.NET, and also IL) and - based on modern AI technologies like Bayesian networks - assesses if it needs refactoring.

This alone is already revolutionary since Kent Beck and Martin Fowler in Fowler`s book "Refactoring" stated, they could not give any hard criteria to determine the "unstructuredness" of code.

But Microsoft has not only solved this problem through merciless analysis of its own code base. In addition to this, Microsoft developed a completely new olfactoric user interface! CSCop flags code which needs refactoring by producing smells.

Kent Beck coined the term "code smell" and Microsoft took this to heart to develop a user interface orthogonal to the common visual GUI. When viewing "bad code" in VS.NET 2005 with the CSCop stick attached to the USB port, the developer will soon smell a unique stench characterizing the kind of "misstructure" he´s looking at.

According to Microsoft´s Steve Eson (lead developer of CSCop) it was quite difficult to find a set of "base smells" to mix all the necessary nuances of code smell from. Another challenge was to find a way to make the smells not too "sticky" but nonetheless be able to provide a characteristic smell for a whole application. CSCop currently is in beta 1.

We´ll see, if developers will embrace a tool which makes code structure quality so obvious to anybody entering their cubicles.

No Comments