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*

11
  • Which programming language? Commented Mar 19, 2018 at 20:28
  • @RobertHarvey Looks like java or c#. Is that really relevant for the overall design? Commented Mar 19, 2018 at 20:29
  • Yes, it is. Different languages have different idioms. Commented Mar 19, 2018 at 20:30
  • @RobertHarvey whoops, totally failed on that one lol. It's Java. Commented Mar 19, 2018 at 20:35
  • 3
    Strictly speaking, DRY does not apply to mere method calls, but only to the method bodies. You would only consolidate method calls if you wanted to compose functionality, as in void showInterstitialAdConditionally() { if (!isSubscriptionActive() && isEventThresholdMet()) { showInterstitialAd(); } } Of course, you would need a new composition class that pulls together all of the necessary classes to make this happen. Commented Mar 19, 2018 at 20:49