Monday, 28 November 2011

You know I said ...

You know I said the 'structure constructor' % stuff was a powerful feature.

Well I guess it is but the use of it in the code I am looking at leaves the source code almost unreadable!

One line of 'old' FORTRAN format being taken up by - I am not joking - 5 lines of overflow coding in some instances.

I think I am going to have to write a code to decode the %'s - which is not such a bad idea - move all the % calls in one routine and just return a sensible variable!

Onward and upward ;-)

Saturday, 19 November 2011

A map through the maze!

Many thanks again the folks on the LinkedIn Fortran Programmers Group for some great ideas on best practice for development and maintenance of Fortran code.

One specific pointer from Nils Van Velzen relating to an open source package called 'fordocu' has made a tremendous difference to understanding the complexities in the code and being able to trace variables through the  spaghetti!

Well worth checking out - the reference is;

I will certainly be using this for all future Fortran development.

Saturday, 12 November 2011

A documentation Rubiks Cube

Having launched into attempting to document the code a few interesting problems are coming out of the woodwork - one of them relates to how to document the data in a manner that can be understood in simple terms!

The plan is to document the following;

1 Process flow document in the form of a flowchart - easy one this one and very good for viewing the code without the clutter.

2 Documentation of the underlying physics and numerical modelling techniques - again relatively easy and can be linked to the flowchart in a logical manner.

3 Data documentation - absolute nightmare - the data structure is pretty difficult to follow without the added complication of spaghetti-like contortions of the variables throughout the code.

Need to come up with  simple way of 'viewing' these data flows.

All ideas welcome!

Friday, 4 November 2011

Another thank you!

Thanks to David Means for educating me on the use of Fortran (I now also know that its not FORTRAN any more but Fortran too!) in simulators. Quote from David from the Fortran users group on LinkedIn.

"Fortran was for a long time the industry standard language for flight simulation. I used it when I first got into that field in the mid-80's and continued with it until at least 2000. There are a *lot* of flight simulators still running on Fortran all around the world. 

The question is one of economics: If you've written code for, say, a 737, you've got a lot of money tied up in the development and testing of the software. So, your first sim is break-even at best. However, once you sign a contract for a second 737 sim, software development cost is minimal as you can just copy everything over from the first one and make minor tweaks as necessary. That's how flight simulation companies make their profits: by selling sims that they've already developed code for. Once you have a lot of sims running a particular code set, there is no incentive to convert it to a different language because a bug fix for one sim can be copied over and fix all the other sims running that same code set. 

So, Yes, I have heard of Fortran running real-time simulators. There are thousands of them around the world"

Thanks again!