Dec 15, 2020
I don't care if it's 1000 times. I when I call GetMonthlyDiscountCoupon() to either be able to get one or not. Not finding a coupon can either be expressed as a null value, a boolean value, whatever. DRY is not the most critical software development principle. It is much more important that the abstraction make sense. A zero amount coupon to replace a null value is deceptive.