• Randelung@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    5 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.

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

      Yeah, Java’s enforcement of everything must be a class put me off of the language right from the start. I was already used to C++ at that point and hated that I couldn’t just write a quick little test function to check something, it needed a bunch of boilerplate to even get started.

      I still think C++ has a great balance between object oriented and sequential programming. Not sure if it’s the best, but I can’t think of ways to improve on it, other than built in concurrency object stuff (like monitor classes that have built in locks that prevent more than one thread from accessing any of its functions at the same time, basically guaranteeing any code in it has mutual exclusion).

    • Windex007@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      3 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.