• Windex007@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    When you start to bump into any of these concerns, I’d recommending extracting the functions themselves, rather than breaking the pipeline… which was not something mentioned or explored.

    • bitcrafter@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      One can definitely go overboard with this, though. I have had to read a lot of code where someone broke something up into several functions that only had the effective of forcing me to constantly bounce around all over source file to figure out what was going on without improving clarity at all.

      • clif@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        Ugh, SonarQube with the cognitive complexity check.

        “Instead of having 50 lines where all logic is right here, I’mma need you to break it up into 10 separate functions so it’s a massive pain in the ass to figure out what the fuck is going on”

        I understand the reasoning but sometimes it’s way more confusing to split up complex logic instead of just having it all in one place.