Somewhere I recently heard someone say something like, “Programming is easy; all the interesting problems have already been solved by mathematics.” I was a bit taken aback by this at first, but it got me thinking about what problems I am solving when I write code. When I’m programming, am I more often addressing a real-world problem, or some kind of software problem? How much of my code is spent on converting, transforming, serializing, deserializing, logging, formatting, validating, and error handling? Usually too much to be very interesting. It’s all plumbing, but what I really want is water.
If I look at the systems I have worked on professionally, an alarming number of them do exactly the same thing, regardless of the business or the problem domain. It’s just setting up a place to store data, a way to present it to users, and a way to translate it back and forth. There is still the question of where and how to build in domain logic and intelligence, and that’s where most of the interesting debates take place, but this is still a woefully small slice of the pie. Maybe this is why I love writing command line programs. Come to think of it, maybe this is also why I love writing unit tests. There’s no user interface, no data persistence, just logic. Okay, you’re right, there is still setup and teardown plumbing, but it’s not too hard to keep that stuff separate and out of the way. I also love working through the Project Euler problems. The programs feel pure. Just find the answer, and that’s it.
I recently completed an online course in machine learning from Stanford Engineering. I loved it. It covered common applications of machine learning such as reading human handwriting, recognizing objects in images, and recommending movies and music. These applications are driving major features of Gmail, Facebook, Amazon, Netflix, and Pandora, to name a few. I was surprised to find that most of the course focused on math. The programming part was not much more than an afterthought. We did programming exercises in a language called Octave, but the work could have been done in any language. These problems are solved by math, not by programming. The programming just does the math. It’s a lot like the role your calculator plays in your calculus class. You solve the problems; the calculator just does the math.
I was intrigued by the scene in the The Social Network where Zuckerberg has the idea and hacking skills to slam Facemash together, but he has to ask his buddy Eduardo Saverin, not a code slinger, for the “key ingredient”: a ranking algorithm. The problem has already been solved by mathematics.
There are countless opportunities in the world today to make a dent in the universe by applying some existing mathematical solution to a modern problem. I’m looking for one.