DEV Community

Cover image for Do I need to be Good at Math to be a Software Developer?
Matt Eland for Tech Elevator

Posted on • Originally published at techelevator.com

Do I need to be Good at Math to be a Software Developer?

Editorial note: This article was originally published to Tech Elevator’s blog on October 31st, 2022

As a software engineering instructor at Tech Elevator, one question I hear most often from new and prospective students is this:

"Do I need to be good at math in order to be a software developer?"

Thankfully the answer is a resounding No.

What I've found in my time teaching is that every student has different strengths and weaknesses and a unique way of thinking. Some students are naturally inclined towards math, while others dread it (as I suspect you might be if you're reading this article). And yet, they make fantastic software developers.

Personally, I have found aspects of math that I love and aspects of math that make me panic and shut down. Regardless of my weaknesses, I enjoyed a very successful career as a software engineer.

Let's talk about what you actually need to know and the skills you do need to be a successful programmer.

Why You Don't Need to be Good at Math to be a Programmer

Many people assume that because many lines of code resemble algebra at a glance that you need to be good at math in order to program.

This is very much not the case. Mathematics is all about following formulas and theorems to calculate values by simplifying and reducing values.

Programming, on the other hand, is about setting up a series of simple instructions for a computer to follow and carry out to achieve the task you're trying to accomplish.

For example, a program might follow this series of instructions:

  • Display a greeting message to the user.
  • Prompt the user to type in their age in years.
  • Wait for the user to type in their age in years, then store the result.
  • Multiply the number the user entered by 365 and store the result.
  • Display a message to the user informing them that they're at least that many days old.

While there is math here (multiplying a number by the number of days in a year), as a programmer you don't even need to be able to do that multiplication yourself; you just need to tell the computer what task to complete.

Much of software development follows this flow: figure out a path for the program to take to accomplish a specific task. This path may involve mathematical operations such as calculating totals, but it doesn't have to.

Logical Thinking in Software Development

Instead of asking yourself if you're good at math, ask yourself the following questions:

  • Am I able to break down large tasks into a series of small steps?
  • Do I like improving things?
  • Do I enjoy using creative thinking to solve problems?
  • Do I enjoy making little changes that add up over time to build larger things?
  • Can I consider many different possibilities?
  • Do I like to learn new things?

Programming is all about telling computers to calculate and store values, making decisions based on what something currently is and interacting with the user, files, databases and other systems.
Let's take a look at a small piece of code that gets a temperature from the user and displays a message:

// Display a message to the user
Console.WriteLine("Please enter a temperature in degrees Fahrenheit");

// Store a value from the user
string userInput = Console.ReadLine();

// Convert from text to a number
double temperature = Convert.ToDouble(userInput);

// Display a message to the user indicating the temperature range
if (temperature >= 85)
{
   // 85 degrees or more
   Console.WriteLine("It's pretty hot today!");
} else if (temperature <= 50) {
   // 50 degrees or less 
   Console.WriteLine("It's cold today!");
} else {
   // 51 to 84 degrees
   Console.WriteLine("It's a nice day!");
}
Enter fullscreen mode Exit fullscreen mode

This is similar to the material we cover at the beginning of our curriculum at Tech Elevator, so it's perfectly fine if you can't read this code yet. I included this to illustrate what typical code looks like and how different it is from math.

This C# code lets the user type in a number and converts that number from text (a string) to a numeric value (a double). Next, we use conditional logic to display a message to the user based on the temperature. The user will then see a message indicating if it's hot, cold, or nice weather.

As you can see, there's very little mathematical notation here. Instead, we see programming syntax and commands to check if numbers are greater than or less than a value and display those values to the user.

This is what 99% of programming is about: controlling program flow through logic and guiding the program to accomplish a specific task through a series of instructions.

Math That Is Helpful for Software Development

So, what aspects of mathematics are helpful for software developers?

While we don't do traditional mathematics in software development, it is often helpful to understand mathematical principles.
For example, if you don't understand the concepts of addition, subtraction, division (including remainders), multiplication and division, it's going to be difficult to write code that takes advantage of those concepts.

As developers, we occasionally need to work with absolute values (removing a negative sign if one is present), averaging, getting the largest or smallest value and a handful of other mathematical operations.

If you are interested in specialized types of development, there may be other aspects of mathematics that will help you. For example, in game development I frequently found myself challenged by being weak in trigonometry. However, recent years have actually made it easier to do game development tasks without requiring a heavy understanding of trigonometry.

Finally, as programmers, we do sometimes talk about something called "Big O notation," which is a mathematical notation illustrating how much slower a program gets the more you add items to a list of data. This topic is beyond the scope of this article, but at its core Big O is centered on understanding how sharply the amount of time will increase the more you add data.

Mathematical knowledge will help you with software development and may show you possibilities that you wouldn't have considered without it. However, the majority of programming is logical thinking, not pure mathematics.

Ultimately, only you know what you are capable of and how you best solve problems. If you've never tried programming before, you should try following a few tutorials to see how you like it.

One of my greatest joys as an instructor is seeing students who didn't think they could be developers get jobs, thrive and succeed in those jobs. At Tech Elevator we are very skilled and passionate about helping students discover what they can and can't do. Don't let fear of mathematics stand in your way from becoming part of something amazing and enjoying a profoundly rewarding career in tech.

Ready to Kickstart Your Career Transformation?

If you're ready to take the next step and think a career as a software developer is the path for you, then take our Aptitude Test to get started.

If you still have unanswered questions, schedule some time to talk with our admissions team. We're happy to help explore your future career options in tech.

Top comments (5)

Collapse
 
frankfont profile image
Frank Font

Clearly there are plenty of niches in high level software development where having good math skills will not make much of a difference.

But I find it helps even when coding in javascript.

There are some thorny problems sometimes where knowing a bit of math, even if just algebra and exponentiation, helps chart a course that leads to a useful program instead of one that bogs down writing too much data or iterating itself to death.

Collapse
 
aarone4 profile image
Aaron Reese

Although you don't need maths to be a general developer, many of the skills and personality traits of a mathematician help. The ability to reason a problem into a series of smaller problems, keep a mental track of multiple nebulous concepts, keep a mental track of where you are in a multi-level iteration, ability to consider edge cases that don't exist in the sample data and that instinctive suspicion that the end answer is off and where the error may be located.
All that said there are branches of development where at least understanding mathematical concepts will be useful.
Mean/median/modal average
Least squares regression
Standard deviations and confidence levels
Integration and differentiation

You also need more maths than anticipated when building front end as a lot of UX design is about white space and ratios.

Collapse
 
germainkausa profile image
Germain Kausa

Obviously a real developer must be good at mathematics to better solve the problems encountered in the field

Collapse
 
integerman profile image
Matt Eland

Can you illustrate more with a few detailed examples from your career in web application development?

Collapse
 
aarone4 profile image
Aaron Reese

Not obviously. I expect for most languages there will be a library or package that has abstracted the complicated calculations. You might still need to know the concept even if you don't need to do the calculations. E.g. Excel has a function to calculate NPV (net present value) which is tedious and boring but you still need to know what NPV is and when it is relevant.