• Solumbran@lemmy.world
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    9 months ago

    “The cult of understandable things”

    Yeah ok bro, sure.

    Who doesn’t like a gigantic shitty code that “just works” after all?

  • MagicShel@lemmy.zip
    link
    fedilink
    English
    arrow-up
    10
    ·
    9 months ago

    I think this author has some points, but this is attacking the wrong thing.

    Clean code is not the source of the problems described. If you see similar code and try to extract a common abstraction without further consideration, congrats, you’re thinking like a junior developer, and that’s not Clean Code’s fault, to pull one example.

      • MagicShel@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        9 months ago

        That’s not my observation. I could flip it around and accuse the author of defending massive if/else chains because my experience is that anything that needs more than a handful of lines of code is either a complex mapper or a nightmare of failed Boolean algebra.

        That doesn’t mean the bad code I’ve seen is OP’s fault. It means there’s a lot of shit programmers and adopting a particular style doesn’t fix it.

  • bitcrafter@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    9 months ago

    As someone who regularly has to deal with code that has been broken needlessly into smaller functions so that I have to constantly jump around to figure out what is going on, this really resonates with me.

    The latest case was someone who took something that really only needed to be a single function and instead turned it into a class with a dozen tiny methods.

  • luciole (they/them)@beehaw.org
    link
    fedilink
    arrow-up
    6
    ·
    9 months ago

    So I was coming here with my pitchfork to blabber about how code is written for humans and that it’s important to be simple and clear and stuff… but then I realized this was a jab about that dumb book. Fuck that book.

  • SamuraiBeandog@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    9 months ago

    This is an article by a person who doesn’t understand SOLID principles, talking about programmers who don’t understand SOLID principles.

  • resipsaloquitur@lemmy.worldBanned
    link
    fedilink
    arrow-up
    7
    arrow-down
    4
    ·
    9 months ago

    You see two functions that look similar. Clean Code sirens start blaring in your head. You extract a common abstraction. You add parameters to handle the slight differences. Then more parameters. Then a config object. Then a strategy pattern because you’re a Real Engineer™.

    I’ve watched dozens of hours of Uncle Bob videos (not by choice) and this isn’t what he advocates. At all.

    This author has no clue what they’re talking about.