Friday, June 11, 2004

Math, Extreme Programming, and Sherlock Holmes

by Asim Jalis

My big aha moment with math came when I took Real Analysis which was a 500 level course, with Jill Wright. What is interesting about this is that she had also taught me a 200 level advanced calculus course. I had been bored through the course and wasn't sure if it was the material or the instructor. But then in the 500 level course it became a completely different game. As I was sitting through that course I decided that I must major in math. It was all just too beautiful. I think the main thing that happened was I understood what constituted a proof as opposed to just a plausibility argument. In most undergrad calculus even when they tell you they are proving something it is really just an argument. It is not a proof. The idea that you can actually prove things conclusively, that there can be no debate about whether the assertion is false or true, that just blew me away. I think I was more mesmerized by the structure of proofs and the epistemological implications of proofs than math itself. But at that point I saw all of it as the same thing. I've had the same kind of aha moment in Extreme Programming and Test-Driven Development. The idea that you can use code to establish the correctness of other code is quite powerful. So you are in this system, and the system itself makes statements about other parts of the system, which prove a kind of internal consistency. The chain of logic involved in assertion leading to other assertions, and the fact that this is even possible, still surprises me. The reason this surprises me is that I have always thought of deduction as a reductive process. You end up with less than what you started with. Or that it's just a game, and you simply rearrange what you had initially. In mathematical proofs (and unit tests) it feels like you can use this deductive process to create something that was not there originally. Let me elaborate on this with an example: Arthur Conan Doyle's Sherlock Holmes. It seems unreal the way Holmes uses deduction to solve crime, to arrive at facts that were not initially known. And it seems somehow disconnected from our world. Even proving simple and universal things like gravity and relativity require subtle experiments. How is it possible that he can deduce something as specific as what happened at a particular place at a particular moment in time using incidental forensic evidence; the idea that something like this could be deduced so effortlessly seems unreal. It feels like while this could be possible in a different universe, it could not be possible in this one. Mathematics and unit testing create the perception that in fact this is possible in our universe.