Serious WTF



  • Thought the professional developers on here might like to take a look at this:

    http://open-gistemp.googlecode.com/svn/branches/giss_updates/

    It's the source code that takes all the temperature data from lots of thermometers around the world and derives the "global mean temperature".  Whatever you think about global warming, it's interesting to look at the code produced by these professional scientists / amateur programmers....

    Warning - not for those of a nervous disposition: features disturbing amounts of Fortran and shell scripting, you have been warned.

    Enjoy!



  • Doesn't surprise me in the least: most academic programming for
    actual production by non-CS people is really horrible. At least, that's
    what I've seen in my fellow mathematicians.

    At
    my university
    there was (and very probably, is) this humongous Fortran program (50
    KLoC, probably in the order of 1 MB of source; yep, that's right: 1
    source file!) for CFD which was copied and altered by every Master
    Thesis and PhD student for their own purposes. They all seemed to find
    it perfectly natural that they spent around 70% of their time tinkering
    (debugging, comparing to other people's versions, debugging some more,
    etc.) with their version, instead of producing solid and meaningful
    academic results. Talk about productivity!

     



  • I'm going to go into my corner, curl up in a fetal position, and cry now.



  • from http://open-gistemp.googlecode.com/svn/branches/giss_updates/gistemp.txt:

     

    The basic GISS temperature analysis scheme was defined in the late 1970s by
    Jim Hansen when a method of estimating global temperature change was needed
    for comparison with one-dimensional global climate models.
      
     

    I can't believe he had time to invent this AND the muppets all at once!



  • @unklegwar said:

    from http://open-gistemp.googlecode.com/svn/branches/giss_updates/gistemp.txt:

     

    The basic GISS temperature analysis scheme was defined in the late 1970s by
    Jim Hansen when a method of estimating global temperature change was needed
    for comparison with one-dimensional global climate models.

    I can't believe he had time to invent this AND the muppets all at once!

    Well, if he invented the two at the same time, that could explain a lot of things...



  • @Kokuma said:

    @unklegwar said:

    from http://open-gistemp.googlecode.com/svn/branches/giss_updates/gistemp.txt:

     

    The basic GISS temperature analysis scheme was defined in the late 1970s by
    Jim Hansen when a method of estimating global temperature change was needed
    for comparison with one-dimensional global climate models.

    I can't believe he had time to invent this AND the muppets all at once!

    Well, if he invented the two at the same time, that could explain a lot of things...

    Not the least of which is that he must've changed his name, because the muppet man is Jim Henson.



  • @jemmy said:

    Doesn't surprise me in the least: most academic programming for actual production by non-CS people is really horrible. At least, that's what I've seen in my fellow mathematicians.

    At my university there was (and very probably, is) this humongous Fortran program (50 KLoC, probably in the order of 1 MB of source; yep, that's right: 1 source file!) for CFD which was copied and altered by every Master Thesis and PhD student for their own purposes. They all seemed to find it perfectly natural that they spent around 70% of their time tinkering (debugging, comparing to other people's versions, debugging some more, etc.) with their version, instead of producing solid and meaningful academic results. Talk about productivity!

    I just hope that the people writing the super-duper hi-tech climate models we keep hearing about are doing things a bit better than this!  It's no wonder these climate chaps need massive super-computers if they all write code like this.



  • @too_many_usernames said:

    @Kokuma said:
    @unklegwar said:

    from http://open-gistemp.googlecode.com/svn/branches/giss_updates/gistemp.txt:

     

    The basic GISS temperature analysis scheme was defined in the late 1970s by
    Jim Hansen when a method of estimating global temperature change was needed
    for comparison with one-dimensional global climate models.

    I can't believe he had time to invent this AND the muppets all at once!

    Well, if he invented the two at the same time, that could explain a lot of things...

    Not the least of which is that he must've changed his name, because the muppet man is Jim Henson.

     

    Are you one of those people? The one that can't leave the implied punchline of a joke alone? The one that must state it in manner suggesting that the creator of the joke and everyone else had no idea at all what they were laughing about?

    If so, I have a question. Were you just oblivious to the humor and trying to be helpful? Or is crushing this sort of thing a hobby of yours?



  • @Crispy Duck said:

    @jemmy said:

    Doesn't surprise me in the least: most academic programming for actual production by non-CS people is really horrible. At least, that's what I've seen in my fellow mathematicians.

    At my university there was (and very probably, is) this humongous Fortran program (50 KLoC, probably in the order of 1 MB of source; yep, that's right: 1 source file!) for CFD which was copied and altered by every Master Thesis and PhD student for their own purposes. They all seemed to find it perfectly natural that they spent around 70% of their time tinkering (debugging, comparing to other people's versions, debugging some more, etc.) with their version, instead of producing solid and meaningful academic results. Talk about productivity!

    I just hope that the people writing the super-duper hi-tech climate models we keep hearing about are doing things a bit better than this!  It's no wonder these climate chaps need massive super-computers if they all write code like this.

    In my experience of working on research code (which I've done a fair bit of), most of it can be improved by a factor of between 2 and 10 times in speed, and by horrible amounts in memory. I've never looked at climate modelling code, but I would not expect it to be any different. They can choose between paying for a real developer or paying for more research, and they always choose the same thing.

    You have to realise that most kinds of researchers work by first doing the math on paper, then doing the math in latex/maple/whatever, then translating that into code - so their code is structured like a math paper, which does not make for easy reading if you aren't used to math papers.

    Of course, it doesn't help that most of them don't really understand what they're doing, on a fundamental level (they have a distorted mental model of computer algorithms, because they don't understand how computers are different from the world of abstract math). But there is a method to the madness, if you know what you're looking for.



  • @asuffield said:

    @Crispy Duck said:
    @jemmy said:

    Doesn't surprise me in the least: most academic programming for actual production by non-CS people is really horrible. At least, that's what I've seen in my fellow mathematicians.

    At my university there was (and very probably, is) this humongous Fortran program (50 KLoC, probably in the order of 1 MB of source; yep, that's right: 1 source file!) for CFD which was copied and altered by every Master Thesis and PhD student for their own purposes. They all seemed to find it perfectly natural that they spent around 70% of their time tinkering (debugging, comparing to other people's versions, debugging some more, etc.) with their version, instead of producing solid and meaningful academic results. Talk about productivity!

    I just hope that the people writing the super-duper hi-tech climate models we keep hearing about are doing things a bit better than this!  It's no wonder these climate chaps need massive super-computers if they all write code like this.

    In my experience of working on research code (which I've done a fair bit of), most of it can be improved by a factor of between 2 and 10 times in speed, and by horrible amounts in memory. I've never looked at climate modelling code, but I would not expect it to be any different. They can choose between paying for a real developer or paying for more research, and they always choose the same thing.

    You have to realise that most kinds of researchers work by first doing the math on paper, then doing the math in latex/maple/whatever, then translating that into code - so their code is structured like a math paper, which does not make for easy reading if you aren't used to math papers.

    Of course, it doesn't help that most of them don't really understand what they're doing, on a fundamental level (they have a distorted mental model of computer algorithms, because they don't understand how computers are different from the world of abstract math). But there is a method to the madness, if you know what you're looking for.



    There is some hope - a few people that understand the problem ( e.g.  http://www.swc.scipy.org/ ).  I don't think it's an easy problem to solve, because grant-based financial structure of university research strongly rewards bad/dirty programming.  Everything needs to be done yesterday, regardless of quality, and everyone's job can disappear quickly. Even if a PI understands that 3 weeks now can save them 6 months over the next 3 years, those 3 weeks may mean being unprepared for a renewal review and a lab closing down.



  • @galgorah said:

    The monkies of war seek the golden banana to abait the paradox of their existential dilemma.

     

       "Abate", goddammit!  "Abate"!

     

      Or is that line just "a bait" for your trolling efforts?  ;-) 



  • @obediah said:

    Are you one of those people? The one that can't leave the implied punchline of a joke alone? The one that must state it in manner suggesting that the creator of the joke and everyone else had no idea at all what they were laughing about?

    If so, I have a question. Were you just oblivious to the humor and trying to be helpful? Or is crushing this sort of thing a hobby of yours?

    Generally I'd rather participate in the humor than crush it!

    I suppose it's more likely that I completely missed the humor in Kokuma's post - I thought unklegewar's was pretty good, but the follow-on was what got me (made me think that the difference between Henson and Hanson was lost somewhere...meh).



  • @too_many_usernames said:

    @obediah said:

    Are you one of those people? The one that can't leave the implied punchline of a joke alone? The one that must state it in manner suggesting that the creator of the joke and everyone else had no idea at all what they were laughing about?

    If so, I have a question. Were you just oblivious to the humor and trying to be helpful? Or is crushing this sort of thing a hobby of yours?

    Generally I'd rather participate in the humor than crush it!

    I suppose it's more likely that I completely missed the humor in Kokuma's post - I thought unklegewar's was pretty good, but the follow-on was what got me (made me think that the difference between Henson and Hanson was lost somewhere...meh).

    Ok, let's chalk it up to me being in a mood and move on. :)
     



  • Hey, you can't just move on - this is teh interwebs dammit, at a [i]bare minimum[/i] one of you now has to either (a) call the other a moron, or (b) compare him to Hitler.



  •  I was only browsing the code for about a minute and I already found this:
    if(line(13:14).ne.'3A') stop 'should not happen'



  • @DaveK said:

    @galgorah said:

    The monkies of war seek the golden banana to abait the paradox of their existential dilemma.

     

       "Abate", goddammit!  "Abate"!

     

      Or is that line just "a bait" for your trolling efforts?  ;-) 

    Already had me at "monkies". 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.