Developer Smell #1 - Notepad Developer
Over the years I’ve noticed quite a few of what could be called “Developer Smells”. Like a Code Smell a Developer Smell is a hint that something is not quite right. One such smell I notice almost every day is the Notepad Developer. When not in the warm, fuzzy embrace of Visual Studio, a Notepad Developer, turns to the other weapon in their editing arsenal: Notepad.exe. Working with said developer is often a frustrating experience as they fumble around the monochrome source looking for the relevant bits. Are you a Notepad Developer? If so, fear not, help is on the way. All you need to do is download one of the great notepad replacements for programmers. I use SciTE which is the shiznit - Small, lightning fast, customizable and supports all the languages I need and more. Others prefer Notepad2. You pays your money and you takes your choice.
Generic Closure
Sometimes you are unable to use generics at the class level. For example, within Windows.Forms, using class-level generic arguments breaks the designer. One solution is to use what I call a “Generic Closure”. Basically, you can use a generic argument at the method level and then save a block that captures some usage of the generic type. E.g.
delegate object Creator(); Creator _newT; void Foo<T>() where T : new() { _newT = delegate { return new T(); } } // then invoke the delegate sometime later: object t = _newT();
In this example the generic closure serves two purposes:
- It enforces a default public constructor.
- It allows us to new up a T without resorting to reflection.
Obviously, being able to use class level generics in this context is preferable so lets hope it gets baked in completely some time soon.
TFS CruiseControl.NET Plugin for CCNet 1.1
The latest release of the plugin doesn’t work with CruiseControl.NET 1.1 because it is referencing the 1.0 assemblies. Here’s a build that works with 1.1. NB. This hasn’t been thoroughly tested so the normal disclaimers apply :-)
Guidance Explorer
Microsoft P&P have just released beta 2 of a tool called the Guidance Explorer:
“Guidance Explorer is a tool to find and use relevant patterns & practices guidance. Guidance Explorer installs with a guidance library including performance and security topics for .NET and ASP.NET applications. The guidance library contains checklists and guidelines covering design, implementation and deployment topics. The tool and the library will evolve over time to include additional types of guidance.”
I downloaded and checked it out today and it looks quite promising. It’s basically a simple Smart Client application that presents a structured view of different types of guidance documentation. The documentation can be hosted on a shared server and the app also includes a search capability.
Stopping a TFS Build
Sometimes, for whatever reason, a TFS build will crap-out, but will appear to be still running. When this happens, you are usually unable to start another build because TFS forbids multiple builds running at the same time for a given project. To fix the problem use the tfsbuild command line tool to manually stop the build:
tfsbuild stop "http://server:8080" "MyTestTeamProject" "MyTestTeamBuildType_20050926.3"


