January 30, 2012

The Best Design Patterns

The first time I read the Gang of Four Design Patterns book, I was impressed, no blown away, by the brilliance of what I was reading. The Visitor pattern utilizing double-dispatch. Brilliant. Chain of Responsibility. Why didn’t I think of that? Adapter. Simple and powerful. Of course I was itching to start implementing these patterns. In practice though they seemed to be applicable only in rare situations. Adapter, Builder, Factory, Strategy, were the most useful. Read more

October 13, 2011

Creating Mocks with F# Object Expressions

When I read about F# object expressions, the first thought that popped into my head was to use them to create mocks for unit tests.  For those of you who are not familiar with object expressions, they are similar to anonymous classes in Java.  They are the object equivalent of lambda functions, and they allow you to create objects that implement an interface or base class without having to declare a new class. Read more

© Joe Buschmann 2020