Math vs programming (part I)
Wow, my previous post sure stirred up some controversy (by my blog's standards at least ;-). As I write this, the comments are still pouring in. (Also see the Reddit thread, which is probably where all these new commenters come from.)
But really, what I was trying to say is quite simple:
- I am a programmer.
- I am *not* a mathematician (obviously :-).
- If given a choice, I would much rather see the code sample (which I can understand) than the formula, although in an ideal situation you'd have both.
For some reason, some people seem to take "I don't like to read mathematical formulas" to mean that I know next to nothing about math. This assumption is not necessarily true. Nowhere did I mention anything about my background, other than the fact that I am not a mathematician. (For the record, I studied economics in college.)
Anyway, whatever my background, seeing convoluted (and even not-so-convoluted) mathematical formulas tends to intimidate me (much like it intimidates *everybody else* who doesn't have a strong grasp of this stuff). Not because I am inherently unable to, but because I lack the knowledge about what most of these symbols and constructs mean, in the given context. As I am a programmer rather than a mathematician, I prefer code samples.
Some people are apparently offended by this. Take, for example, this eloquent rebuttal. "How can you forget stuff like the meaning of Σ or Π as accumulators?" Gee, let me see... maybe because I have never needed it in my job as a programmer? You learn it. You don't use it. You forget about it. (The formula, that is, not the concept.)
Let's take the vector example in the original article. Some seem to think it's ridiculous that I would prefer the code over the formula. But tell me... why in the world should I know vector notation? Or why would I want to, in the first place? I've been programming since 1985, and I have *never* needed vectors. I guess I haven't been doing any real work!
For some reason I never needed differential equations either when I was trying to debug a GUI app or write an SQL query. And all this time I thought I was an actual programmer! Silly me!
Now, I am not trying to downplay the importance of computer science, or the importance of math in computer science. There are certain areas of programming that are strongly math-related, and wouldn't exist without it. I also believe that having a decent grasp of math makes one a better programmer. 1) It's important... but not to the point where you have to be a math major in order to be a competent programmer!
Many (or even most) areas of math are completely irrelevant to my day-to-day work. While this is not true for everyone, it is true for the vast majority of programmers. So I don't like to read mathematical formulas. How does that affect my skills in designing a GUI, writing an object system, debugging a database, optimizing a query, writing unit tests with good coverage, refactoring a code base, ...?
Anyway, in my next post I'll react to some of the more reasonable replies to my post. :-)
1) And so does a decent grasp of philosophy, sociology, linguistics, art, organization skills, emotional intelligence, ...
Louis-Philippe Huberdeau said,
June 3, 2008 @ 9:34 am
Just as a note... I spend much time that has nothing to do with math. In those cases, formulas are just a waste of time. However, in the example I was referring to, vectors __were__ a fundamental concept to understand the whole point of the code as the problem was solved using a geometrical approach. I just find it really difficult from code to get that 2D view of the problem, while math functions are so closely related to graphics. It really depends on the kind of problem you are working on.
Sure, I happened to pull out a math book, or visit wikipedia, to get a refresh on notations once in a while to read an article containing formulas. There is nothing wrong with that. Once you know the basics, it's easy to move up, even if you don't remember the summation operator on top of your head.
Hans Nowak said,
June 3, 2008 @ 9:46 am
Yes, I agree that in that particular example, vectors were relevant.
Most of this post is not a reply to your article, by the way, but rather a reaction to some of the sentiments expressed in comments (here and on Reddit). I am not denying the importance of math (especially in the Collective Intelligence book), I am taking offense to the notion that math is important in EVERY area of programming ALL THE TIME, and that lack of math knowledge means that you cannot be a competent programmer. I know it was not you who said or suggested this. :-)