Monday, March 24, 2008

A Mathematician's Lament

I ran across this wonderful essay about all that is wrong with math education in the U.S. through a friend's blog. At 31 years of age, I'm only now discovering the beauty, purity, expressiveness, and sheer fun of math. In college I completed a Sociology degree mainly because it was a field where you were allowed to let your mind wander, be imaginative, and just think. It was fun, but the ideas generated were flimsy and whimsical, and never led to higher level abstractions and a deeper understanding of things. It the end, all my Sociology coursework was little more than creative writings assignments whose merits I judged by how cheeky they were. The word masturbatory comes to mind. This is a field where ideas are judged not by their truthfulness, but by their influence. A glib and clever argument wins the day; the ultimate elevation of style over content.

I chose Sociology as a conscious rejection of the soul-crushing drudgery and monotony of my high school math curriculum. The essay nails my feelings and captures my disgust perfectly. Why do I need to multiply matrices? Why do I need to solve quadratic equations? Two reasons, it turns out: for the joy of deeply understanding something and for the pride of building that something out of nothing.

One of the author Paul Lockhart's laments is the way in which mathematics is taught according to the "ladder myth" — the idea that mathematics can be arranged as a sequence of subjects each being in some way more advanced, or higher than the previous. It is true that Algebra 1 doesn't conceptually lead to Algebra 2, which in turn doesn't lead to Pre-Calculus. It's a bad way to teach math. But my passion for programming arises from something akin to the ladder myth in computer science. I've long contended that it is possible to teach anybody to be a programmer. They might lack both aptitude and desire, but it could be done. And it has nothing to do with my teaching abilities; rather, it's possible because of the inherent "ladder" nature that is computers. At the most base level possible, everything that happens in a program has a perfectly logical and simple explanation. There is nothing magical about a String: it's just a collection of single characters in a specific order. There is nothing magical about a character: it is just an byte value that gets mapped to a certain symbol. A byte: just a collection of bits. Bits: a bounded collection of ones and zeros. And there is certainly nothing magical about binary, you can teach 3rd graders to perform binary arithmetic if you have a good enough teaching style. Everything has a simple explanation if you chose to pursue the cause. So when I say the joy of programming comes from "deeply understanding something", I mean the joy of knowing how all the minute, simple pieces assemble to create a complex and sometimes elegant whole.

And the pride of building something out of nothing? It's pride in the fact that everything above the hardware level is just an idea. An idea whose shoulders my work stands on, but an idea nonetheless. And if I wanted to recreate the idea myself then I could, given enough time an effort. I could write my own operating system (it wouldn't be an improvement, and it might be bug riddled, but I could)! I could write my own thread scheduler; afterall, there are certainly enough sources available to give it a good go. I mean, look how many people write their own languages, some in a single weekend! You know what, isn't the hardware just an idea too? It's turtles all the way down and it's a beautiful thing to be part of.

Some of the most wonderful examples of this come from the functional programming side. Consider The Little Schemer, by Friedman and Felleisen. This is a very slim book (less than 200 pages), and it doesn't just teach Scheme. It teaches you to think about computations using recursion, lambda expressions, and even y-combinators. Very weighty stuff. And you know what the prerequisite is to read the book? "The reader must be comfortable reading English, recognizing numbers, and counting." That's it. Wow. Everything else you build yourself out of some basic primitives. Addition? Built out of adding 1 recursively. Multiplication? Built out of recursive addition. Powers? and on and on... There is a beauty, joy, and elegance to taking a very small number of primitives and building something grand out of them. There is a real sense of accomplishment when something worthwhile in its own right can be understand at all levels from the most complex to the most primitive.

Building everything on top of a few simple primitives seems to be a cultural phenomena as much as a technical one. Consider Guy Steele's Growing a Language. (Spoiler alert, please go read this before moving on, it is a work of beauty). This paper starts by using only one syllable words, and any larger words are defined in terms of those basic one syllable primitives. Growing everything on top of a few low level primitives applies to written papers as much as computer programs. In just three pages Guy Steele progresses from having to define "woman" to having all the words needed to deliver a thoughtful analysis of programming language evolution. There is an undeniable beauty, elegance, and intelligence behind this paper.

