2 ms·
I've been asked to consult on a number of programs used for scientific research or environmental modeling. In one case a science student was expected to work o
by todd8 7y ago
I've been asked to consult on a number of programs used for scientific research or environmental modeling.
In one case a science student was expected to work on a C++ simulation for his dissertation. The existing code base had been written by other grad students from previous years. It was clear that no one involved had any experience with C++ and it wasn't going to be possible for him to do a good job with the existing source code. Fortunately, in this case, the C++ based simulation was eventually dropped.
Another time a team of professional civil engineers couldn't understand why their model was able to make predictions that perfectly matched their experimental data. It predicted a poorly understood physical phenomena (algae blooms) so perfectly that they asked me for help. In a couple of minutes I was able to explain to them how they had overfitted the model to the small sample of experimental data and that the model likely had no predictive value at all.
I was asked once to debug a large program used to understand the dynamics of floods. The program contained some of the worst coding practices I've ever seen. For example, the same global variables were reused for completely different purposes in different parts of the program, sometimes X2DDRATE meant one thing and later on some paths it contained a completely different kind of measurement with entirely different units. This was done in an effort to "save memory" by not having too many variables.
A different ecological model I helped repair needed to compute the integral of a function at one point and used the following method: pretend the function was a straight line so that the integral could be computed as the area of a triangle. The function was a simple, uncomplicated exponential, something that a high school math student could integrate exactly.