Monthly Archives: August 2007

Using CreateSUT() Rather Than TestSetup()

I recently attended a presentation on generics by Jean Paul Boodhoo for the Austin .Net User Group. The presentation was nothing short of amazing for many reasons, but I will save the details of that for another time. For now, I want to focus on a seemingly insignificant practice that I picked up from him […]

Posted in .NET, Test-Driven Development, Testing | Tagged , , | Leave a comment

When To Use a Factory

All too often I see people creating factory or factory methods for objects that could have just as easily been created by their constructor. The factory pattern is meant to encapsulate the complexity of object creation. If the creation process is not complex, there is little need for a factory. Here is one example I […]

Posted in Design, Patterns | Tagged , | Leave a comment

Clarity is the Prime Directive

To write maintainable code, clarity must be our Prime Directive. It is a given that the code must be functional, but it also must be clear. The code must be understood before it to be can be modified. We cannot change code which we do not understand. Simplicity is the essence of Clarity Simplicity is […]

Posted in Design, Principles | Tagged , | 1 Response

Why Static Methods Are Bad

Disclaimer: I am a firm believer that you should never say never…whoops, just contradicted myself. Well, you know what I mean: Most principles in development are not hard and fast. There are always cases for going against the grain. Every valid principle has an equally valid exception case where disregarding the principle can be advantageous. […]

Posted in .NET, C#, Design | Tagged , , | Leave a comment

Smaller User Stories = More Accurate Estimates

The larger your user stories are, the less accurately you are able to estimate them The smaller your user stories are, the more accurately you are able to estimate them At the new company I work at, one of the biggest problems they have had in the last few sprints is a lack of accuracy […]

Posted in Agile | Tagged | Leave a comment