I was working as a Systems Engineer for a major computer company (3-letter name) and our marketing team had sold a very expensive mainframe computer to an oil refinery. The MIS Manager at that plant was someone wholly unqualified for the job, lacking even basic computing skills, and with zero understanding of how computers work in the first place. A few weeks after the installation, I received a call from him, telling me their computer was broken, and that I had to get it fixed immediately. Repeated attempts to get him to tell me what was wrong got me nowhere, so I drove the 60 miles to the refinery to figure out what was wrong.Upon arriving at the plant, I was ushered into the General Manager’s office, where the MIS Manager actually accused us (the 3-letter major computer company) of intentionally sabotaging the performance of the computer so that he (the customer) would have to buy a larger computer to get the work done. I learned that the computer itself was fine, but one of their programs was taking roughly 14 hours to print out a shipping label. This did seem to be totally unacceptable performance, but his claims that the computer was broken were clearly bogus.Maintaining my professionalism, I asked if I could view the program in question – the one that printed the labels. He loudly proclaimed that the program could not possibly be the issue, because they had hired someone away from NASA to do the programming, and had paid him over $100,000 for the program. Therefore, the problem had to be the computer itself. Eventually, the GM ordered the MIS guy to give me a couple of hours access to the software, after which we would re-convene the meeting in the GM’s office to hear my assessment.The application was actually a good bit more involved than just printing labels. It was printing hazardous materials handling instructions (several pages long) for HazMat shipments originating from the plant. This involved various database lookups to obtain the ingredients, their chemical formulae, and finally the handling instructions each for those components. The application itself was written in a very high-level scripting language (REXX, for those of you who know what that is), which I found very surprising, since this type of application would typically be written in a compiled language of some kind, for performance reasons. Then, after looking at the code for only a few minutes, I realized the programmer who wrote it knew very little about programming in general, or about mainframe programming in particular. (I eventually learned that the NASA contractor was not actually a computer programmer when he worked there – he was actually a project manager.)After a half-hour reviewing the code, I spent the next 1.5 hours re-writing it, removing obvious performance bottlenecks, and then we tested it. My quick hack version took 90 seconds to print a label (vs 14 hours previously). At the follow-up meeting in the GM’s office, I explained what I had done, demonstrated the performance improvement, and stated that I was still extremely dissatisfied with the performance, but it would take more than a 2-hour quick and dirty re-write of the existing code to truly optimize it. The GM was blown away by the results, and was clearly looking at his MIS Manager in a new light.PS - After returning to our office, another gentleman and I re-wrote the application in PL/1 (a compiled language used by the customer’s IT group), and the time to print a label went to under 3 seconds. That’s the version I delivered back to them, with the explanation that a really good programmer could probably achieve even better performance, but this was the best I could do without charging them for the service. The GM was quite happy with the results, whereas the MIS Manager was still claiming that we had rigged the computer to perform poorly so they would have to upgrade to a bigger, more expensive model.By the way, the next time I visited the refinery, the GM introduced me to their new MIS Manager…