• wise_pancake@lemmy.ca
    link
    fedilink
    arrow-up
    27
    ·
    11 months ago

    This is so true.

    Even if you do design clean modular code and document it, you’re getting a question a year from now about how it works, or someone just duct tapes on top of it.

    • BakedCatboy@lemmy.ml
      link
      fedilink
      English
      arrow-up
      14
      ·
      11 months ago

      I’ve even experienced this in the 3D printing community, where I design a highly parametric model and put lots of effort into making all of the major dimensions and qualities parameterized and dynamically adjustable, with lots of bounds checking and value clamping, with all the parameters at the top of my scad file with comments explaining what each variable does.

      And then someone comes along to remix my model, says I don’t want to install openscad, and just scales the entire output stl to change the dimensions, squashing all the features of the model in the process (instead of having the size gracefully adjust with all the features moving around to account), and leaving anybody starting from their work with a hard to remix mesh with no parameters.

    • FMT99@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      edit-2
      11 months ago

      Or business decides all specs and design decisions that were made last quarter were actually garbage and yes we do want to be able to manually override every step of the carefully designed state machine. We’d like to be able to manually change all calculated sales data, but also the data needs to remain in a consistent state at all times. Oh and while you’re there, we decided the commission calculations will use a different system from now on. We expect it to be online by the end of the week, thanks.

    • amirulmenjeni@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      11 months ago

      Really? The opposite is true for me.

      Working with devs who aren’t familiar with design patterns, introducing design patterns by simply implementing them (in a new project) allows it easier for the devs to follow the implementation as examples, even though they aren’t necessarily familiar with the design pattern concepts.

      At least they can observe the patterns and replicate the patterns elsewhere.

  • armchair_progamer@programming.dev
    link
    fedilink
    arrow-up
    16
    arrow-down
    1
    ·
    edit-2
    11 months ago
    public class AbstractBeanVisitorStrategyFactoryBuilderIteratorAdapterProviderObserverGeneratorDecorator {
        // boilerplate goes here
    }
    
  • Skullgrid@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    11 months ago

    You avoided writing spaghetti code.

    Congratulations! Now maintain this piece of shit lasagna that takes place over multiple layers of abstraction and repositories.

    • lobut@lemmy.ca
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      Onion architecture. Ports and adapters are other names for it, I think.