I don’t know if this is a valid rant given the circumstances but I’m a junior working on a codebase started by a junior lead dev. So I was looking at a 500 line method and wondering how is it possible the codebase is so scrambled and I figured it out. It seems like this guy’s concept of code reusability is reusing the same methods by adding more parameters and work it out with a series of if’s and switches.

There would by a single method to manage an overly complex crud, pass it the action you need, along with 5 more arguments...💥🤯🔫

  • 10
    All hail the OMEGA FUNCTION
  • 2
    Is there a facsimile of this function we could see? It sounds awful.
  • 4
    Everytime someone complans about a n-hundred lines method, I remember my old workplace where they went by thousands.
    Thank God I ran away from there.
    Even though 500 is quite competitive
  • 5
    You should introduce him to the concept of method complexity.

    You should probably also introduce him to Fibonacci indentation.

    And if neither helps, maybe a rolled newspaper?
  • 1
    @Demolishun I’ve seen plenty of these haha
  • 1
    @Root rolled newspaper? ha ha ha. The guy should get his balls hit repeatedly with a pencil until he refactors that shit
  • 4
    @molaram Keyboard, then?
  • 1
    @Root We can do better. I mean, there must be like 10 people getting hit in the face with a keyboard every minute, nothing special about that.
  • 3
    @Demolishun There is no logic wrappers, everything seems like arbitrary comparisons and conditions to me, there would be an if statement then 100 lines later the same if statement with different code in it. There is a var named “proceed” with a default value of true that is used throughout the method.
Add Comment