Hacker News new | ask | show | jobs
by marcelocb 2765 days ago
I happen to be one of those "real engineers", working in an aerospace company. When I have to re-do some calculations done 30 years ago (yeah, we need to have traceability of calculations for that long and more ... ) , I grab the F77 source code, build with gfortran or Intel Fortran, and believe me, it builds and runs. From Windows workstations to Linux clusters. Easy.

Then I get the python code from 6 months ago, and spend hours figuring the right python version, and library compatibilities ...

And when I read the fortran code, made by (physical stuff) engineers, it is ugly but simple - there is one or maybe two ways to do something. Not the 1000000's of ways of doing the same thing in Python. And I don't have to learn 50 new libraries to understand the code.

By the way, Python has been my language of choice for most stuff in the last 15 years ...

3 comments

It's enriching to see how needs are different for an organisation that's not building software, but using software to build something else.
This was not my experience at all when trying to build Fortran code.

Which version of FFTW were they using? Undocumented. Hard binding to MKL as opposed to generic LAPACK usage? Ok, Intel fortran only then... Still missing some symbols? Oh, that's a symbol from this other esoteric library from the same group. Better see if I can download the sources for that. Etc.

There are projects without dependencies, then there are projects with dependencies in languages with sane development oriented package managers, then there are projects with dependency hell. I found fortran projects usually fell into one of the two extremes, certainly Fortran is not modern in the sense that it has no package manager which I believe most people would see as a prerequisite for a modern language.

How do you handle answer changes owing to different environments/compiler versions?
Almost every time there will be regression test cases to verify the results,and the new builds will never reproduce perfectly the numerical results. In general is not a issue, has to be handled case by case.

A bigger issue is that modern compilers will raise many warnings, and simple inspection will find many bugs, like array or loop boundaries errors, and when you fix the code you get a different result.

Then it has to be handled case by case as well, since you have to check if that affects safety of flight.