• neidu3@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    97
    ·
    4 days ago

    Fortran. At least it was comprehensible to a human brain once upon a time. And probably efficiently written.

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      34
      ·
      4 days ago

      If you’re good at assembly you’ll be fine once you get past the bad formatting, short names, etc. that was common at that time.

    • SpaceCowboy@lemmy.ca
      link
      fedilink
      arrow-up
      15
      ·
      4 days ago

      Yeah really. It would be some tough sledding at first, but it would be far better than looking at some code with some nicely named methods and variables with lots of comments (with emoticons!) for days… only to find out it does absolutely nothing.

    • Serinus@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      4 days ago

      On the other hand, you know the Fortran works and you can break it.

      The vibe code is already broken.

      I’m still pounding the Fortran button as hard as I can.

  • Bubbaonthebeach@lemmy.ca
    link
    fedilink
    English
    arrow-up
    58
    ·
    4 days ago

    Code that has lasted, with some maintenance, for 50+ years vs code that doesn’t work from day 1? What advances we have made!

  • deegeese@sopuli.xyz
    link
    fedilink
    arrow-up
    67
    ·
    4 days ago

    The Fortran is tight, works, and has 50 years of field testing.

    Much rather work on something old and proven than new and slapdash.

    • slothrop@lemmy.ca
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      4 days ago

      Watfor and Watfiv for the win, baby!
      Honourable mention to PL/1 and cobol…

  • ranzispa@mander.xyz
    link
    fedilink
    arrow-up
    15
    ·
    4 days ago

    I like Fortran very much, but don’t get me wrong: maintaining Fortran code from 69 must be a huge pain in the ass. It is certainly code written by researchers who have no idea about programming practices. It is sure full of exceptions everywhere, all variables are 2 characters long. The codebase grew over the years and is now several millions lines of code, most of which is the same functionality copied everywhere with slight changes. You have no idea what each subroutine is supposed to do, and it doesn’t help that most algorithms used in there were never published or documented.

    I think I’ll go with the vibe coding for this one.

  • grue@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    4 days ago

    I would genuinely love to find a job coding FORTRAN, mainly because it means I’d almost certainly be doing some kind of scientific computing. Way better than most tech jobs that involve boring CRUD work you don’t care about at best, or actively making the world worse implementing the whims of some billionaire sociopath at worst.

    • squaresinger@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      4 days ago

      Also, the code base will likely be pretty small. If something’s made to be delivered on punch cards and run on devices that measure their memory in KB or maybe MB, it’s not going to be a ton of code. Even if it’s pure assembly, it’s going to be easier than a huge automatically generated codebase.

  • Michal@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    3 days ago

    to be fair, I think such old codebase in that ancient of a language is going to have a lot of technical debt and predate maintainable code practices. I’d rather work with a modern language. Whatherver LLM spat out - having been trained on modern code - is going to be a lot more maintainable.

  • 9point6@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    4 days ago

    Isn’t it more COBOL than FORTRAN in terms of getting paid?

    I thought FORTRAN was pretty much exclusively used via SciPy in research & academia these days.

    COBOL is still powering the world economy on mainframes

    • ranzispa@mander.xyz
      link
      fedilink
      arrow-up
      8
      ·
      4 days ago

      Coming from research: no, Fortran is very much alive as is. Plenty software is still actively developed in Fortran, I do believe in recent years there’s been a push towards C++, but I’m unsure how much that progressed.

      • 9point6@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        4 days ago

        Oh that’s cool to hear, I was under the impression in research that whilst a lot of the processing actually happens in FORTRAN-written code, it was nearly always reusing already-written functions and primitives in a higher level language (such as python, via the aforementioned SciPy). And then those libraries being maintained by a handful of wizards on the internet somewhere.

        Can you elaborate on the kind of research where people are still actively writing directly in FORTRAN? Did people typically arrive with the skills already or was there training for learning how to write it well?

        • Droggelbecher@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          3 days ago

          Someone else using fortran in research checking in. In particle physics, were basically writing huge, physics heavy Markov chain monte Carlos in it. Just one example.

        • renormalizer@feddit.org
          link
          fedilink
          Deutsch
          arrow-up
          3
          ·
          3 days ago

          Your daily weather forecast likely runs on FORTRAN. It’s quite terrible code in many places because the people writing it are not software engineers but meteorologists, mathematicians, or physicists with little to no formal training in software design writing a million-line behemoth.

          And FORTRAN adds to the suck because it is superbly verbose, lacks generics, has a few really bad language design decisions carried over from the 60’s, and a thoroughly half-assed object model tacked on. As a cherry on top, the compilers are terrible because nobody uses the language anymore – especially the more recent features (2003 and later).

        • ranzispa@mander.xyz
          link
          fedilink
          arrow-up
          4
          ·
          4 days ago

          Don’t get me wrong: python probably is the main language used in research. However there’s software that needs to be fast at crunching numbers, I work in computational chemistry and pretty much any reliable software is either Fortran or C++. Indeed you have python libraries, but most are just wrappers.

          You have Gaussian: https://en.wikipedia.org/wiki/Gaussian_(software) GAMESS: https://en.wikipedia.org/wiki/GAMESS_(US) CP2K: https://en.wikipedia.org/wiki/CP2K Mopac: https://en.wikipedia.org/wiki/MOPAC

          Now, most people do not work in Fortran, but it is something you learn a little bit when you start working in computational chemistry. It happens sometimes to have to debug a software not working or to have to write a module to test an hypothesis. People writing those softwares are also researchers, but mostly are full time dedicated to the software. Generally, there is a huge lack on investment on the software infrastructure, very few people are dedicated at maintaining software that is used by hundreds of thousands of people.

          While hiring people, I am satisfied as long as they know a bit of python, but knowledge of Fortran really stands out and highlights a more thorough education. If I have time, I do give all the people an introduction to Fortran, as it is still something you often come across in our field. But yes, unless you’re working on the development of such software suites, Fortran is not that common now. You’d publish a proof of concept in python or Julia and then wait for someone else to implement it in one of those libraries.

  • 14th_cylon@lemmy.zip
    link
    fedilink
    arrow-up
    30
    ·
    edit-2
    4 days ago

    the fortran code was probably written by someone who knew what they were doing and didn’t need 1 gb of libraries to implement the save button.

    and the fact that the code survived till today does say something about its quality. i don’t think this is hard choice.

    • bus_factor@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      4 days ago

      That’s not a given. A friend of mine worked on a weather forecast implemented in Fortran by people who were better at meteorology than programming, and some functions had thousands of parameters. The parameters for one of the calls (not the function definition) were actually supplied in a separate include file.

    • LeFantome@programming.dev
      link
      fedilink
      arrow-up
      8
      ·
      4 days ago

      Well obviously with vibe coded stuff, you just put the code back in the AI and ask for documentation.

      Problem solved. /s