Code Documentation Strategies

Being an old FORTRAN coder I read a recent post about documenting code and what methods that are now in use. I realize that most people here use modern object oriented codes versus the ancient FORTRAN type that I am familiar with but I am curious if various old documentation techniques I use are still viable. I maintain some old FORTRAN programs involving computational fluid dynamics techniques for predicting performance of engineering test facilities. Throughout the long history of these codes the maintainers inserted comments profusely throughout which helped keep track of the logic and methods incorporated within. They were also kind enough to begin the code (or each subroutine if appropriate) with some verbiage explaining the latest revision changes and other pertinent details that help everyone presently and in the future to keep track of things. I admit that I also took shortcuts by creating external documents when it was required to get into the details especially when it involved massive changes or changes in design. I always thought putting all that into a header at the top of the code file was a bit too much as well as being restricted to text only (picture is worth a thousand lines of code etc.) So I am curious of what all of you do to document modern code in all the various languages in use these days. Perhaps I can learn a better method that I can pass down to my mentees before I retire - especially if it is already something they are familiar with.

Thanks in advance for considering this - and thanks for all of your contributions to Haiku!

2 Likes