Monthly Archives: October 2008

Searching for a read-only list

A while back, Eric Lippert talked about arrays being somewhat harmful.  The reason being, if you’re looking to create logical immutability, arrays aren’t it.  Array length is immutable, but its contents aren’t.  If you need to return an array, make … Continue reading 

Posted in C# | 6 Comments

Testing fun with ASP.NET MVC

So I assumed that much like MonoRail, ASP.NET MVC would have created, at the very least, abstractions on top of HttpContext.  Although HttpContext is an absolute beast of a god class, creating an abstraction is possible.  Let’s look at MonoRail’s … Continue reading 

Posted in ASPNETMVC, MonoRail | 4 Comments

Hail to the king, baby!

Looks like StructureMap 2.5 dropped this weekend.  Which is nice, as we’ve been running off of the trunk for around six months. On a side note, I never really *openly* mocked the release as the Duke Nukem Forever release, just … Continue reading 

Posted in StructureMap | Leave a comment

Where are the DDD sample applications?

It’s a question I see quite a bit, on the ALT.NET mailing list, the DDD mailing list, and any other medium where DDD comes up.  For those trying DDD, this is a rather difficult question to answer.  Many have tried … Continue reading 

Posted in DomainDrivenDesign | 20 Comments

Encapsulation and thinking behaviorally

I’ve been reading quite a bit lately about setters and encapsulation, but for whatever reason, it never really “clicked” for me.  I thought I was developing behaviorally, as I’ve been using the Context/Specification style of BDD specifications for a while.  … Continue reading 

Posted in BDD, BehaviorDrivenDevelopment | 4 Comments

Fluent hierarchical construction

Building a hierarchy of objects doesn’t happen that often in code, but when it does, it can get pretty ugly.  Most of the time, the hierarchy will come out of the database.  Recently, we had a hierarchy that needed to … Continue reading 

Posted in C# | 14 Comments

Acceptable test failures

As Derick Bailey pointed out in my last post, one of the annoyances with ReSharper is the NotImplementedException it puts in when you generate a method.  Going from the TDD side, this is exactly what we don’t want when we’re … Continue reading 

Posted in TDD | 5 Comments

NotImplementedException and the Interface Segregation Principle

This week, Derrick Bailey will be in town (Austin) to talk about the SOLID principles.  One of the hardest ones to talk about, and find examples for, is the Interface Segregation Principle.  The ISP states: CLIENTS SHOULD NOT BE FORCED … Continue reading 

Posted in CodeSmells, Design | 7 Comments

Three simple Rhino Mocks rules

In previous versions of Rhino Mocks, the Record/Replay model was the only way to create and verify mocks.  You would have an area that set up expectations in a record mode, then the replay mode would verify your expectations.  What … Continue reading 

Posted in RhinoMocks, TDD | 15 Comments

Transitioning between consulting projects

Starting at Headspring gave me the first opportunity in my career to do consulting work.  I had previously worked in a startup, a product team and a large IT department.  In each of those cases, I didn’t leave a job … Continue reading 

Posted in Misc | 2 Comments