• Lysergid@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    23 days ago

    TLDR;

    My current project has mostly easy to delete code and not easy to extend. Why? Coz shit was copy-pasted 50 times. It’s not fun to work in this project.

    • Kache@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      23 days ago

      I don’t understand, if you’ve got easy to delete copy-pasted code, then delete it. It’ll be a nice and cathartic exercise.

      But sounds like what you’re really talking about is code that isn’t easy to delete.

      • Lysergid@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        22 days ago

        I don’t understand too. Are you suggesting me to drop bunch of features in the product?

          • Lysergid@lemmy.ml
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            22 days ago

            No, that means you falling into author’s bait where they misuse term “delete”. Refactoring is not equal to deleting. One can be result of another. But the truth is that extendable code needs to be modular to be extendable. And modular code is easy to refactor. Author couldn’t not name it “Write code that is easy to refactor, not easy to extend” coz it’s even more dumb