27

We've got a case statement spanning 3.5k lines.

Comments
  • 9
    As long as there's a case of beer at the end.....

    Or is all the logic in each case too?
  • 6
    @horus oh, each case spans an average of about 5 or 6 lines, there's just that many cases...
  • 2
    What's the condition that has that many values?
  • 5
    @alturnativ surrender all ur big data now, or I'll release the bots...
  • 7
    Good ol enterprise oriented development
  • 5
    Agile oriented development
    Product manager oriented development
    Stakeholder oriented development
  • 7
    Users can import data to our system using spreadsheets, the type of thing they are importing is determined by each worksheet name... The case statement goes through all the possible import types then calls the relevant import service 😭 such a mess
  • 3
    @alturnativ I found a similar situation in cur company but w/ other type of info

    and it's not even a switch... but each new case is a new if w/ more or less the same lines except for the query...

    and they won't give me the time to refactor that ( I already started when I had time w/o tasks, but it's frozen now )

    and I'm part of the problem now because new cases come around almost each week...
  • 2
    @We3D my brother 🤝😭
  • 1
    Honestly based
  • 2
    How is that even legal
  • 1
    That reaks of spiteful coding. Someone was pissed and wanted to take it out on others.
  • 1
    Reminds me of when I peered into this Redux state file of our frontend codebase... I closed the file when the initial state peered right back at me.
  • 1
    @alturnativ just check mine, urs is a ltl behind : 10k lines ( it has other logic too in that file but mostly is that cases... )
  • 3
    Am I the only one who had system of a down playing in the head with: "my case is so much bigger than yours"...

    https://songtexte.com/songtext/...

    If you replace all cocks with cases .... XD
  • 0
    That should either be generated or you have data/configuration bleeding into your codebase.
  • 2
    Throw it into a dictionary and call it a day. Or throw it into a SQL DB and do a where.
    This is maddening.
  • 1
  • 1
    This is a good argument for keeping a rubber mallet nearby to bonk someone with.
  • 0
    @TeachMeCode

    DOA:

    Development Of Arthritis.

    Dead On Arrival

    etc.
Add Comment