Wait. So you're going to judge the scientific community based on a piece of source code written by a "shitty programmer"...no wait...comments in the source code that you have absolutely no idea of whether it is even used or not?
How can you even verify that it's real? How do you know if that was a finished piece of code?
You're reading on slashdot, so I assume you have some programming background. You should know better. Someone was trying to fix a piece of legacy code (how old?) that was undocumented and uncommented. Did you analyze the function? Was it really squaring? I know of no compiler that would take x*x and return a negative number, so it's quite obvious the code was doing more than simple squaring.
Now granted, science codes are never that well done but if it was done based on research papers then the code is, at the very least, validated against the results of the paper. If there were no validation at all, then there is little chance of a climate model maintaining numerical stability for an few hours, let alone a 100 year climate simulation.
Scientists are human. They make mistakes. But the models are backed tested against the observational record. If they can't replicate the climate from say, 1850 to today and have the model get within a margin error then the model is broken. However, the models perform quite well and you can see this in the IPCC report. Or you can download a model (like GISS ModelE, it's source so you'll have to build it) and the data (also from GISS) and run it yourself.
You're not really implying that the whole of modern climate science should be tossed out based on an incomplete discussion about single craptastic piece of code are you?