Subj : Physicists as programmers To : comp.programming From : Jyrki Alakuijala Date : Wed Jul 27 2005 11:47 am Walter wrote: > Many of the best programmers I know have never taken a course in > programming. They have degrees in physics. Many of the _worst_ programmers I know have a physics graduate degree. They are inventive enough to return the address of a stack variable or indecisively abstract the array indexing to avoid using plain 0 or 1 (because FORTRAN uses 1 and C uses 0 and they cannot stand the conflict). If one is bright enough to code without knowing the culture and tradition of coding, the resulting code almost works and is close to unmaintainable. Also, I have seen safety critical code produced by a physicist that fraudulently produced its output. It was supposed to calculate a verification image based on its computation, originated from an input image. Unable to know how to calculate the image, but not having the humility to admit his incapabilities in programming, the physicist had decided to take the input image, smooth it slightly, and give the smoothed input image as the verification output. The level of "pragmatism" was overly high here, and I decided to rewrite all the code he had delivered (during 1.5 years), taking a whole two weeks for me. The resulting code was faster, allowing me to run 100 iterations (instead of the earlier 3), only a quarter in kLocs, had a more complete feature set, was more accurate and, most importantly, did not forge its verification output. Physicists, not knowing the testing culture in SE, typically do a lot of manual testing of their code. Of course, a lot of "improvements" are introduced between the successful tests, often breaking the previously tested features. Once the physicist's code is transferred to SE people, they need to start by writing the requirements, creating the automated test suite, only to find that it does not work at all. The physicist people have covered their back by producing binders full of reports about their testing results, run manually during the development phase, showing a complete agreement with the calculation results and the measurements. I would not allow the typical physics graduate to do any commercial programming without a real programmer overseeing what is getting done. One of the best programmers I know has a Ph.D. in physics. However, more than 95 % are really dangerous or slowish programmers. My sampling is based mostly on the European professional programmer population. ;-) .