41,057 reputation
1399186
bio website
location London, United Kingdom
age
visits member for 3 years, 10 months
seen 1 hour ago

Nov
18
comment Understanding the static keyword
@Allan: Arguably, if you're calling a public method on a class that doesn't affect the state of an instance of that class, it SHOULD be static, to make that clear to the client developer. If that method does so much that it needs mocking, that's a different problem that can be solved a number of different ways.
Oct
30
revised Should I store images in my database or file system in this application?
added 12 characters in body
Oct
30
comment Should I store images in my database or file system in this application?
@EsbenSkovPedersen: "Moving to a CDN" is the "that" in the sentence you quote ... maybe I should edit that line.
Oct
29
revised Should I store images in my database or file system in this application?
deleted 23 characters in body
Oct
29
answered Should I store images in my database or file system in this application?
Oct
28
answered How to set an ungoogleable coding test?
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.