RWDevCon Inspiration Talk – Math Isn’t Scary by Matthijs Hollemans

Many of us have a bad experience with math from our schools – learn why math isn’t scary, and why we should all learn it as software developers! By Matthijs Hollemans.

Leave a rating/review
Save for later

Note from Ray: At our recent RWDevCon tutorial conference, in addition to hands-on tutorials, we also had a number of “inspiration talks” – non-technical talks with the goal of giving you a new idea, some battle-won advice, and leaving you excited and energized.

We recorded these talks so that you can enjoy them, even if you didn’t get to attend the conference. Here’s our second talk – Math Isn’t Scary, by Matthijs Hollemans – I hope you enjoy!


I would like to start with a show of hands. Who here understands this?

func countOccurrences(value: Int, array: [Int]) -> Int {
  var count = 0
  for element in array {
    if element == value {
  return count

let array = [100, 28, 999, 43, 62, 999, 77, 35, 999]
let value = 999
let count = countOccurrences(value, array)

println("\(value) appears \(count) times")

I was hoping for more hands :]

OK, this is a piece of source code, right? There’s a for loop, an if statement; it’s a pretty basic algorithm for counting how often something appears in an array. This should be a piece of cake for most of you.

Now, raise your hands if you understand this… don’t be shy!


As you probably guessed, this is a piece of math.

In case you did not recognize this, this is the explicit formula for the prime counting function. I have to admit that I don’t completely understand it myself, I just Googled for “difficult math equation” and this is what came up.

I saw some people raise their hands, so if you’re really curious, if you really want to know what this means, I’m sure they’ll be happy to explain it to you afterwards.

I get the sense that what I’m showing in this slide is a lot more intimidating to you guys than the source code. I’m sure some people here went like, “Ugh, math.”

Math has a pretty bad reputation, not just among normal people but also among us software developers.

Let’s Turn That Frown Upside Down


The point I want to make in this talk is:

  • Math is actually pretty cool
  • It can even be a lot of fun
  • It’s not really that different from software development
  • And most importantly, I want to convince everyone here that they are already a lot better at math than they may think.

Let’s get started!

Why Math is Reviled

Let’s start with why math is so reviled.

  • If you don’t like math at all…
  • If the thought of doing math gives you hives…
  • If you have nightmares of doing multiplication tables or trigonometry…

…then you, poor listener, may suffer from what’s known as mathophobia, or math anxiety!

Where did you pick up this nasty-sounding affliction? Well, believe it or not, it’s been claimed that math anxiety is a disease caused by school.

Think about that for a second. The reason why math gives you the heebie-jeebies is the way it is taught in the traditional classroom. If you’re terrified of doing math, then you have this. It’s a very real thing, and it affects almost every one of us.

Except, of course, for that lucky handful of people who actually enjoy doing math. Even for them, it’s been suggested that they only managed to succeed in learning mathematics was despite what they were taught in school.

Math and Piano Lessons

I have this book, it’s called How to Play the Piano Despite Years of Lessons:


I only started to play the piano in my late twenties, because for years I had this limiting belief that if you wanted to become good at the piano, it was impossible unless you started to play the piano when you were five years old.

It turns out that a lot of the kids who take piano lessons actually end up hating the piano just about as much as they hate math, and for pretty much the same reasons, too.

Now, for those of you who did not take piano lessons, the way the piano is usually taught is pretty similar to the way math is taught. You have to memorize a lot of facts, and you have to do practice drills over and over and over and over. There’s not much room for creativity, or for having fun.

I mean, it’s got playing the piano, right? You have to be able to play, you have to be able to enjoy it, you have to be able to mess around with the piano.

Well, try telling that to your drill instructor!

Mechanical Process vs True Understanding

There’s no deeper understanding of music with those traditional piano lessons. It’s just this mechanical process for playing the right notes, and the playing the right time.

The same thing is true for high school mathematics. You don’t really learn the deeper understanding of what mathematics is all about in school; all you learn is this mechanical process for doing calculations. I’ve got a computer who can do calculations much better than I can.

There’s no reason why an adult, or even a child, would have to do long division by hand. That’s something that computers are good at. School doesn’t tell you why you want to do long division in the first place.

Now, the full story goes something like this, and I quote:

“As a kid, I heard some tunes on the radio, and I liked to pick them out on my piano. Then my parents heard this and they thought I was super-talented, and they made me take piano lessons, but my piano teacher was this horrible witch, and I dreaded going. I couldn’t stand the thought of playing the piano for years.”

How sad is that? Taking music lessons, taking piano lessons, actually ruins music for a lot of kids. How familiar does that sound to math?

I really wish that this book existed: How to Play Math Despite Years of Lessons.


Play is also the right verb here, because doing math should really be like playing a game or solving a puzzle.

If you feel like you were no good at math, it’s not really your fault. You’re not defective. You just weren’t taught properly. Math anxiety is the result of bad teaching. That’s all there is to it.

Are we all irreparably damaged by our failed educations? Well, no, I don’t think so. You’ve suffered some minor setbacks, but that’s no reason to give up on math. Math is too beautiful for that.