« Will Rogers Does Software Development | Main | Temporal Correlation of Class Changes »

September 16, 2011



Would you say that the issue is Primitive Obsession and that a variation of the Null Object Pattern was the solution in this case?


(Please ignore the bit about Primitive Obsession - I misread the article.)


Definitely Primitive Obsession here: #class_name one day wants to be a method on FullyQualifiedMethodName. Not soon, mind you, but one day.

William Huong

I don't see what the problem is with just allowing the code to throw an exception and then handling the error at that time.

Bob Lauer

"Finessing Away Errors" seems to be a special case of "Designing Away Constraints" (albeit an important one), doesn't it?


How long did it take you to write this? This is Absolutely fantastic.

Alex Young

This is sort-of an application of the Null Object pattern. Or at least, it's the same reasoning that leads to the Null Object pattern.

Jonathan Hartley

@William Huong: I think the problem with raising and catching exceptions is that you don't end up with a useable result in that case, full of the non-exception cases. Doing it the way michael outlines, you always get a useable result out, so your program produces the desired output - even if there were 'error cases' in the mix.

iPhone contacts backup

So it is exactly what I need and I will keep it.
So. I think the best way to avoid mistake is that you do it yourself.

  cheap hats

184 I’ve read through a number of the articles in your website , and I love the way you blog. I included it to my favorites blog site list and will also be checking quickly. http://www.cheaphatsmart.com

The comments to this entry are closed.