December 6, 2009

CRU software code continued.. piggy back onto the previous posts (down there), I found this pretty good dissection of some of the CRU code. The guy here is merciless in his analysis and criticism:
When I was a developer, in addition to the concepts of version control and frequent archiving, one thing my evil commercially oriented supervisors insisted on were "code reviews". This is the hated point where your manager and/or some other experienced developer goes through your code and critiques it in terms of clarity and quality.

As a general rule code reviews teach you a lot. And in places where you have a choice of potential language one of the big questions in a code review is often "why develop this in [
this particular computer language or idiom]?"
I agree with his salient observations regarding the methods and languages used:
The first thing I note is that a lot of the stuff is written in Fortran (of different vintages), and much of the rest in IDL. When you look at the code you see that a lot of it is not doing complex calculations but rather is doing text processing. Neither fortran nor IDL are the tools I would use for text processing - perl, awk, sed (all traditional unix tools available on the platforms the code runs on as far as I can tell) are all better at this. Indeed awk is used in a few spots making one wonder why it is not used elsewhere.
Even though I have a technical background and love science, I abhor Fortran because it's - well - it's so unstructured and undisciplined. When one looks at Fortran one conjures up images of some coffee-soaked, sleep-deprived scientific wretch, hair disheveled, throwing more and more lines of code into an algorithm to bury previous mistakes and just make the results come out correctly. And, for the record, IDL is:
"..the ideal, timesaving solution for data analysis, data visualization, and software application development. From “quick-look” analysis and display to commercial programming projects, IDL combines the technology and tools you need with a modern, extensible environment."
I do NOT know IDL and cannot quibble with this claim. But the site is interesting and promising. It is a fairly good deconstruciton of the code for folks who have some experience with coding and Unix. Again, the usual caveat exists, boys and girls: do not try this at home. The stunts here were done on a closed course by paid professionals..

..or, in the case of the East Anglia CRU programmers, rank amateurs. 


  1. The following comment came in from Anonymnous which I erroneously rejected:

    "Your description of a Fortran programmer is priceless. And unfortunately all too true. When having some CMM Fortran code translated from German into English, we often found code comments like, 'Who cares?'

    'Nuff said."

    Thank you for your kind words. I am truly sorry; just hit the wrong button. I must be staying up too late..

    ..working on software.

    My personal favorites are comments in C++ like:

    nCounter++; // increment nCounter

  2. "The following comment came in from Anonymnous which I erroneously rejected:"
    Quit being a commie and let the posts through un monitored.

    Java rules.

    C++ memory leaks suck. Hope they fixed that problem since my school days. Amazing, Java does not have that problem.

    Java rules.

  3. No. Do your own blog and you can set the rules.

    Also, those who rely on a ginmmick like garbage collection becuse they are not disciplined enough to keep track of their programs' 'new' and 'delete' or malloc() and and free() calls are not programmers, they're coders.

  4. Do as I say not as I do.

    Iritated are we? Memory leak or some kind of memory issue for sure.

    Rely on gimmicks, sounds like "programmers" are monkeys. ie; doing repetive tasks best left to automation.

    Java rules.

    Write once and run anywhere.

  5. Hey,

    Just found your blog. Good stuff here. I have just enough coding backgrouind to follow the discussions.

    Anyway, your link to the "pretty good dissection..." looks to be broken.

  6. Greg,

    Welcome and thank you. I will look into that.


    Voyska PVO

  7. Voyska, my lovey wife programs on half a dozen IBM AS/400s. Small main frames that you can cut and dice as one sees fit. They can pretty much run anything, in a partition, including windows, Risc 64, anything, all at the same time.

    Anyway, IBM has long ago seen the light, and is in high gear to convert to Java (at least beginning around 4 years ago). Of course the RPG'ers just don't get it, even with RPG-EGL help.

    Anyway Voyska, I do really believe, you will not be so damn grumpy :-), once you get away from C++. It's a miserable language.

    Java rules.