SGI: Development

code comment hilarity

So we use the Nato Reference Mobility Model in our vehicle simulator, I was hacking on it the other day and noticed something one of our Ph.D physicists wrote; thought it was a hoot:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
He was paid per hour, since all he typed was "39.37" (=100/2.54) over and over again :) lrn2macro, sheesh.
Any chance this is not copyrighted to put it on the dailywtf?
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:
Well, but he's a physicist not a coder I'm pretty sure he doesn't know anything about the preprocessor. The code is copyrighted but this little snippet is free and clear for "fair use" wherever you'd like. The code is patented so the whole thing is totally "out there" compared to this tiny snapshot. 8-)
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
Oh that explains, physicists (and beta scientists in general) are such a bunch of cowboys when it comes to hacking code...

Second glance at that code makes me think that nrmm2sub_ is a fortran routine since all arguments are pointers. Figures, since if it's mititary stuff chances are good that it is so ancient it could have been coded on a VAX or something similar.

Third glance made me realize i'm getting older :(
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:
Yep NRMM is fortran, this particular Ph.D is a fortran whiz who only learned enough C++ to to call his fortran functions from the vehicle model, which we originally wrote in C. When we converted it to C++ I went through and converted all the #defines to consts, and of course you're right he should have used const float INCH = 39.37 and stuck it in the header file. Actually there are horrible amounts of code duplication everywhere. Apparently that's what you get when scientists write a million lines of code before they let a software engineer take a look at it... :lol:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
I imagine there is a forum, somewhere else, where physicists and mathematicians put up equations written by software "engineers" to laugh out loud at them.
"Was it a dream where you see yourself standing in sort of sun-god robes on a
pyramid with thousand naked women screaming and throwing little pickles at you?"
Well, amongst thousands of other anecdotes, there is a whole section of programming stupidities here: http://www.rinkworks.com/stupid/
Systems in use:
:Indigo2IMP: - Nitrogen : R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium : R14000 600MHz CPU, 4GB RAM, V10 Graphics, 36GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other systems in storage: :O2: x 2, :Indy: x 2
It could be argued that much of mathematics is not particularly important for programmers, although I am frequently amazed at how little number theory many of them know. For instance, a problem like "calculate the sum of the multiples of either 3 or 5 less than 1000" will always be written as a loop (or, if you're really smart, a list comprehension), even though that quantity has a closed form. One programmer was very proud to have written a solution in terms of a Horn Clause solver; it can be calculated rather easier on the back of a cocktail napkin.
:PI: :O2: :Indigo2IMP: :Indigo2IMP:
Trippynet wrote: Well, amongst thousands of other anecdotes, there is a whole section of programming stupidities here: http://www.rinkworks.com/stupid/

That site is quite funny, even though I have to travel back in time for a lot of them. :lol:
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
MyDungeon() << :Fuel: :Octane2: :Octane2: :Octane2: :Octane: :Indy: MyLoft() << :540: :Octane: MyWork() << :Indy: :Indy: :O2: :O2: :O2: :Indigo: :Indigo:
I'm a physicist with 30+ years experience coding. Mostly fortran77, various forms of basic and the last decade a language called IDL, but no formal teaching in coding. Just self taught starting with commodore basic on the VIC20.

I recently asked a software engineer friend to streamline some code at work, had been cobbled together over 8 years with various authors and constantly changing requirements. The code that came back worked fine, but I couldn't understand any if it, was all pointers and objects.... Not scientist friendly :)

Regards, Adam
:Onyx2: :Octane: :Indigo: :Indigo: :Indigo: :Indigo2: :Indigo2IMP: :Indy:
We bought some code from Georgia Tech, a 6DOF written in fortran entirely by one guy, one of their aerospace professors, we tried to build it with gcc's fortran compiler and got like 25,000 warnings and errors. So naturally we asked them what they used to compile it, turns out it was a 20 year old version of Microsoft's fortran compiler. Now, I'm not unused to the phenomenon of bitrot due to compiler improvements, but 25,000 warnings and errors? Our department manager wanted to scrap it but our Ph.D fortran whiz fixed the code himself, which is to say he fixed it without referring back to anyone at Georgia Tech. He assures us it still runs the same... :lol:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
Having run through the leaked Irix source code with grep I've found a few funny comments hidden away. Suprisingly they refrained from using the f-bomb.
:Crimson: :Onyx: :O2000: :O200: :O200: :PI: :PI: :Indigo: :Indigo: :Indigo: :Octane: :O2: :1600SW: :Indigo2: :Indigo2: :Indigo2IMP: :Indigo2IMP: :Indy: :Indy: :Indy: :Cube:

Image <-------- A very happy forum member.
Just checked the mozilla codebase; they did not refrain from using the f-bomb, 27 times in 11 files, though most of it seems to be related to spell checking. Gotta wonder who felt it was important to make sure people weren't misspelling such permutations as fuck, fucker, fuckhead, motherfucker and motherfucking... :shock:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
R-ten-K wrote: I imagine there is a forum, somewhere else, where physicists and mathematicians put up equations written by software "engineers" to laugh out loud at them.


LOL! Ain't it the truth :-)
:Skywriter:

DECUS Member 368596
R-ten-K wrote: I imagine there is a forum, somewhere else, where physicists and mathematicians put up equations written by software "engineers" to laugh out loud at them.



That is funny right there!
If the thing isn't on fire it's a software problem.

:Tezro: :Octane2: :O2+: :Fuel: :O3x0: :A350: :Indigo2IMP: :Indigo: