• 0 Posts
  • 8 Comments
Joined 3 years ago
cake
Cake day: June 18th, 2023

help-circle






  • This was on a Fortran project that had no encapsulation and way too many global variables.

    Suddenly, one particular calculation was failing, and not in a floating point rounding error kind of way. After setting up several scenarios to generate various input values, I determined that Fortran’s absolute value function was returning the wrong results.

    I couldn’t understand why, so I went to the Lead Architect. He poked at it for about four minutes and did some searches, and found where someone else had defined a global variable named ABS that was masking the built-in abs function. The function call argument [e.g. abs(3)] was being compiled as an array index on this ABS variable [which was not an array, so yay, undefined behaviour].



  • I’m gonna be that guy. Cotton pickers are not combines. Combine harvesters combine the steps of reaping, threshing, winnowing, and gathering into one machine. They can do several different cereal grains, including wheat, oats, barley, corn, soybeans, and so on. But they can’t do cotton because cotton needs different processing to get the bolls off of the bushes, and it also needs to be compressed into a big block called a module.