Programming is Math, apparently.
Having a background in programming language design, I have acquired a professional obsession about syntax and semantics of words — not just pertaining to programming languages but also pertaining to natural language. If you want to get me all bitchy in a meeting, stretch the use of common words beyond reason in order to get your ideas accepted (this is called marketing, and there is a science to it, it’s called Psychology); if you want to see me go off in a rant, present me with an API that uses the wrong words to denote its concepts, like calling a getter method RequestSomething(). So, yeah, I’m obsessive compulsive about naming things and using words — ask my colleagues in the OpenSimulator project about my incursions into renaming things… Words are the main means with which we, humans, communicate with each other. If we get those wrong, we are either being deceitful on purpose or we are creating the context for misunderstandings. Which brings me to the word “programming.”
Recently, I had an interesting experience with the students in ICS. As part of the student-organized ICS Day, there was a Programming Competition that was supposed to be a “Beat the Professor” gig, i.e. students competing against a professor. In the past, this had been done with one of the ICS lecturers as “the Professor”. This year, the lecturer got sick and couldn’t come, so the students asked me at the very last minute if I was willing to act as “the Professor” in that competition. Not knowing any better, I accepted.
I had no idea what the competition was about, but if it was called “Programming Competition” I was game. I always love to explore an unexplored API, use a programming language that I haven’t seen before, build running systems from scratch out of pre-existing components, design efficient data structures for hairy modeling situations, etc.
To my complete surprise, the programming challenges in the competition were… math! Math and algorithms. More precisely in this particular instance, the first challenge was trigonometry, and the second was an optimization problem. I was utterly confused. In my infinite naivety, I ask the main organizer “Why are you calling this a programming competition, when the programming part is completely uninteresting once you figure out the Math?” The student, feeling equally confused with my question, explained that this is how Programming Competitions go, and that they had gotten the challenges, literally or figuratively, from the ACM International Collegiate Programming Competition.
So I took a closer look at that competition. It seems like a fantastic initiative, with participation skyrocketing over the years. Kudos to the organizers! Having young people all over the world coming together over the common drive of solving algorithmically-rich problems is… inspirational. Look at the list of participating Universities in that factsheet, and it reads like a United Nations of sorts. Fantastic!
There’s only one problem with this competition: it is using the word programming to denote math and algorithm development.
An outsider who doesn’t know what programming is will look at this set of challenges and conclude that programming — the thing that hundreds of thousands of professionals do in their daily lives, and that the vast majority of Computer Science students will do once they graduate — amounts to… solving Math riddles! Imagine! Under this syntax-semantics association, your university’s IT department’s staff is, supposedly, solving optimization problems (maybe budget related, these days?); the Apache web server, the software that powers modern society, is, supposedly, full of complicated algorithms. The WordPress software that I’m using to write this post is, supposedly, a wonder of algorithmic thinking. … Really???
While I respect the role that Math and algorithm development play in the advancement of knowledge, and their role in important areas (heck, I recently got a paper accepted at SIGIR 2011), I believe we’re doing a gigantic mistake by associating the word Programming with that concept. It doesn’t do justice to either the actual practice of programming or the actual practice of solving algorithmically-rich problems. They’re not the same thing! Saying that they are the same thing is a classical error in logic: algorithm development usually ends up expressed in the form of a program; but the reverse is not true: not all programs are about solving algorithmically-rich problems. By a long stretch!
As Barbie said, Math is hard, indeed. Programming is also hard in its own way, but not in the way that Math is hard. A myriad of things can be done with programs that involve no Math and no fancy algorithms whatsoever. Moreover, a whole other group of challenges emerges when the programs are to be used by people other than their developers, when they get put out to use in the wild by hundreds, thousands or even millions of people.
In seeing the ACM ICPC, I asked myself how I would design a real Programming Competition. What would the challenges be? How would we determine the winner? Feel free to leave your thoughts.