Stop Saying You Need To Know Math To Program


Imagine that you’re going to attend your first math class. You’ve asked everyone you trust about math, and they’ve told you that you need to be good at English before entering. And you’ve studied everything you can about English. You’re prepared; you can take this “math” thing everyone was talking about. Confident about your abilities, you look up the black board, and see this:

Solve:
1 + 1 = ?

Well, uh, yes, you know what “solve” means, but what does “+” or “=” stand for? And why are there so many numbers?

It’s only until years later that you realize the only reason everyone recommended learning English before getting into this profession because in the real world, you’re often translating word problems into math equations. This leaves you disgruntled. Sure, knowing English is useful if you already know math, but it didn’t help in the slightest when you’re learning it for the first time. It feels like everyone lied to you, despite their best intentions.

The above example might sound rather absurd, but it’s exactly how I felt when I first learned programming. Everyone insisted that I improve my math skills because programming has strong similarities with math. Nothing could be farther from the truth. While it’s common for a programmer to translate math equations to code, knowing math does not help you learn coding any faster. Much like how English and math are two very different subjects, so to is math and programming.

So what is programming? It’s about writing a set of instructions in a language a computer understands. Take the following example:

Console.WriteLine("This is the first line.");
Console.WriteLine("This line of code prints the second line.");
Console.WriteLine("Let's print more lines!");

This C# code above will print 3 lines on the console. Can you guess what those lines are? As a quick hint, the part, “Console.WriteLine” basically tells the computer that it should print the information between the two parenthesis in the console, before making a new line.

If you guessed the following answer:

This is the first line.
This line of code prints the second line.
Let's print more lines!

Congratulations, you’re already on your first step in learning programming. No math needed!

The only difficult part of this job is that the language a computer understands — store value here, recall said value, do this if that, etc. — is very limiting, and requires the programmer’s smarts and attention to detail to cover language’s the limitation. Coding requires you to know what conditionas are (true vs false), and when to use loops (do this 10 times). Programming also requires parsing out the state of stored variables after running through a set of instructions. In short, programming is a whole lot of logic, a subject most math courses don’t teach. Don’t worry about solving math problems: let the computer do that for you.

So I ask from other programmers this: stop saying to those who doesn’t know programming yet and wants to learn coding that they need to know math. This gives the impression that programming is about solving 342 x 853 in their head. It gives the impression that they’ll need to combine 3 tangentally-related equations to solve a single word problem, when in the programming world, it’s actually better to leave those equations separated. Worst of all, it gives the impression that good mathematicians are automatically good programmers. None of these are true, and it all makes it unnecessarily harder for everyone to learn coding. Instead, say what is actually accurate: know a little bit of logic before learning programming.

Categories: Random

Add a Comment

Your email address will not be published.