Trevis Rothwell's weblog

Almost, but not quite, entirely unlike tea

Will I Ever Use This In The Real World?

27 January 2011

This month saw the publication of Don Knuth’s Art of Computer Programming Volume 4A. In eager anticipation of receiving my copy in the mail, I was reading some of Knuth’s writings on number theory. This ostensibly had nothing to do with anything I was working on in the real world, but I was enjoying it.

Today I was trying to solve an odd programming problem for a project I’ve been consulting on. The program was supposed to receive a series of (X, Y) coordinate pairs and process them, but for some reason the processing of the Y coordinate was consistently off, while the processing of the X coordinate was perfect. Moreover, the larger the Y value, the worse the processed result became. I presume that something was going wrong in the processing, but exactly what was eluding me.

While I did not have this matter in mind at all during my reading of Knuth, I was inspired by some of the number theory concepts to find an approximate pattern in the faulty processing and then find an acceptable value to multiply our Y-coordinate by, such that the modified Y input would offset the problem. I still didn’t understand the underlying cause of the problem, but the software was supposed to ship today, and this made it work acceptably well.

My fix was not particularly an application of number theory; at most, it was basic algebra. But even though number theory itself wasn’t involved in my solution, studying number theory prepared my mind to think in the direction of seeking patterns in numbers, something that I probably wouldn’t have thought of otherwise.

So to the question, “will I ever use this in the real world?”, the answer may well be no… but even if not, the study of the material forms new connections in your thinking, which may help you in real world situations.