# Q for engineers (programming language)

**URL:** <https://boards.straightdope.com/t/q-for-engineers-programming-language/832140>\
**Category:** In My Humble Opinion\
**Created:** [April 6, 2019, 7:28pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140 "2019-04-06T19:28:19Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![rbroome](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rbroome](https://boards.straightdope.com/u/rbroome)\
**Post date:** [April 8, 2019, 12:59am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/21 "2019-04-08T00:59:33Z")

</div>

I am a few years retired, but large-scale environmental models in meteorology and oceanography are still in FORTRAN. As others have said, many large models in many fields were started back in the 80s or even earlier. Now they have 40 years of enhancement built into them. And FORTRAN has long since become reasonably agnostic to subroutines and I/O written in other languages. It would be a huge multi-year effort to fully convert those models to another language-and there would be little benefit. And since (almost?) all FORTRAN compilers are just translators to C the maintenance of the compiler isn’t that hard. C is certainly a well-maintained language and all it takes is figuring out how to write the new FORTRAN command in C. I will say I never hired a young programmer who was thrilled to have to learn FORTRAN when he/she started… But it is a simple language to pick up for a trained programmer.

---

<div class="post-metadata">

**Author:** ![Melbourne](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Melbourne](https://boards.straightdope.com/u/Melbourne)\
**Post date:** [April 8, 2019, 4:50am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/22 "2019-04-08T04:50:51Z")

</div>

FORTRAN III and FORTRAN IV and F77 were very different languages. Also, FORTRAN was almost the only game in town: they used it to create accounting systems, and database systems, and control systems and to do circuit analysis and draw graphs and … all stuff that is done by “applications” now.

So the original quotation was in the context of a language that was used for everything, that, like my grandfathers axe, had changed in every respect except for name.

Well, as it turned out, when every comp-sci student got unlimited access to computing resources, what they all wanted to do was design a new language. Which in practice was a lot easier for kids to do than improving or modifying somebody else’s computer language. This was the era of YACC: Yet another Compiler Compiler. Not just yet another language, but yet another way of making languages.

And so after FORTRAN IV, what we got was not just Fortran 77, It was F77 and Pascal and C and BASIC and heaps of other stuff. And the only niche really left for Fortran was applications that needed either to run faster, (the newer languages ranged from slower to much slower), or to use the FORTRAN math library (no other language got an equivalent math library until years later)

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [April 8, 2019, 1:20pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/23 "2019-04-08T13:20:13Z")

</div>

To reiterate, the brother’s joke in the OP appears to be simply about the fact that Fortran is constantly being revised, thus you have Fortran 90, Fortran 95, Fortran 2008, Fortran 2018, etc. However, this phenomenon is by no means unique to Fortran: compare C78, C90, C99, C11, C18 (et rel.)

Fortran does remain the language of choice for “high-performance computing” (think supercomputers) as evinced by its use in the most basic (and important) libraries such as BLAS and LAPACK. This could be partly due to historical influence, namely that Fortran was developed in the 1950s specifically with high-performance numerically intensive computation in mind, and a lot of effort was spent on ensuring that Fortran compilers really did output efficient and optimized code, as opposed to, say, a random C compiler. These days, of course, as long as you know what you are doing you can happily prototype your algorithms in Octave or Python or whatever and the numerical libraries will be called behind the scene.

I do know one otherwise sane individual who switched from writing his numerical code in Fortran to C++, possibly under the influence of that damned _Numerical Recipes_ book. I keep thinking that Knuth had the right idea for his _Art of Computer Programming_ book, which was to make up his own computer language so as not to be forced to keep switching to the fashionable language _du jour_ every couple of years. He did see fit to change it once, though.

---

<div class="post-metadata">

**Author:** ![Xema](https://avatars.discourse-cdn.com/v4/letter/x/9de053/32.png) [@Xema](https://boards.straightdope.com/u/Xema)\
**Post date:** [April 8, 2019, 1:20pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/24 "2019-04-08T13:20:51Z")

</div>

> [@TriPolar](#):
>
> It was heavily used in commercial nuclear reactors around 1990, haven’t heard much about it since then.

I’m tempted to think that no one has heard much about _anything_ that during the early 1990s was actually in a nuclear reactor.

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [April 8, 2019, 4:55pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/25 "2019-04-08T16:55:22Z")

</div>

Started with Fortran in college (it was a requirement for all engineers), with Pascal in a few CS courses. Bookstore sold special pads of papers with the special Fortran-specific fields (columns for line numbers, comment indicator, line continuation) on them. Punched cards and everything.

Shortly after graduation I picked up a copy of K&R and taught myself C. I program only in self-defense writing code for my own use, in those days usually to post-process simulation results or to do things now done with Matlab.

Now I use [VB.net](http://VB.net), mostly for writing GUIs to control lab boards that I design to evaluate my IC designs. I keep saying that I should switch to C# or C++, but I haven’t run into anything I actually need those languages for.

---

<div class="post-metadata">

**Author:** ![jnglmassiv](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jnglmassiv](https://boards.straightdope.com/u/jnglmassiv)\
**Post date:** [April 8, 2019, 10:05pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/26 "2019-04-08T22:05:18Z")

</div>

We had to take Fortran as electrical engineering students in about 1999. Even 20 years ago, it was made clear to us that it wasn’t widely in use and new commercial programs were not being written. However, its value, they told us, is that it’s a good introduction tool to programming in general. With that Fortran background, we’d later go on to take additional programming classes in C, C++, VHDL, assembly.

I also had the honor of taking ‘the last’ pencil & paper drafting/mechanical drawing class at two different schools. First at community college, then again after transfer to a four year institution.

---

<div class="post-metadata">

**Author:** ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)\
**Post date:** [April 8, 2019, 10:31pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/27 "2019-04-08T22:31:22Z")

</div>

Never messed with FORTRAN, or COBAL. They are dead. If you are still using it, you have a lot of catching up to do.

There are plenty of languages that can deal with complex math. Shit, Python can do it. While I’m not an astrophysicist I am a GIS programmer. Spatial analysis is one of the most difficult things that is presented to humans. We build the mathematical formula, and ship it to a computer that can do the millions of calculations.

It’s easy. 😉

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [April 8, 2019, 11:04pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/28 "2019-04-08T23:04:20Z")

</div>

> [@Chronos](#):
>
> As evidenced most clearly in the classic _Numerical Recipes_ books. The authors were Fortran programmers, and wrote the original in Fortran. Then they translated it to other languages, like _Numerical Recipes in C_, which is all Fortran code written in C.

The worst part of this is how all of their array references were 1-based instead of 0-based, using various pointer hackery to pull this off. Ugh. Even as a college freshman, ignorant that the FORTRAN version was the original, I knew something was very wrong with their coding style.

---

<div class="post-metadata">

**Author:** ![Reno\_Nevada](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@Reno\_Nevada](https://boards.straightdope.com/u/Reno_Nevada)\
**Post date:** [April 9, 2019, 12:16am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/29 "2019-04-09T00:16:34Z")

</div>

I was curious, so I jumped over to [Monster.com](http://Monster.com) and did keyword searches for a few computer languages. Some of these are probably irrelevant/bad matches, but for what it is worth:

FORTRAN: 461 jobs  
COBOL: 1597 jobs  
PL/1: 266 jobs  
Java: 81984 jobs

The obscure language I am an expert in, CLIPS, did not appear to have any job postings.

So it looks like a few places are still looking for experts in these obsolete languages.

---

<div class="post-metadata">

**Author:** ![Melbourne](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Melbourne](https://boards.straightdope.com/u/Melbourne)\
**Post date:** [April 9, 2019, 12:21am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/30 "2019-04-09T00:21:16Z")

</div>

> [@DPRK](#):
>
> I do know one otherwise sane individual who switched from writing his numerical code in Fortran to C++, possibly under the influence of that damned _Numerical Recipes_ book…

C++ had a number of new features specifically to make it closer to Fortran in speed. And the standard math library for c did eventually appear, making it possible to write example c++ programs that gave the same answer to everybody.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [April 9, 2019, 12:37am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/31 "2019-04-09T00:37:17Z")

</div>

> [@enipla](#):
>
> Never messed with FORTRAN, or COBAL. They are dead. If you are still using it, you have a lot of catching up to do.

There must be an awful lot of zombies out there, considering COBOL is up to 2014 and Fortran to 2018. If you don’t use COBOL, then _you_ are not a business programmer, and if you don’t use Fortran, then _you_ are not a numerical analyst, but in each case plenty of people are.

> [@](#):
>
> There are plenty of languages that can deal with complex math. Shit, Python can do it. While I’m not an astrophysicist I am a GIS programmer. Spatial analysis is one of the most difficult things that is presented to humans. We build the mathematical formula, and ship it to a computer that can do the millions of calculations.
> 
> It’s easy. 😉

You should tell the BLAS and LAPACK teams the good news. And try implementing some of the [HPC Challenge](http://icl.cs.utk.edu/hpcc/) benchmarks and LINPACK benchmarks in pure Python and see how you rank.

ETA: of course in the end it’s performance that counts and you can’t argue with results, whether they be obtained via Fortran or C++ or Python or some other means. Also things like trading a few percent performance hit in exchange for having to write 50% fewer lines of code…

---

<div class="post-metadata">

**Author:** ![EdelweissPirate](https://avatars.discourse-cdn.com/v4/letter/e/8491ac/32.png) [@EdelweissPirate](https://boards.straightdope.com/u/EdelweissPirate)\
**Post date:** [April 9, 2019, 2:09am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/32 "2019-04-09T02:09:10Z")

</div>

Yep; I’m one of those numerical analysts DPRK mentioned. I use finite element analysis software called ANSYS, which has been around since the 1970s.

Stranger On A Train mentioned NASTRAN, another FE code of the same vintage. (ANSYS and NASTRAN are basically direct competitors in the high-end FE space). Like NASTRAN, ANSYS’s solvers are all written in FORTRAN. ANSYS also has its own language, but that’s basically FORTRAN as well. And ANSYS shares with NASTRAN punchcard-rooted terms like “input deck.”

Enipla, it’s silly to claim that “FORTRAN is dead” just because you don’t know what it’s used for. When you need to manipulate matrices as fast as possible, FORTRAN is a great choice.

People write FE codes all the time using interpreted languages like Python, but they’re typically 1-3 orders of magnitude slower than the fastest FORTRAN-based solvers. When you’re modeling things like simultaneous fluid/structural/electromagnetic interactions or nuclear weapon detonations, solutions to large models can take weeks even with FORTRAN-based solvers. A 5% speedup via solver optimization can save days of solve time. That’s one reason why FORTRAN isn’t dead yet.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [April 9, 2019, 2:10am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/33 "2019-04-09T02:10:25Z")

</div>

Since I feel like this thread is mostly giving people a chance to talk about Fortran, it’s probably giving a pretty false sense for how much usage there might be of the language.

I’ve been working as a programmer for ~17 years and I’ve never seen a line of Fortran. I’ve worked at a dozen companies, from startups to businesses that are regularly in the headlines, globally. Now that said, I’ve never worked in the military nor on the East Coast of the US, but I suspect that even there’s likely no new Fortran development, just legacy maintenance.

Mathematical processing seems to be mostly done via R or Python (using C-based libraries that do the hard processing).

Outside of that, I’m unaware of any particular use of R. Python is used for scripting (build systems, deployment systems, etc.)

Most code written these days is probably Java.

Website code is pretty common as well, so JavaScript, Ruby, etc. are quite popular.

But it is true that a language can change drastically and continue to be called the same thing. C++ is pretty different from the original. Perl 6 is just Perl, despite being a drastically different beast (though, they took so long to develop the language that the point might be moot as it’s probably been replaced by Python/Ruby/etc.). PHP is still PHP.

---

<div class="post-metadata">

**Author:** ![EdelweissPirate](https://avatars.discourse-cdn.com/v4/letter/e/8491ac/32.png) [@EdelweissPirate](https://boards.straightdope.com/u/EdelweissPirate)\
**Post date:** [April 9, 2019, 3:01am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/34 "2019-04-09T03:01:24Z")

</div>

> [@Sage\_Rat](#):
>
> I suspect that even there’s likely no new Fortran development, just legacy maintenance…

Seriously?

I just mentioned that ANSYS writes their solvers in FORTRAN, and they make significant changes to those solvers once or twice a year. They spend a ton of money trying to speed up their solvers. I mean. I’ve spoken their FORTRAN developers before. They’re not imaginary.

As I said in my previous post, FORTRAN is still robust anywhere people need to perform very large linear algebra operations very quickly. Numerical simulation is a prime application.

You’ve been a programmer for 17 years and haven’t come across any FORTRAN? I’m not surprised, but how do you get from “I haven’t used it” to “I suspect no one uses it?”

I’m not a programmer, but I’ve been a mechanical engineer for 16 years and I was tweaking FORTRAN code in grad school; since then, I’ve seen tens of thousands of lines of FORTRAN. (I specialize in numerical simulation).

It’s horses for courses, isn’t it?

---

<div class="post-metadata">

**Author:** ![Stranger\_On\_A\_Train](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Stranger\_On\_A\_Train](https://boards.straightdope.com/u/Stranger_On_A_Train)\
**Post date:** [April 9, 2019, 3:48am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/35 "2019-04-09T03:48:48Z")

</div>

> [@Sage\_Rat](#):
>
> Since I feel like this thread is mostly giving people a chance to talk about Fortran, it’s probably giving a pretty false sense for how much usage there might be of the language.
> 
> I’ve been working as a programmer for ~17 years and I’ve never seen a line of Fortran.

Fortran is a specialty language used specifically in scientific and numerical programming. A programmer working on, say, business enterprise applications, operating systems, or graphical applications would never use Fortran, but that doesn’t mean that it isn’t out there. As **EdelweissPirate** noted, multiple finite element codes are based on Fortran, as are many common numerical simulation codes that are in use today. The same is true for global climate circulation models such as [MPAS](https://mpas-dev.github.io) and [CESM](http://www.cesm.ucar.edu). While a clean sheet development effort today would probably not start with Fortran, these codes have legacies going back into the ‘Seventies and ‘Eighties, and upgrading them requires at least interfacing with and often modifying Fortran code. Just because you have not personally worked on a project using Fortran does not mean that it is not still in use.

At my undergraduate university, the Fortran class (then required for all engineering and hard science majors) was taught by the Computer Science department, but was the only strictly Fortran-based class that CS offered (although we were allowed to use it in Numerical Methods), which tells you everything you need to know about the audience Fortran was intended for. It is not a clever language which appeals to computer scientists trying to implement new programming paradigms; it is a very straightforward and simple—the less charitable would say, “crude”—language designed for crunching matricies. It is an ugly language to read (though I would argue that Java is uglier) and is intended to keep the user from tripping over his or her shoelaces versus a language like C++ where the unwary are likely to unintentionally strangle themselves with them.

Java may be very popular in general (though less popular than its hayday, and hopefully to be replaced by Scala) but it is not a language I would ever use for scientific or numerically intensive programming. And whileI would probably use something like Python to do a lot of the busywork, if I’m doing heavy lifting numerically there is likely a Fortran-based library doing the actual number crunching.

Stranger

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [April 9, 2019, 5:10am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/36 "2019-04-09T05:10:59Z")

</div>

> [@Stranger\_On\_A\_Train](#):
>
> Java may be very popular in general (though less popular than its hayday, and hopefully to be replaced by Scala) but it is not a language I would ever use for scientific or numerically intensive programming. And whileI would probably use something like Python to do a lot of the busywork, if I’m doing heavy lifting numerically there is likely a Fortran-based library doing the actual number crunching.

And a C library. I know of no Fortran library for bupkis in use by anyone or any language generally used on the West Coast. I have never heard of such a thing.

If Google doesn’t use it, Amazon doesn’t use it, Facebook doesn’t use it, Hadoop doesn’t use it, SSL implementations don’t use it, cryptocurrencies don’t use it, 3D shooters don’t use it, etc. it ain’t that integral to doing math nor math in bulk.

If it is still widely used on the East Coast in banking, in the military, or whatever then I grant (and said as much) that that’s outside of my scope of knowledge. But I would doubt that the West Coast model won’t take over given that the tools for massive data mining is pretty attractive to all comers.

---

<div class="post-metadata">

**Author:** ![EdelweissPirate](https://avatars.discourse-cdn.com/v4/letter/e/8491ac/32.png) [@EdelweissPirate](https://boards.straightdope.com/u/EdelweissPirate)\
**Post date:** [April 9, 2019, 5:39am UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/37 "2019-04-09T05:39:56Z")

</div>

Sorry; what on earth does your east-coast/west-coast dichotomy have to do with the price of apples?

---

<div class="post-metadata">

**Author:** ![Stranger\_On\_A\_Train](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Stranger\_On\_A\_Train](https://boards.straightdope.com/u/Stranger_On_A_Train)\
**Post date:** [April 9, 2019, 3:15pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/38 "2019-04-09T15:15:39Z")

</div>

It doesn’t. At this point, **Sage Rat** is just trying to “win the argument” rather than listen to evidence or reason, such as that the Fortran-based BLAS and LAPACK are still widely used in numerically-intensive scientific computing or that ISO/IEC released a new standard in 2018 for Fortran ([1539:2018](https://wg5-fortran.org/f2018.html)), nor that all major general circulation models in use today are written in Fortran, as are the major finite element packages, hydrocode simultations, et cetera. He is fixated on the fact that Fortran is not in use as a general programming language by Amazon, Google, or Facebook, which is true as far as it does (for data processing and manipulation scripting languages like Matlab or Python/NumPy/SciPy have taken over for ease of use and extensiveness of their libraries and modules for specific applications) but the statement that there is “no Fortran library for bupkis” is provably false.

Stranger

---

<div class="post-metadata">

**Author:** ![Bijou\_Drains](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bijou_drains/32/2814_2.png) [@Bijou\_Drains](https://boards.straightdope.com/u/Bijou_Drains)\
**Post date:** [April 9, 2019, 9:30pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/39 "2019-04-09T21:30:34Z")

</div>

who makes a FORTRAN compiler now? I assume there could be very old ones still out there but nothing new from the last few decades.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [April 9, 2019, 10:01pm UTC](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140/40 "2019-04-09T22:01:47Z")

</div>

> [@Bijou\_Drains](#):
>
> who makes a FORTRAN compiler now? I assume there could be very old ones still out there but nothing new from the last few decades.

GNU, Intel, IBM, Cray, AMD, Nvidia, NAG, etc.- take your pick. [Start here for some links.](http://fortranwiki.org/fortran/show/Compilers)

[Previous page](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140.md?page=1)

[Next page](https://boards.straightdope.com/t/q-for-engineers-programming-language/832140.md?page=3)
