• hperrin ( hperrin@lemmy.ca ) 
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        7 months ago

        The one in Port87 is the only patent I have, and it is not copyleft. I have tons of open source code that I could have patented, including in Nymph, but didn’t. Now that prior art exists and is in the market, those things can’t be patented.

        There’s very little reason to seek a patent except to offer the product for sale in the market. It’s wildly time consuming and expensive. Mine cost me about $17k and took me three years to get. And I’m not a big company with mountains of cash and lawyers on the payroll. I patented it so that Microsoft, Google, etc. couldn’t just see my idea and be like, “that’s good, let’s take it”. That would kill my business. Copylefting the patent would allow them to do that.

    • Most of the unmaintainable code I’ve seen is because businesses don’t appreciate the need to occasionally refactor/rewrite or do anything to maintain code. They only appreciate piling more on. They’d do away with bug fixing too if they could.

      • Tja ( Tja@programming.dev ) 
        link
        fedilink
        arrow-up
        6
        ·
        7 months ago

        Many opensource projects are in same state, I know for sure my projects become spaghetti if I work more than a year on them.

        Besides, I’d argue that if you need to rewrite (part of) it is because it wasn’t maintainable in the first place.

        • I disagree. Rewriting is a core component of maintaining a code base. It’s the evolution of code. Not rewriting and hooking in some janky way is much worse. No one can see all the possible needs of code the first time they write it. Or even the tenth. Updating the code by rewriting sections is the healthier way to use everything you learned since the first time you wrote it to keep it clean and improve it.

          • Tja ( Tja@programming.dev ) 
            link
            fedilink
            arrow-up
            2
            ·
            7 months ago

            Well, if rewriting is maintaining, everybody can write maintenable code.

            Did it become a mess? Rewrite time!

            For me the art is writing it so you don’t need to rewrite and you don’t need a janky temporary permanent workaround if requirements change. Clean interfaces, SOLID, plug-ins, etc. Can’t do it myself, but the legendary 10x devs usually do.

            • 0ops ( 0ops@piefed.zip ) 
              link
              fedilink
              English
              arrow-up
              4
              ·
              7 months ago

              I don’t believe in code that never needs a rewrite, but scalable code should be compartmentalized and future-proofed to the point that the next rewrite can be pushed as far into the future as possible. Me personally, I tend to discover what these best practices are during those rewrites.

            • All code is maintainable with enough time and money.

              But yes, well structured code where those rewrites are minimal is the goal.

              There probably is a threshold where the amount you have to rewrite becomes too high. But with each rewrite, hopefully the next time you have a section you need to redo its smaller that before. Eventually going from rewriting a couple thousands of lines to just a hundred or so on the 5th iteration.

          • Exactly. Elegant code requires domain expertise, which no one has on during the first attempt.

            Strident attempts at elegance during the first domain-expertise-free try tend to just result in different kinds of shitty code.

            Of course, experienced programmers can obviously achieve lower shittiness, from day one.

            But truly elegant code requires exploring the domain, and learning what works there.

            Shitty or barely-good-enough code often walks so that elegant code can someday replace it.

        • odelik ( odelik@lemmy.today ) 
          link
          fedilink
          arrow-up
          1
          ·
          6 months ago

          I disagree.

          Rewrites can happen due to new feature support.

          For examlle: It’s entirely possible that a synchronous state machine worked for the previous needs of the software, but it grew to a point where now that state machine is unable to meet the new requirements and needs to be replaced with a modern fam with asynchronous singals/delegates.

          Just because that system was replaced doesn’t mean that it wasn’t maintainable, wasn’t readable, or easy to understand. It just wasn’t compatible with the growing needs of the application.

    • It really depends on the situation. Can I write maintainable code? Yes, to the extent that the average senior dev can.

      But that isn’t the same as being afforded the chance to write maintainable code. I’ve been part of teams where the timeline is so tight that technical debt is just a thing that builds up to be dealt with “later” and more stress is put on getting things done instead of keeping things maintainable.

      The fact of the matter is that humans can while LLMs currently can’t.

      On top of that, a human dev is going to be able to understand context a hell of a lot easier if they’ve previously worked on it, even if the code is less maintainable.

      • Tja ( Tja@programming.dev ) 
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        Well, I interpret the question as “can you write maintenable code under typical corporate conditions and timelines”. Very few can, but I’ve seen them.

  • Fatal ( Fatal@piefed.social ) 
    link
    fedilink
    English
    arrow-up
    22
    ·
    6 months ago

    Guys, you can laugh at a joke. The AI doesn’t win just because someone upvoted a meme. Maintainability of codebases has been a joke for longer than LLMs have been around because there’s a lot of truth to it.

    Even the most well intentioned design has weaknesses that we didn’t see coming. Some of its abstractions are wrong. There are changes to the requirements and feature set that they didn’t anticipate. They over engineered other parts that make them more difficult to navigate for no maintainability gain. That’s ok. Perfectly maintainable code requires us to be psychics and none of us are.

  • More maintainable that whatever shit it put out

    Frankly I believe it can be maintainable if the person doing the prompting actually does something and correctly do their role of human reviewing and correcting. Vibe coding without any review is dooming the software maintainability

    • Ephera ( Ephera@lemmy.ml ) 
      link
      fedilink
      English
      arrow-up
      8
      ·
      7 months ago

      In my experience, the biggest problem is that maintainable code necessarily requires extending/adapting existing structures rather than just slapping a feature onto the side.

      And if we’re not just talking boilerplate, then this necessarily requires understanding the existing logic, which problems it solves, and how you can mold it to continue to solve those problems, while also solving the new problem.

      For that, you can’t just review the code afterwards. You have to do the understanding yourself.
      And once you have a clear understanding, it’s likely that the actual code change is rather trivial. At least more trivial than trying to convey your precise understanding to an LLM/intern/etc…

  • aMockTie ( aMockTie@piefed.world ) 
    link
    fedilink
    English
    arrow-up
    9
    ·
    7 months ago

    I would like to think that I’m capable of writing maintainable code like seemingly everyone else in this thread, and I have multiple code bases that have existed for decades that have included necessary updates over time to reinforce that opinion.

    I’ve also seen some truly unfathomable, Lovecraftian horror code in the wild that has persisted for decades.

    Seeing Will Smith’s character as a representative of humanity, and Sonny as a representative of LLM/GenAI in that context makes this joke absolutely hilarious.

    • Exactly. I’ve been sabotaging the AI with shitty code output since long before LLMs existed. That’s how I play 4D chess. (This is just meant to get a laugh. Some of my code is even quite nice, actually.)