Aww yeah, now we can finally get up to some REAL programming
fun fortran fact: at my government job, some of the other fresh-out-of-college kids were mainly employed to convert fortran code to java, so it could be maintained by cheaper fresh-out-of-college kids instead of people with PhDs.
and the main problem they were running into it was that they were getting different results with the ported-to-java code, and it turned out the reason was that the default floating point precision for java was higher compared to when the fortran code had been written
and they'd take old weather data and run the code to calculate averages and such and it would say that the temperature was 56.72 instead of 56.71, but it turned out the new value was more correct
but it wasn't acceptable. the old fortran code was being used as an acceptance test, and plus, the last thing they wanted to do was to change the official values of stuff calculated in the 70s or 80s.
We were a government agency doing weather.
do you know how many conspiracy theorists would be pitchforking our door if we changed the average temperature of one town in Minnesota in the 1970s?
so the coworker ended up having to calculate everything with the java decimal class instead of floating point, and explicitly truncating after every result, as that was the only way to ensure they matched the accuracy of the old fortran-77 code.
Apparently there's a lot of fortran code hanging around the meteorology world, and it's for one simple reason:
they wrote it in the 70s or 80s, and it still works, so why change it?
and yeah, the only reason we were changing it was that we couldn't find anyone who wasn't 50+ with a PhD who could write fortran, and they were getting rare and expensive.
so the government agency was doing two things:
1. getting the PhDs to pair up with java programmers and port the fortran code to java
2. convincing the local university to offer fortran classes
they did successfully do #2 but I don't think they either sent employees over to take classes or did anything to convince CS undergrads to take Fortran so I'm not sure how well it worked
I'm kinda surprised that school didn't already offer fortran... I went there and I knew all the CS faculty and probably half of them were fortran programmers in the first place.
it was one of those schools where everyone teaching CS was a mathematician or chemist or astronomer
but they didn't teach fortran at the time I was there because it was the early 2000s and they'd decided to move boldly into the future by standardizing all the CS on One Language to rule them all.
And being early-2000s, that language was JAVA
which was great because half the classes were things like data structures which need things like pointer math, so it just meant that they had to waste the first couple weeks of the class teaching everyone C
which would be fine except since this was a sort of clandestine C-class, it wasn't properly integrated into the university's collection of classes, which meant EVERY CLASS HAD TO DO IT AGAIN
instead of just doing a sensible thing and having like:
CS-201 "Data Structures & C programming"
and making all the later classes that need C have it as a prerequisite so we'd only have to learn C once
so there'd be a lot of classes where you'd show up day one and they'd be like "welcome to computer architectures! we're gonna talk about how computers work at the transistor-gate level, building ALUs and caches... so for the next 3 weeks, you're gonna learn C! again!"
you can't talk about assembly programming to people who only know java as a programming language.
their brains will explode.
you gotta go through C first to prepare them for the shock
You can follow @Foone.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.