How valuable is code that runs fast, but can’t be extended or modified? How can you be productive in a code base that’s grown into a big ball of mud because that was how you made things fast? How much speed would you be willing to give up in the name of developer happiness and productivity?
In my time as a Fortran programmer, I’ve found that community to be full of the sentiments “That’s how we’ve always done it” and “that’s just not how we do things”. Fortran just seems to be stuck using old techniques and practices, and nobody wants that to change. To some degree, I can understand this. Fortran is a language used primarily for heavy number crunching that needs to be fast. Using new features and techniques can result in code that runs slower. In a language and community that values speed at all costs, I can see the resistance.
I also think there is a bit of selection bias going on here. Most Fortran programmers I know started their coding career with Fortran. I suspect most people who went on to learn other languages quickly grew frustrated at the lack of modern tooling and conveniences available in Fortran. No variable length strings. No standardized build system. Little to no editor support. No testing frameworks. And so, once they learned another language that made it easier to be more productive, they never looked back. And so the ones left simply weren’t interested in learning new things.
I’m not convinced that the state of Fortran programming can’t be improved. I’m not sure the choices made in the Fortran community have been made with the full knowledge of the trade-offs involved, and the possibilities that new techniques and technologies can bring. I think it’s time to bring new life to Fortran.
I’m starting simply, with some basics. First, I’m using a modern version control system, git, to help make it easier to share my code. Next, I’ve created a build system that understands the idiosyncrasies of Fortran, so you don’t have to spend tons of time maintaining convoluted Makefiles. And lastly, I’m creating open source libraries using modern software design principles to make them easier to reuse, extend, and modify. The most important of these being a testing framework, vegetables. I’ve got several others implemented so far, and ideas for even more.
I also plan to create several online courses to teach Fortran in a way that includes modern design principles and techniques. I’ve already finished the first one. I’ll also have some courses teaching version control principles, and teaching some testing practices. Of course, since this isn’t my full time job, I’m not sure just how long it will take me to get to all of it.
This is going to be a tough job, and it’s going to take a lot of effort, but if somebody doesn’t get started we’ll never be able to improve the lives of those poor souls left maintaining the legacy Fortran code bases still being used to drive science and engineering. I hope I’ll be able to convince some of you to join me.