• ChickenLadyLovesLife@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    31 minutes ago

    I started working as a professional programmer in the mid-90s when three-tiered design was all the rage: a data access layer, a business logic layer, and a presentation layer. It seems that nobody actually knew what “business logic” was even supposed to be, because I kept inheriting projects where all the middle tier did was hand data objects from the data layer to the UI. In theory this prevented the UI from being fundamentally bound to the data access, but all three layers were always written in Visual Basic which got kicked to the curb in a few years anyway.

  • addie@feddit.uk
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    2 hours ago

    Abstraction is not very compatible with concurrency, so as well as your your beautiful abstract API, you also need some ‘cut through the layers’ functions to return the underlying classes you need to synchronise on. Now you have a right mess that’s incredibly hard to understand, infuriating to debug, and impossible to refactor. Best you can do is put another layer of abstraction on top. Repeat every six months.

    • 3abas@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      31 minutes ago

      That’s just bad interface… When you design an API as if operations were independent, but they aren’t, you run into these issues.

      Don’t add “cut through the lawyers” functions, fix your interface.

      • Buddahriffic@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 minutes ago

        Yeah, well-designed abstraction can help enable more concurrency. That said, concurrency isn’t easy at any point once there’s shared data that needs to be written to during the process. Maybe it’s not so bad if your language has good concurrency support (like monitor classes and such that handle most of the locking behind the scenes), but even then, there’s subtle pitfalls that can add rare bugs or crashes to your program.

  • db2@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    3 hours ago

    They look so painfully awkward, like a parent should be telling them to knock it off or something.

    • Bosht@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 hour ago

      If you haven’t seen the vid it’s 500 levels of awkward cringe that’s hard to watch. Had to do with one of the MS version releases. They’re acting so awkward you can’t tell if they’re yakked out in coke or just that socially awkward. Full disclosure I’d be worse than them in that situation, just calling it like it is.

  • Randelung@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    3 hours ago

    I recently started a new job. We use Java. There’s a class that does a few things based on explicit arguments only to decide whether to use an FTP or file output, and you supply all parameters yourself. A whole ass Rube Goldberg machine that could be replaced by a single line of Files.writeString.

    Also, there’s a great video on YT “Stop writing classes” that is incredibly relevant.

    • Windex007@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 hours ago

      This hits.

      I stepped into a similar implementation. Took like 6 months and 10 people to support…

      … changing the URL of the sftp server we connected to.

  • WanderingThoughts@europe.pub
    link
    fedilink
    arrow-up
    24
    ·
    6 hours ago

    Just got out of a discussion with a supplier. We can do what we needed by connecting to the database. Instead we have to go through four layers of different tech to arrive at the same point in the database otherwise it’s not compliant. That the supplier needs to sell a license for those layers is purely coincidental.

    • expr@piefed.social
      link
      fedilink
      English
      arrow-up
      6
      ·
      3 hours ago

      Obviously don’t have the full context, but rarely is it ever advisable to give third parties direct access to a database. There are many reasons for this, like, for example, the fact that doing so makes schema migrations practically impossible.

  • red_tomato@lemmy.world
    link
    fedilink
    arrow-up
    60
    ·
    9 hours ago

    Why should I want simplicity? I want to make unnecessarily complex programs to gatekeep those pesky junior programmers.

  • Zannsolo@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    edit-2
    8 hours ago

    Me making my devs create a base exception for handling all exceptions that contain messages for display in the UI. Which has a parent base exception we use for all our exceptions which of course has Exception for it’s parent.

    I hate our codebase but I’m so close to killing off 15 year old vb.net code. If the left me alone and I had the time I spent in meetings or 20 mins between meetings everything on our roadmap for the next year would have been done 2 years ago.

      • Logi@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        55 minutes ago

        Microsoft conference back in (from memory) nineties with Steve Ballmer (sp?) dancing around stage screaming developers! Developers! Developers! since that’s what market domination is all a outif your are making an operating system.