• andisent@lemm.ee
    link
    fedilink
    arrow-up
    2
    ·
    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

  • Deely@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    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.