Pages

Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Thursday, 22 October 2009

DevExpress CodeRush and Refactor! Pro Review

I've been taking a look at this 2-product package from DevExpress over the last couple of weeks. These are my findings...

Pros
  • Adding cyclomatic complexity numbers to the left-hand margin of members was very nice. This gives you immediate awareness of whether your method needs to be refactored.
  • The Metrics window allows you to see any of the 8 measures for an entire class and then double click a member to dig down into the code. This I liked a lot.
  • Adding contracts to methods was reasonable.
  • Automatically greying out unused or unnecessary code (including namespaces, contexts and members) was very nice.
  • Inline ability to suppress suggestions for a varying scope was good.
  • Pull Member up. Lists parent classes to move a member to.
  • "Introduce a using statement" (to an IDisposable object) worked extremely well.
Cons
  • Initial thoughts are that it hides poorly written code and, thus, detracts from Craftsmanship.
  • I removed all the vertical connecting lines - far too messy.
  • The suggestion to make some variables inline was wrong. It makes the code harder to understand and, anyway, the compiler will do it.
  • The jump / break / return pointers are interesting and pretty, but it simply validates overly complicated code.
  • The suggestion to replacing objectName + ".sql" with string.Format("{0}.sql", objectName) is not necessary. Strings are, indeed, immutable; but you can concatenate them efficiently during the instantiation.
  • Suggestions to remove this. from variables - I didn't like that. I don't qualify methods with this, but I do for properties and fields. It would have been nice to separate the features.
  • I removed the Region Painting functions as it was less clear than VS's inbuilt features.
  • Disabled the Structural Highlighting. If you need an icon next to the word private to tell you that it's private then you really shouldn't be a developer!
  • Circular suggestions. Having converted a newed-up object to use Initialisers it then changed the suggestion to decompose it!
Wish List
  • A prompt to automatically end a #region. including the text e.g. #endregion Constructors.
  • Context-sensitive help in the Options dialog please.
  • Ability to add multiple metrics rather than just Cyclomatic Complexity or Line Count etc. to the left-hand margin of classes.
  • In the Option dialog identification of Level in the tree view would help.
  • A refactoring routine to create the protected On() method for events.
Conclusions? Well, overall, not bad at all. I thought I wouldn't like the interaction and the perceived lack of control; but it was actually pretty easy to use. It does take a while to learn. You just have to get stuck into some code and see what it suggests. Soon you'll find yourself wondering whether it can do xyz for you - normally it can. I, personally, will be keeping it.

My biggest fear is that too many of the features are there just to mask bad code design.

Tuesday, 15 September 2009

RSS Mashup for VS2008

Having stared at the VS2008 homepage for more than a year now and realised that the RSS content hadn't updated, not once, I finally decided a change was in order. I use my HTC HD mobile RSSHub for all my 'real' news reading and I subscribe to over 70 feeds. VS2008 can handle one - so my options were rather limited!

That is until I discovered xFruits. They offer a blindingly simple mashup facility whereby you can take n feeds and squeeze them into one. The resultant feed itself has its own url. Now my VS homepage subscribes to one feed that contains the headlines for my most read subscriptions. The RSS -> PDF function is pretty cool too!

Simple and fantastic.

Thursday, 21 May 2009

Oi Microsoft, this IS part of Development!

I've hit a rather frustrating wall whilst implementing my Build Server for TFS 2008. As a company we have licenses for TFS 2008, VS2008 Development Edition and VS2008 Database Edition. Note the absence of VS2008 Test Edition (this is important!).

Our dev branch of source control is using a Continuous Integration model and builds the entire application on every checkin. Marvellous. However, I have been struggling to get the build to run (and report on) Code Coverage as part of the Unit Tests.

Turns out that you need to have VS2008 Test Edition installed on your build server. WTF!? Firstly, why should I need any client-side applications installed on my server for it to work (you need VS2008 Developer Edition to run Unit Tests as part of the build)? Secondly, why is Code Coverage considered part of the Test Edition? As a developer, a core part to producing good software is Unit Testing - which is worthless without a measure of Code Coverage!

Come on Microsoft. You've got to give us proper tools if you want us to continue developing for your platforms. Hopefully, life will change with VS2010?

Many thanks to Buck Hodges for responding to my emails and helping clarify the situation.