So what goes wrong in both math and computer science? Why are so many programmers simple trade workers happy to put in 8 hours with the tools their given without ever a thought of abstraction, improvement, or excitement? Remember that first Visual Basic training you were sent to in the 90s? (Was that just me?) Day one: Learn the syntax. Alright, that's not so bad. In fact, late binding and dynamic types have fallen back into favor these days. Day two through five: ADO and Control Bindings. That's right, you jump from the primitives of expressing yourself into how to move data in and out of the database and how to get your UI to refresh properly, and you never look back. Knowing how ADO works and what it's built upon won't help you get a job, so there is no use covering that material. But, by God, you will know how to create an MS-SQL backed inventory application for your LP records. For those not subjected to the MS training I was, let me translate into Java terms. Day One: Learn the Syntax. Day two through five: Hibernate and Struts. To speak knowledgeably about Object Relational Mappers is not important. To know anything about JDBC is not important (ODBC what?). To understand the basic principles of OO design in a purportedly OO language is... not.. the... point. Has anyone interviewed candidates for jobs lately? Are you as frustrated as I am about seeing buzzword, acronym filled resumes from people who simply don't understand anything between the language level and the web framework? It creates a fleet of programmers that have two success metrics for their work. 1) does it compile, and 2) does it render nicely in the browser.

These programmers get cranked out because there is no "ladder myth" being honored. There are no primitives upon which all else is built. Skipping the ladder approach creates confusion and numbs the mind into a concern for how things get done instead of why things get done. Believe it or not, the Scientologists have something to say about this. At an interpersonal level, having a conversation with someone is a two way communication. You send a message, the message is received and acknowledged, and a reply is sent. In the course of a conversation, when one of these steps goes missing (i.e. your mind wanders) the communication has been broken and you become confused. You may try harder to pay attention, but even if your mind never wanders again during the conversation, you lack a complete context for what your partner is saying. You'll never really understand the true point to her comments unless you go back to when your mind wandered and start to re-listen to that necessary information. If you don't, if you try to pick up where you left off, you'll end up even more confused because you're reinterpreting everything being said through a filter that your mind created to make sense of the conversation. (1)

And what is learning if not a communication between a teacher and a student? Or a book and a student? The texts that build all on top of primitives carry you along with every bit of the conversation. They are so refreshingly enlightening because they do follow the ladder myth, they do
make every step build upon the last. You feel a sense of accomplishment and deep understanding after working through one of these texts; a feeling wholly unlike graduating from a week long training and receiving a certification saying you're a grade-A programmer.

So why, in my thirties, have I developed a growing love of mathematics? It's precisely because mathematics is a ladder of knowledge. There is no secret, gnostic knowledge to learn. There are no formulas to memorize. There is no magic. Books like The Essence of Discrete Mathematics have shown me that even advanced topics are decipherable and simple for those willing to dig deep enough into the origin of things. True, there is no one ladder for learning math. Each topic and field has its own path. But I think guiding students towards incrementally understanding the foundations of what they're learning would help them find their passion for numbers and curves. So the "ladder myth" is that there is no single math ladder to guide coursework. There are many, many ladders, each leading to somewhere new, or somewhere interesting, or even a dead end. So while Lockhart rejects the "ladder myth", I embrace it. And yet I feel we're agreeing with each other. All students show up to school with the primitives: counting. Every idea after that is simply a rung on a ladder leading to a new idea. Skipping rungs is the road to confusion, where students memorize and transcribe, and learn to dislike math intensely. But if you climb every rung, you'll really understand. And maybe you'll find yourself in your thirties working word problems just for the fun of it. That's we're I've ended up.

(1) I wish I had better reference for this church teaching but it was told to me in person by someone who had attended a specific Scientologist communication class. At this point it should (sadly) be classified as "hearsay". Confirm this teaching if you can.





2 comments:

Owen said...

Whoa. We should go for a beer sometime. I've thought about the "making something from nothing" several times before and it's beautiful.

HandsakerA6 said...

If there has been any difficulty which is not surrounding with your probabilities then you must needs to put your best efforts to achieve this, and then with some best parts it can be achieved. article rewriter online