I suck at math and learning Python rubbed it in my face
Tags: beginners, codenewbie
Published: 2020-03-10 18:22:51

I've never been good at the exact sciences. I would have the highest grades in Portuguese and English, good grades in History, Geography, and Biology, and the worst grades in Physics, Chemistry, and Math.

But my school divided Math in a lot of different disciplines, and I'll do my best to translate each one of them (I have to do justice to my high grades in English, after all). I had classes of:

- Pure Math
- Statistics
- Financial Math
- Mathematical Logic
- Geometry
- Geometric Drawing

Statistics, Financial, Logic? Straight A's. Geometric Drawing was one of my favorite disciplines, I would love anything that allowed me to draw in class without getting in trouble.  I began to understand Geometry once I realized how to "see" the formulas through the shapes, and the Geometric Drawing classes helped me through it.

But Pure Math... It never got into my head. I can make basic math operations quickly in my head, I learned how to use the rule of three and memorized Bhaskara, but that's all.

![An aminated GIF of Kimmy from "Unbreakable Kimmy Schmidt" cheerfully saying "Kimmy is bad at Math!"](https://dev-to-uploads.s3.amazonaws.com/i/uga2xgkig2lkn2m9ikfb.gif)

In Brazil, we like to say we are "exact sciences people" or "human sciences people". It sounds a lot better in Portuguese, I promise. The thing with the self-proclaimed "human sciences people" is that their brains can't do a simple operation without a calculator, like splitting a restaurant bill. So I have always referred to myself as a "human sciences person with a touch of exact sciences".

If you are bad at math and wanna be a programmer, I'm sure you have googled "do I need to be good at math to be a programmer" at least once. The results will tell you "Nah, you just have to be good in logic". Yay, check. Let's do it, let's learn how to code.

If you are poor like me, you then go and find a nice free online course. You hit that play button, the teacher starts talking and you're there, listening carefully and taking notes. I'm getting it! Yay again!

Exercise #1: write a program that adds two numbers. Okay, that's easy. x + y = n. Done.

Exercise #2: write a program that checks if a number is positive or negative. Well, negative numbers are smaller than 0, right? Okay, got it.

Exercise #3: write a program that calculates the body mass index. Is it your weight in kilos divided by your height times your height, right? Let's check Google to make sure of the formula. Okay, it works. Yay, coding is fun!

Exercise #4: write a program that receives n and prints n! (factorial). Wait, what?
![An animated GIF of an confused Winona Ryder while trignometry formulas are passing in front of her](https://dev-to-uploads.s3.amazonaws.com/i/w08fnu27wsn4dc92jr5q.gif) <figcaption>(At least I know it's trigonometry in the GIF)</figcaption>

You know when you're in school, the teacher speaks what sounds like gibberish to your ears, the whiteboard is full of numbers and symbols, and you can't help but think "to hell with Math, I'm never going to use that in real life"?

Well, when you're 28 and all your dreams have been shattered for a while now, you'll decide you wanna learn something new. And BAM! That's the moment when you will regret all the Math classes you lost because you were too busy drawing in your notebook.

![An animated GIF of a toy character from "Action League Now!" saying "Uh, I was told there's be no math" while he looks both ways and leaves the frame](https://dev-to-uploads.s3.amazonaws.com/i/2xnv7jjylhn9fpki2i4y.gif)

So far, my experience is that you don't *have to* know math in order to code. But your learning path will probably be a lot smoother if you don't have to stop everything to research what the hell is this *factorial thing* and how the hell you apply that so you can finally go back to what you were learning in the first place.

I would love to have a fix for that, but this is a place for self-laughing at my own misery, bad quality GIFs and sharing my experiences while I learn how to code. I don't believe in karma, but maybe it will help me if I give a call to all of my Math teachers and let them know I'm sorry?

![A xkcd comic strip. There are three people in it, a woman, a guy, and Miss Lenhart. The woman is yelling at her: "Hey, Miss Lenhart! I forgot everything about algebra the moment I graduated, and in 20 years no one has needed me to selve anything for X! I told you I'd never use it! In your face!". Below we can see the caption that says "It's weird how proud people are of not learning math when the same arguments apply to learning to play music, cook or speak a foreign language."](https://dev-to-uploads.s3.amazonaws.com/i/x9muqvqddxj8a0be5iic.png)