40,817 reputation
1399186
bio website
location London, United Kingdom
age
visits member for 3 years, 9 months
seen yesterday

Oct
15
comment What is the difference between the factory pattern and abstract factory?
@SerG Well, in fairness, you've picked up that quote from Wikipedia, on a page that read very differently three years ago. I would argue that the current Wikipedia page contradicts itself in several places, but I don't have the desire to get involved in picking that apart. What I would concede, in hindsight, is that the example I've provided here is a specific kind of Factory Method, known as the Parameterized Factory Method. But the point about the difference between Factory Method and Abstract Factory holds across all types of Factory Method.
Oct
13
awarded  Nice Answer
Sep
30
awarded  Explainer
Sep
2
awarded  Good Answer
Aug
28
awarded  Good Answer
Aug
4
comment Best practices for unit testing methods that use cache heavily?
@Jonathan: "Just have a Repository and a Caching Wrapper that use the same interface" -- if they have the same interface, you can use the same methods. The calling code doesn't need to know anything about implementation.
Jul
18
awarded  Enlightened
Jul
18
awarded  Nice Answer
Jul
2
awarded  Curious
Jun
27
comment Passing central objects around or having global instances?
The second rule of thumb is "always take with a pinch of salt any rule of thumb that starts 'never'." However, in this case, I would err on the side of too-strict.
Jun
23
awarded  Good Answer
Jun
18
comment Why was C# made with “new” and “virtual+override” keywords unlike Java?
@C.Champagne: Any tool can be used badly and this one is a particularly sharp tool -- you can cut yourself easily. But that's not a reason to remove the tool from the toolbox and remove an option from a more talented API designer.
Jun
18
comment Why was C# made with “new” and “virtual+override” keywords unlike Java?
@C.Champagne: You're still confusing override with new. They're not the same; not even close.
Jun
18
comment Why was C# made with “new” and “virtual+override” keywords unlike Java?
One excellent use of new is in WebViewPage<TModel> in the MVC framework. But I have also been thrown by a bug involving new for hours, so I don't think it's an unreasonable question.
Jun
13
comment Combinatorial explosion of interfaces: How many is too many?
@mga: Not knowing what Foo and Bar do, it's hard to say. I can think of circumstances where I'd give either answer. And circumstances where I'd derive one interface from the other, and circumstances where I wouldn't. Unfortunately, this is the kind of thing where experience will tell you what to do. Whether that be an experienced colleague, or an answer to a specific question here or on codereview, or simply taking an educated guess and learning from getting it wrong. (Which is what most of us have done at some point.)
Jun
12
revised Combinatorial explosion of interfaces: How many is too many?
added 699 characters in body
Jun
12
revised Combinatorial explosion of interfaces: How many is too many?
added 699 characters in body
Jun
12
answered Combinatorial explosion of interfaces: How many is too many?
Jun
6
comment Liskov substitution principle with abstract parent class
Can you link to the blog post, so we can see that claim in context?
Jun
1
awarded  Nice Answer