Monday, June 20, 2011

You don't understand something until you think it's obvious.

I learned a valuable life lesson in the course of completing my MSci degree. It's not so much about mathematics as it is about understanding mathematics or any other complicated subject.

Often in studying maths, I would spend hours or days stuck on a problem, proof, or section of a textbook. After I finally found a solution or an epiphany in what I read I would feel terrible. "I'm so stupid!" I'd exclaim. I would throw out or scratch out pages of notes, trying to blot out any evidence of the embarrassingly long time it took me to grasp the concept.

I had the same feeling just a few hours ago - but not with mathematics, with programming. I had spent the past three days trying to figure out the macro system in the Racket dialect of Lisp. I managed to write a simple message-passing object system, based on the one used in Structure and Interpretation of Computer Programs, just to see if I can. I patched together pieces of code from various samples, cargo-cult programming, until I had something working. I spent the next two days trying to understand what I wrote - noting my progress in another blog. Bit by bit, things started to come together - lot's of little epiphanies. "This is all so simple. It shouldn't have taken me three days to do this."

I remembered all the other times I had this feeling. Most of them had to do with mathematics or coursework. The most severe episode occurred as I wrote the final draft of my thesis. There was no sudden big epiphany. Rather, as I combed through my work, I recalled hundreds of little ones. "This is all so simple. It shouldn't have taken me a year. A *real mathematician* could have done it more quickly". I still have a tinge of embarrassment whenever I send it off to someone.

It's a common malady of myself and my friends who study mathematics to think that we're stupid because it's taken so long to understand something so simple. As I recalled all this occurrences I had a new epiphany: It suddenly seems simple because we suddenly understand it.

I stopped that last thought and restarted: "This is all so simple. I'm glad I finally get these macros." It's probably a lesson I could have learned without paying all that money for tuition. It seems so simple, after all.

Mathematical posts will resume shortly.