• andisent@lemm.ee
    link
    fedilink
    arrow-up
    27
    ·
    1 year ago
    1. Duplication of Knowledge is the Worst

    2. Code is a Liability

    3. Senior Developers: Trust but Verify

    4. TDD Is Legit, and It’s a Game-Changer

    5. Evidence is King

    • MonkderZweite@feddit.ch
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      Duplication of Knowledge is the Worst

      Ah yes, the 2 years old Xamarin project where i had the honor to explain the dev who wrote about 90% of it the term “technical debt”.

  • Deely
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    1 year ago

    Erm. Duplication of code is ok. Removing absolutely every duplicate function is just premature optimization imho.

    If you have two different customers with slightly different workflow then go ahead and create two mostly the same functions. When you will have 4 different customers with slightly different workflow, then its a time for refactoring, maybe extract basic same functionality into separate function/object, maybe introduce dynamic workflow using finite automata, maybe extract these functionality to separate modules… but never do it prematurily.

    Imho, sometimes ,removing of duplication very much increases complexity and code became hard to understand and hard to modify.

    • avalokitesha@discuss.tchncs.de
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      My understanding of that article was that it was not necessarily about duplicated code, but duplicated data. If you have two places storing the same data, and different parts of your app go to each of it, you need to somehow keep them in sync, and that’s often a pain.

      I’m trying to be very rigorous about avoiding that, duplicated code I’m a bit less rigorous about.

      • Von_Broheim
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        Microservices and document db’s go brrrrrrr. Data duplication is completely fine as long as there is only one source of truth that can be updated, all copies must be read only. Then the copies should either regularly poll the source or the source should publish update events that the copies can consume to stay in sync. It’s simple stuff but keeps your system way more available and fast than having multiple services talk to a shared db or worse, multiple services constantly fetching data through a proxy.

    • Chunk@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      1 year ago

      While you may be correct, if you’re on a dogmatic team, work with dogmatic people, or are a part of a dogmatic company, you probably need to avoid duplication. This is because duplicate code is an easy thing for a reviewer to nitpick and reviewing code can sometimes be more about showing off and less about ensuring code quality.

  • mrkite
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    I spent about 10 of those in roles where my primary function was to write code. The other 10 have involved managing programmers, coaching them, consulting with organizations about how to manage them, running a codebase assessment practice and these days, well, actually content marketing.

    Therein lies the biggest lie in development. There is no career path. I’ve been programming professionally for 25 years, and in all 25 of those years my primary function was to write code, because I turned down any promotion that would put me in management and away from doing what I love.

    • slipperydippery@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Why the resentment? There are obviously many career paths, and these can be just as fulfilling, challenging, technical and effective as any other (if done right).

  • Olap@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Evidence is king. Basically every point before it is supported by the last point, which is more than a programming point, but a life lesson

    This guy seniors, but, where can I vote for him?

  • somegeek
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    I don’t understamdduplicatiomn of knowledge. Can someone explain?