logoalt Hacker News

obviouslynotme • today at 7:06 PM • 3 replies • view on HN

I used to work on software that still uses Fortran from the 50's and is still in maintenance and use today. IIRC, it had ~700kloc of Fortran. It may be the oldest and largest Fortran codebase still in use.

My first project there was removing all of the Hollerith from the code. Since Fortran predated strings, you had to manipulate them as integers. When you tied that to the original Fortran dynamic memory system, Dynosour, which used equivalenced arrays as pointers, it was a disaster.

It also gave me an appreciation for JavaBeanFactoryFactory. The original Fortran limited identifiers to six characters, the first of which indicated whether the variable was an integer, logical (bool), or real (float). I will take a 100 character name over ILBNK1 every single time.

GOTOs were surprisingly not a big problem, but structured code is definitely a bit easier to read, especially since it brought the practice of indentation with it.

Overall, it was a great experience but I wouldn't want to do it again, even if the work was interesting.


Replies

shakna • today at 8:43 PM

That certainly might be one of the oldest Fortran codebases still in use I've heard of, but not quite the largest. (Character came in '77 wasn't it?)

E3SM [0] is still maintained today, and somewhere around 2mil LoC of F90.

Modern Fortran has a lot of niceties that it brings to the table.

[0] https://e3sm.atlassian.net/wiki/spaces/DOC/overview | https://github.com/E3SM-Project/E3SM

➕ show 1 reply
rbanffy • today at 8:51 PM

> It also gave me an appreciation for JavaBeanFactoryFactory

If nothing else, short variable names create an incentive to keep functions small enough you can easily figure out what ILBNK1 means.

➕ show 1 reply
robotnikman • today at 8:59 PM

>It also gave me an appreciation for JavaBeanFactoryFactory.

My favorite is SimpleBeanFactoryAwareAspectInstanceFactory

➕ show 2 replies