Lament of an artist

I recently came upon a tweet by Kathy Sierra. Here it is:

So I went ahead and downloaded the PDF file and read it through. Man did it resonate! Here’s a quote that practically captured the essence:

Mathematics is an art
– Paul Lockhart

Lockhart was describing how the current education in America was eroding the sense of wonder, discovery and thrill of mathematics in children and young adults. First, go download his article Mathematician’s Lament (about 25 pages) and read at least the first and last few pages if you’re in a hurry.

I don’t know much about the American education system, but the way it’s described, it’s bad. And the Singapore education system (at least with regards to math) is similar (well, at least from what I remember when I was studying). The sense of discovery just wasn’t there.

When I was about ten (I think), my parents bought me an encyclopedia set, Childcraft. The first book I went for? The one on mathematics.

I gorged myself on the puzzles, stories, thought experiments in the book. For example, there was that crossing of river puzzle, with a farmer and a sheep and a wolf. There was a story excerpt of Flat World, where Points and Lines meet the 2 dimensional Squares and Pentagons. And there’s a “proof” of the non-existence of vampires. And … wait, what? You want to know the proof?

Ok, suppose vampires suck blood out of victims and the victims become vampires themselves. Suppose there’s only 1 vampire in the beginning. On the first night, he bites one person. By the next day, there are 2 vampires. 2nd night, each vampire bites another person. So there are 4 the next day. I’m sure you can see how this goes… at some point, the doubling vampire population simply overshot the entire world population. But we’re still here, aren’t we? Hence no vampires.

Of course, that proof goes out the window if vampires don’t need to bite every night… or if they can control who to turn into a vampire… ok, moving along…

Oh yes, with this encyclopedia in hand, I learnt about the fun parts of mathematics. I learnt about the magic numbers of 3, 4 and 5 forming a standard 3^2 + 4^2 = 5^2 Pythagorean triangle long before I actually knew what Pythagoras’ Theorem was. I read about how the ancient Greeks were racking their brains for how to get a right angle, and they used a length of rope with evenly spaced knots. They found that a triangle with sides of 3 knot length, 4 knot length and 5 knot length, created a right angle at one of the corners. That was fascinating.

There was also this section on Fibonacci numbers, and a story about rabbits. The algorithm behind the sequence was presented with an interesting back story of an expanding bunny population. I remember in university, my professor mentioned the sequence and I exclaimed, “Fibonacci sequence!”. And my friend, who’s sitting beside me, turned to me and asked, “You know about this?”. Really? A math university student who don’t know about Fibonacci sequences?

I don’t know about you, but for all the talk about Asians being better (at math) (here and here), I think most of us still don’t get to see math as an art, as something beautiful to contemplate. I started out seeing math as fun, then later on as something scientific and not-so-fun. And after my service in the military, I went to university, and suddenly it’s fun again. I guess it took me a fresh perspective to view math once more…

And I think programming is like math. No, I’m not bringing in the meta-blogging type of “This blog topic is something like that” and go off on some far out analogy. I mean programming, like math, requires one to see the abstract, manipulate pieces of information in the mind’s eye, come up with solutions in the ether, and then bring forth the solution into the world.

Right now if you ask me about math, like really hard core math, I’d probably stumble. Partly from a long disuse of the principles, but mostly because unconsciously, I’m trying to capture that sense of wonder again. That requires me to shed some undesirable shackles and discipline, and allow myself to not know everything on the topic. Math fun is back in vogue.

P.S. The next book in the Childcraft encyclopedia I pounced on? The one with stories. I guess I’m a sucker for fiction. *smile*

The need for better, younger programmers

Lately I’m seeing a theme gradually forming. There are commercials featuring young people voicing their support in maintaining an environmentally friendly lifestyle. I also see commercials targeting young people, judging by the SMS inspired characters such as the carat ^, slashes /, and at signs @ to form pictures. Then there’s Microsoft’s free software for students. And finally, there’s the winning bid by Singapore to host the Youth Olympics 2010.

The focus on young people is growing.

My math teacher (or was it chemistry) once remarked that it’s a shame that she’s teaching a concept the way it was, at that age of learning we’re in. Because when we progress to the next education level, we would find out it was wrong, and that we’d have to learn a more correct version.

It’s like fractions in math. Say
2/3 = 4*a
I was to “bring the 3 over to the other side”, so I get
2 = 3*4*a

Later on, I learned that it’s actually multiplying both sides of the equation by 3, which gave the easier to explain conclusion of “bringing the 3 over”.

Education at a young age is important. Ideas arise, opinions form, and suddenly they’re set in stone (or at least very difficult to change). Once you’re at a certain age, learning new concepts might involve unlearning old ones. For some people, learning a new concept is not the problem. It’s the letting go of old concepts that’s painful, because that means they might be wrong before.

