Thanks to visit codestin.com
Credit goes to programming.dev

  • Michal
    Codestin Search App
    Codestin Search App
    English
    Codestin Search App
    2
    Codestin Search App
    1
    ·
    9 hours 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.

  • ranzispa@mander.xyz
    Codestin Search App
    Codestin Search App
    Codestin Search App
    15
    ·
    1 day 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.

  • 9point6@lemmy.world
    Codestin Search App
    Codestin Search App
    Codestin Search App
    14
    ·
    2 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
      Codestin Search App
      Codestin Search App
      Codestin Search App
      7
      ·
      1 day 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
        Codestin Search App
        Codestin Search App
        Codestin Search App
        2
        ·
        1 day 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?

        • renormalizer@feddit.org
          Codestin Search App
          Codestin Search App
          Deutsch
          Codestin Search App
          3
          ·
          19 hours 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
          Codestin Search App
          Codestin Search App
          Codestin Search App
          4
          ·
          1 day 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.

          • psud@aussie.zone
            Codestin Search App
            Codestin Search App
            English
            Codestin Search App
            1
            Codestin Search App
            1
            ·
            18 hours ago

            an hypothesis

            I think you mean an ’ ypothesis (only vowels use an; consonants use “a”; h is a special case as French and French influenced English drop the h from the start of words). It’s polite to show the letters you have dropped with an apostrophe so readers don’t take incorrect ideas from one’s writing

            • ranzispa@mander.xyz
              Codestin Search App
              Codestin Search App
              Codestin Search App
              2
              ·
              18 hours ago

              Do you have anything actually relevant to add to the conversation?

              As far as I’ve seen checking right now, an hypothesis can be used, just as a hypothesis can be used. I have never seen anyone writing with an apostrophe and would be very confused if reading it.

  • grue@lemmy.world
    Codestin Search App
    Codestin Search App
    Codestin Search App
    31
    ·
    2 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.

  • kibiz0r@midwest.social
    Codestin Search App
    Codestin Search App
    English
    Codestin Search App
    31
    ·
    2 days ago

    It’s weird that “legacy code” is a pejorative.

    If your code has lasted long enough to be considered “old”, but is still so useful that it can’t just be deleted without a dedicated replacement effort… it’s doing something right.

    • smeg@feddit.uk
      Codestin Search App
      Codestin Search App
      English
      Codestin Search App
      10
      ·
      2 days ago

      it’s doing something right

      That’s where the problem lies, we know it’s doing something right but we don’t understand what or how it works, we’re too reliant on it to change it, and the workarounds we have to make to accommodate it are a pain in the arse.

    • spongebue@lemmy.world
      Codestin Search App
      Codestin Search App
      Codestin Search App
      7
      ·
      2 days ago

      I work with a different kind of legacy system. It was retrofitted to work with SOAP, OOP, and some other modern stuff, but none of the old farts bothered to learn it. When I inherited a SOAP service that system used, I had to learn a lot about it to get what I needed.

      And honestly? It’s been a lot of fun. It’s a unique kind of challenge, I’ve practically gained celebrity status at work, and even if it’s nothing I’ll be doing long-term it shows how I can pick up weird systems and work with others to make some miracles happen.

  • 14th_cylon@lemmy.zip
    Codestin Search App
    Codestin Search App
    Codestin Search App
    37
    ·
    2 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
      Codestin Search App
      Codestin Search App
      Codestin Search App
      15
      ·
      2 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.

      • AnarchistArtificer@slrpnk.net
        Codestin Search App
        Codestin Search App
        English
        Codestin Search App
        3
        ·
        1 day ago

        I’m a biochemist who got into programming from the science side of it, and yeah, code written by scientists can be pretty bad. Something that I saw a lot in my field was that people who needed some code to do something as part of a larger project (such as adding back on the hydrogens to a 3d protein structure from the protein database) would write the thing themselves, and not even consider the possibility that someone else has probably written the same thing, but far better than they be can, and made it available open source. This means there’s a lot of reinventing the wheel by people who are not wheel engineers.

        I find it so wild how few scientists I’ve spoken to about this stuff understand what open-source code actually means in the wider picture. Although I’ve never spoken to a scientist in my field who doesn’t know what open source means at all, and pretty much all of them understand open source software as being a good thing, this is often a superficial belief based purely on understanding that proprietary software is bad (I know someone who still has a PC running windows 98 in their lab, because of the one piece of essential equipment that runs on very old, proprietary code that isn’t supported anymore).

        Nowadays, I’m probably more programmer than biochemist, and what got me started on this route was being aware of how poor the code I wrote was, and wanting to better understand best practices to improve things like reliability and readability. Going down that path is what solidified my appreciation of open source — I found it super useful to try to understand existing codebases, and it was useful practice to attempt to extend or modify some software I was using. The lack of this is what I mean by “superficial belief” above. It always struck me as odd, because surely scientists of all people would be able to appreciate open source code as a form of collaborative, iterative knowledge production

        • NominatedNemesis@reddthat.com
          Codestin Search App
          Codestin Search App
          Codestin Search App
          1
          ·
          18 hours ago

          Funny thing is, I would do that if there are no requirements, and the vibecode is unreadable. I would let the token-predictor create the requirements, after proof-reading and correcting it, I would create cooked-down list and run through a manager for approval, then rewrite it from scratch. My limited time and precious brain cells are too valuable to waste on reading and deciphering the half ton of sh!t an LLM produced.

          If there are requirements (which are hardly applicable unfortunately) I would just rewrite the thing.