I was talking today with a student about mathematics. The student was interested in new ways of using gesture to create mathematical notation.
Since I am interested in augmented reality, I suggested that perhaps we can try to move mathematical notation off of the flat page, and into three dimensions.
The student protested that mathematical notation is actually one dimensional. I could see where he was coming from. After all, everything you can write down in math can be expressed as a single text string — which is indeed one dimensional.
I disagreed, and as an example, I wrote the following formula on the whiteboard:
x^{2} + y^{2} 


r^{2} 
“You see?” I said. “Sure this can be expressed as a single text string, but that doesn’t capture what we mean. When we look at this expression, we see something two dimensional: We read the addition on top horizontally, while the relationship between the numerator and the denominator of the division is expressed vertically.”
Then I took a closer look at the expression I had just written. “Wait a second,” I said, “this is actually three dimensional. Each superscripted ‘2’ is really orthogonal to everything else. By making that text smaller and shifted up and to the right, we are essentially conveying the existence of an operation (raising to the power of 2) that is orthogonal to both the addition and the division.”
It dawned on me that when we write in mathematical notation, we are actually packing a lot of dimensions onto that flat page. For example, subscripts represent yet another dimension, orthogonal to all the others. Suddenly, the idea of writing mathematical expressions in three dimensional space seemed a whole lot more interesting.
We can think of mathematical notation as a way of transforming a onedimensional expression into a form that is easier for humans to read and manipulate. The same way we use an FFT to transform audio into a form that’s easier for a human to look at and understand.
You could do the same thing with code. Technically, line breaks and white space are not necessary in C, you only add them because it makes it easier to read… What happens to the readability your code if you have a tab character that moves text inward and outward rather than adding horizontal white space?