The world needs computers and software to make a lot of things work. New problems need to be solved, and they appear faster and more complex. Programming experience doesn’t count for much anymore. The ability to think, is.

I share Joel’s faint distaste for Java being taught in schools. Alright, fine, I hate Java. I don’t know what pricks me about it. When I first learned it, which was the version 1.1.8, it was cool. But not fun, like C. And Java kept jumping up in version numbers. But there’s only one version of C (at least it didn’t keep adding new “cool” commands).

I remember many an afternoon where I helped my fellow students figure out what went wrong in a segmentation fault. It’s the worse output error one could ever get, because there’s nothing to give you any clue whatsoever about why the program failed. It was a test of logical skills, intelligent omission and creative `printf` additions.

But if young programmers don’t get these kinds of training, what will happen to our future programs? They are the best at coming up with innovative and creative solutions, because they don’t have past baggage. Yet if they get a lousy programming education, they won’t be able to come up with those solutions in the first place.

Dream In Code does a great job at code guidance. A student (or any person with a programming question) can ask for help, but code must be provided. Gentle guidance is gladly given. Sample solutions are staunchly stemmed. The questioner is encouraged to think.

The betterment of our future doesn’t just lie with us, the so called established and experienced programmers. Our younger generations of programmers matter too, probably more so.

Well-rounded coding education

Michael Barnathan asked, on my 2008 introductory article, for my thoughts on

I’m [Michael] drawing up plans for a new type of university with a multidisciplinary curriculum that takes advantage of the fusion of principles from different disciplines.

His project’s web site is at http://www.projectpolymath.org/, aiming

to simultaneously acquire breadth and depth of knowledge in time comparable to that required to obtain a traditional single-subject university degree

I think his toughest challenge is actually convincing other people that his university degree offerings are on par with, and even better than, other conventional university degrees.

That said, my eye was caught by

Rather than studying individual majors, students focus on problems and concentrate on their primary approaches to these problems.

It’s problem-centric, so other skills come into play.

Say you’re an artist and you want to paint something. Just being a brilliant creative person isn’t enough. Do you want to use a particular type of brush? Do you know how to mix colours together to get that special hue and tone? Do you care about the quality of your painting canvas?

Joel Spolsky says there should be a degree program where it would

consist of a practical studio requirement developing significant works of software on teams with very experienced teachers, with a sprinkling of liberal arts classes for balance.

where

You might be able to major in Game Development and work on a significant game title, for example, and that’s how you spend most of your time, just like a film student spends a lot of time actually making films and the dance students spend most of their time dancing.

It’s similar to Michael’s idea of education. The other areas of your education enhance your primary focus. Just browse through some game development sites such as GameDev and MadMonkey. You’ll find many articles on game development that have little to do with coding itself, ranging from application of artificial intelligence to the physics in cloth simulation. And here you thought game developers were all about coding skills…

Then there’s Clayton Shier who wrote about the importance of math in computer science courses, of knowing a subject outside of programming.

And Bryan Hughes said that

Coding is actually a small part of the real software engineering package.

on a forum post discussing recognisable traits of a good programmer (look for Nova Dragoon near the end of the post).

Not convinced yet? Jeff Atwood talks about how we should teach computer science, with subjects such as project deployment and source control. Topics that have little to do with coding itself, yet make you a better programmer. There’s something important he mentioned too:

Today’s computer science students should develop software under conditions as close as possible to the real world, or the best available approximation thereof.

It’s something that on hindsight, I should have paid more attention to. In the academic environment,

• I worked mostly alone (no people skills training for working in teams)
• Collaboration was frowned upon (they think of it as copying or cheating)
• Source control was non-existent (still is in my present employment…)
• Deployment was non-existent (instructor/professor simply compiled your code and ran it)
• Mostly theoretical or well-defined problems were given (real world problems are much more complicated, usually people-based)

The usual problems fall into topics like finding shortest path with Dijkstra, drawing the Sierpinski Triangle, or manipulating huge matrices for LU decomposition or QR decomposition (killed lots of brain cells too because of the math involved…).

During my university education, there was only 1 semester where I attended a specific course on programming, with C. Half my time was on math. The other half was on solving scientific problems with programming, using the knowledge I had on that one course in that one semester.

When I started working as a programmer, there were lots of programming stuff I needed to do and learn. Like SQL, VB.NET and Javascript. There were also a lot of non-programming stuff. Like writing documentation, talking with users and working with other team members.

Being a good programmer is more than just coding.

And that’s the point. That’s the whole point of this blog. Now, isn’t it time for you to get a well-rounded coding education?