• Platypus@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    3
    ·
    1 year ago

    I’ve been tasked with updating some code a senior programmer (15+ years experience, internally awarded, widely considered fantastic) who recently left the company wrote.

    It’s supposed to be a REST service. None of the API endpoints obey restful principles, the controller layer houses all of the business logic, and repositories are all labeled as services–and that’s before we even get into the code itself. Genuinely astounding what passes for senior-level programming expertise.

    • TheChurn@kbin.social
      link
      fedilink
      arrow-up
      22
      ·
      1 year ago

      In many cases, getting something out quickly is more valuable than having it be clean.

      Part of being a senior is knowing when fast is more important than perfect. Not saying your senior did everything right, just that a single example of someone’s code isn’t enough to judge the value of a person to an organization.

      • Platypus@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        10
        ·
        1 year ago

        Fair enough, though I contend that for a common-case application like a database-backed REST API where the architecture is basically standardized there is no meaningful time difference between writing crappy code in a clean architecture and writing a crappy pile of spaghetti.

      • steph@lemmy.clueware.org
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Forewarning : ops here, I’m one of the few the bosses come to when the “quick code” in production goes sideways and the associated service goes down.

        soapbox mode on

        Pardon my french but that’s a connerie.

        Poorly written code, however fast it has been delivered, will translate ultimately into a range of problems going from customer insatisfaction to complete service outage, a spectrum of issues far more damageable than a late arrival on the market. I’d add that “quick and dirty code” is never “quick and dirty code with relevant, automated, test coverage”, increasing the likelihood off aforementioned failures, the breadth of their impact and the difficulty to fix them.

        Coincidentally , any news about yet another code-pissing LLM bothers me a tad, given that code-monkeys using such atrocities wouldn’t know poorly written code from a shopping list to begin with, thus will never be able to maintain the produced gibberish.

    • AggressivelyPassive@feddit.de
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I have to deal with a similar guy. He reports directly to the COO and is considered an expert in his field.

      If I wrote his code in my former job, my boss would have asked me, if I’m having problems at home.

      Countless variables named tmp, i, j, k, x, value, etc., atrocious error handling (Java, he does no null chess, but simply wrap everything in a try/catch nullpointer block), and tons of spelling mistakes.

      Oh and tests are evil.