Monthly Archives: September 2008

JavaScript block scoping

I’m going through JavaScript: The Good Parts (which I highly, highly recommend), and I’m finding I knew next to nothing about JavaScript.  For example, this does not compile in C#: public void TestScope() { if (true) { int i = … Continue reading 

Posted in JavaScript | 5 Comments

A TDD investment addendum

I completely left out one very important tip in my top 10 tips to get a return on your TDD investment: Take advantage of pair-programming. Pair programming is a great teaching device, as it lets two people go back and … Continue reading 

Posted in TDD | Leave a comment

Ten tips to maximize the return on your TDD investment

Paul Cowen presented an interesting personal observation of using TDD on the ALT.NET mailing list, under the title “TDD + effort != return“.  The implication being that doing TDD requires extra work during development, extra work in training, extra work … Continue reading 

Posted in TDD | 6 Comments

Interfaces and isolation

Roy Osherove has suggested a new name for mocks, fakes, stubs or any test double: Isolation.  True, the myriad of test double names can muddy the language, and Meszaros’ suggested name of “test double” still confuses people that don’t get … Continue reading 

Posted in TDD | 9 Comments

TDD design trade-offs and junk food

Tony Rasa recently talked about design trade-offs when doing TDD: When “doing TDD,” we consciously make design trade-offs to favor testability. … we end up with a lot of single-implementation interfaces because of testability concerns and from weaknesses with our … Continue reading 

Posted in TDD | 19 Comments

Integrating StructureMap and NHibernate with WCF

Following many examples I found online for other IoC containers, I borrowed utilized those designs to create a StructureMap instance provider.  One problem we ran into with that design was dealing with NHibernate.  Mainly, there are two types that are … Continue reading 

Posted in NHibernate, StructureMap, WCF | 16 Comments

Some IoC Container guidelines

So Derick Bailey asked me the other day a few weeks ago to describe how we use our IoC container.  I wouldn’t call it “best practices”, though some of these tips came from the creator of our container of choice, … Continue reading 

Posted in StructureMap | 10 Comments

Quality and code coverage

It’s an age-old question: should our team’s goal be 100% coverage?  A valid question, but one I’ve never much cared about in practice.  The idea is that the team, all practicing TDD, should dutifully measure and add unit tests until … Continue reading 

Posted in TDD, Testing | 5 Comments

On passion

One of my favorite bloggers, JP Boodhoo, has a little saying he puts at the end of every post: Develop with passion! I’ve only met JP once, and it was quite obvious from that meeting that passion is somewhat of … Continue reading 

Posted in Misc | 11 Comments

Building arrays in StructureMap 2.5

Although it was possible in previous versions of StructureMap, the new fluent interface for StructureMap configuration in version 2.5 allows easy configuration of array type constructor parameters.  For example, consider a simple order processor pipeline: public class OrderPipeline { private … Continue reading 

Posted in StructureMap | 2 Comments