# Math - What is it good for?

[*The following article is written by Guerilla Tea CTO Alex Zeitler and was originally published on the studio's website*.]

When I was in school I hated math. Everything beyond basic algebra and geometry was just painfully boring and stupid. I never saw the value of learning meaningless formulas out of context just because some genius decided to put them in the curriculum.

At the same time, I couldn’t just accept things as a given without understanding what they actually meant. “Why do I need to learn how to calculate the zero of a function? What the hell even *is* a function?!” Turns out I’m not the only one with this opinion. The beautifully written “A Mathematician’s Lament” by Paul Lockhart sums up pretty much everything that is wrong with the way math is taught today. If you’re short on time there is also a TL/DR version at Business Insider, but I really recommend you read the whole thing (apparently there’s also a whole book that was derived from the essay but I haven’t had a chance to look at it yet).

Essentially our education system has found the perfect point of balance to make math as boring and meaningless as humanly possible. Neither do we teach it as the beautiful and playful art form that Lockhart describes, nor do we show any actual uses for the concepts we teach or even worse, simply throw formulas and equations at the pupils without giving any more explanation. Admittedly, showing practical uses is rather hard when you’re dealing with a bunch of kids that have no idea where they want to go in life but that doesn’t make the argument less valid. Ultimately, what our current math education results in is a large portion of the population ingrained with a fundamental hatred for math.

This is rather unfortunate since at the moment we’re lacking good programmers and to be a good programmer you need to be good at math, or at least that’s still the common perception. And it makes sense. After all, programming has been invented by mathematicians to solve difficult mathematical problems. All the basic concepts of computer science are fundamentally derived from math. Leibnitz invented the binary number system that all modern computers are based on.

Ultimately, what our current math education results in is a large portion of the population ingrained with a fundamental hatred for math.

Ada Lovelace, considered to be the world’s first programmer was a mathematician that used algorithms to compute the Bernoulli numbers. Later, Turing used a computer to break the German’s enigma code purely based on mathematical principles. Hell, even if you try to get a degree in Computer Science these days you’re basically signing up for a math degree with a few programming courses on the side.

And that’s exactly where the problem with this perception lies. Computer Science is *NOT* programming! (Which incidentally is also the reason why I’m highly sceptical about people with CS degrees that apply for programming positions. A large portion of them can’t code their way out of a paper bag because that’s not what they’ve been taught).

The truth is, while all the things computers do are grounded in mathematics, a normal programmer will hardly ever need to use, let alone understand this type of low level math to be successful. Mind you, I’m not saying that CS is not useful – quite the contrary. We’d still be in the computing Stone Age if it wasn’t for great computer scientists like Knuth or Dijkstra. It has just got very little to do with modern day software development which some argue is actually a lot closer related to language than to math.

Unfortunately, games programming is one of the relatively few areas in software development that still requires programmers to understand and implement quite a lot of mathematical concepts. Graph theory for scene graphs, Euclidean Vectors for virtually everything, geometry, physics calculations, rasterisation, interpolation and the list just goes on and on and on. I actually wish someone had told me about all the cool applications of those boring mathematical concepts 20 years ago when I was still in school. Differential Calculus becomes so much more fun when you’re using it to create explosions!

So do you need to be good at math to become a programmer? In my opinion you don’t.

But not all is lost. Thankfully, math is a lot easier to learn if you can already code. One of the beautiful side effects of programming is that it not only teaches you a way of thinking that makes math a lot less abstract (I had a true “Eureka” moment when I realised that the summation symbol was basically mathematical shorthand for a while loop), it gives you a goal to strive towards. You no longer learn some abstract functions for the sake of learning them, you do it because it will allow you to understand how to calculate a missile trajectory or make explosions or ocean waves. And to close the loop to Lockhart’s essay, it works the other way around as well. You suddenly have a set of tools that you can play around with and explore to create so many other weird and wonderful things that you can use in your games.

So do you need to be good at math to become a programmer? In my opinion you don’t. Very few areas of general software development require a lot of math and as Jeff Atwood points out: if you’re in those situations, you’ll know it. Even if you want to become a games programmer, you don’t *need* to be good at math at the start.

I hardly care about math grades when I’m hiring people for the reasons stated above. I do however expect programmers to be able to learn whatever they need when they need it. That’s not to say that being good at the type of math you’ll be using won’t help. I sure wish I had paid more attention at school so I wouldn’t have to relearn everything now. But if you’re looking to get into the game industry but are worried because you couldn’t grok high school algebra, don’t be (just yet). After all, if you want to be a good coder, what you really need is to be smart and get things done!

*Image credit: www.sxc.hu*