Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 4
    There are other things in this class that would bother me, like ... else if (ContactAddress.GetBrokenRules().Count > 0) AddToBrokenRulesList(brokenRules, ContactAddress.GetBrokenRules()); instead of simply ... else brokenRules.AddRange(ContactAddress.GetBrokenRules()) Commented Aug 29, 2013 at 13:15
  • 1
    Moreover, the repetition of brokenRules.Add(new BrokenBusinessRule(...) should IMHO be refactored to one method. Commented Aug 29, 2013 at 14:10
  • 3
    Is that code a starting point that he improves over the course of the book? Maybe it is bad on purpose. Commented Aug 29, 2013 at 14:30
  • 7
    Whoever introduced the term "validation" here has muddied the pool. The linked code snippet shows that these checks do not prevent the construction of the object; they're used somewhere else to decide whether or not the borrower gets a loan. A borrower object which fails these checks is not an invalid object, just a poor credit risk. All that anaemic model waffle is completely irrelevant. Commented Aug 29, 2013 at 15:20
  • 1
    One not to buy, then. Saved us all some money. Commented Aug 29, 2013 at 21:37