StyleCop Goes Public (finally)

by David 7/30/2008 2:37:00 PM

One of the things I missed most from my days at MS was StyleCop - a simple (internal) tool to make following coding guidelines second nature and end all (read: "most") arguments about whether your constants should be uppercased or not (etc).  In a nutshell StyleCop plugs into VS.Net and gives you build errors if it detects your code is not conforming to the configured coding standards - simple.  A silver bullet for enforcing coding standards across a team.

It's been more than a couple of years since I moved on from MS, but in May they finally released it to the masses (thanks to Howard for the heads up on this).  There seems to have been some confusion over the naming; initially being released as Source Analysis and then reverting back to StyleCop hence URLs still refer to Source Analysis.

More info here:

.Net RegEx Tools

by David 7/30/2008 2:13:00 PM

Regular Expressions tend to be one of those things in development that are rarely mastered, but rather cobbled together or "borrowed" at the point you know what you want to do is best accomplished with a RegEx, but you don't quite have the smarts to write and test the full expression yourself.  I've been trying to improve this personal trait of late, by going back to basics and learning the syntax properly from the basics up.

Anyone doing the same or simply authoring a RegEx will want a tool to help.  I've been using Rad Software's Regular Expression Designer and it's pretty good (and free).  Firstly it's all about .Net RegEx's (a lot of tools are not) and it has a pretty handy Language Elements panel that breaks down the various language elements, allowing you to easily insert them into your expression - perfect when you can't quite remember the correct syntax.  The UI layout can be a bit funky, but I can live with that.

If you're on the move and/or need something quick and simple - then Derek Slager's online .Net RegEx Tester is also pretty handy.

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen