These are chat archives for Fortran-FOSS-Programmers/General-Discussion

4th
Jan 2016
Stefano Zaghi
@szaghi
Jan 04 2016 14:12

Hi all, happy new year to all!

My best compliments to Chris, FIAT is really an interesting project. I hope I will able to contribute on it.

Surfing the web, in particular the comp.lang.fortran google group, I realized that I need to write once for all and now some best practices or styles guidelines for developing good Fortran codes. I started my effort on a personal github repo

https://github.com/szaghi/zen-of-fortran

I was inspired by many sources, e.g. @certik Fortran best practices (not yet cited into the references, but also the Chris' guidelines are worth to be mentioned).
However, @zbeekman drives me to think that such a document could be helpful for our group. I agree with Zaak, as always :-)

Do you like to start a collaborative document where list our best practices?

Ondřej Čertík
@certik
Jan 04 2016 14:16

Here is my version from few years ago:

Zen of Fortran

Fast is better than slow
Slow is better than unmaintainable
Array-oriented is better than object-oriented
Make everything as simple as possible -- but no simpler (Einstein)
Simplicity is robustness.
Make it look like the math.
All inputs and outputs explicit.
All inputs and outputs carefully named and clearly defined -- the
closer to the point of declaration the better.
Vector is better than loop
Matrix is better than vector
Unless it’s complicated
Strided is better than scattered
Contiguous is better than strided
Broadcasting is a great idea -- use where possible

Stefano Zaghi
@szaghi
Jan 04 2016 14:17
@certik wonderful! I agree on all :-) Do like the group project so?