52

If you're a developer that enjoys 200+ line methods with 5+ return points, and literal strings all over the place, please punch yourself, hard.

Comments
  • 3
    Two words...code review.
  • 3
    And repeatedly
  • 2
    @hermitdev sometimes you just inherit a pile of shit.
  • 0
    Ye much better to pull this out into a bunch of interfaces, factories, services, abstract classes, and all the implementations of the above, pepper in some util methods or classes noone is ever going to reuse, and properly bloat this fucker up beyond any recognition for no reason.
  • 1
    200+ lines method = disgusting
    Literal string = eye cancer
    5+ returns = acceptable when functioning as guard clauses or as an early bailout in method that don't need to continue (only when it's readable)
  • 2
    @StrucN 5+ sounds like a lot to me. But yes, we use early returns as guards often in our code as well, to prevent expensive operations.
  • 0
    @Npstr do you find it difficult understanding a well designed API? Everything you named is very useful if used correctly. Those aren't just things you create for the sake of having them.
Add Comment