# How important are math skills for software development?

### Ben Halpern ・1 min read

I'm sure there are different opinions on this, so let's hear them!

Classic DEV Post from Jun 22

I'm sure there are different opinions on this, so let's hear them!

Classic DEV Post from Jun 22

I would say, they never hurt and they can provide valuable insights into problems that you might otherwise miss out on. But how

necessarythey are probably depends on what you are doing.For web work, you can get away with less, because you are more focused on design, UX, networking, performance, event loops and data wrangling, which are all hard in different ways themselves, but are less directly tied to math.

For more algorithmic work, solving a more complex problem using graph theory, search algorithms, trees, etc., it is more important. It can help with the basic understanding of the methods you are applying and which algorithms may work best in a given scenario.

For data science, it’s not strictly necessary, but it really helps accelerate your learning if you can grasp and build on the mathematical and statistical concepts and not just memorize what libraries to use and what methods to call. It also helps you evaluate your results rather than blindly accepting them because the “algorithm” says so. This is getting more and more ethically important as more and more decisions are being made with heavy AI and machine learning and big data driven insights.

For lower level systems programming, at least a little number theory (binary, hex, and decimal representations of things and how to mentally convert back and forth) is

critical. Luckily, while number theory is intimidating, it’s not super duper complicated at the end of the day if you approach learning it slowly and with the right examples. I’ve got a couple articles about that.Lastly, if the domain you are in is math heavy, like software for physics, engineering, chemistry, biology, genetics, statistics, probability, etc., then you’ll probably want to have a bit of a grasp on that particular domain.

That’s all I can think of. My philosophy is that math always helps make you a better developer, but treat it like anything else we have to learn. Learn it as you need it or as your interest strikes, and don’t feel like an imposter if you don’t know everything right now. Just put it on your list to learn and watch some numberphile videos on YouTube in your downtime. 😁

Math is not necessary if you are a webdeveloper for example. But I absolutely disagree for datascience: without having a solid statistical and epistemological background in probability, I would forbid to hire you for that kind of job ;)

I kind of disagree. It depends on what you’re building as a web developer.

For example, you need math if you’re building physics engines for the web, or other tools like data visualization. There are of course many more areas than the two I mentioned.

But yes, with simple math skills most of us will do just fine if we’re not building math heavy things.

That’s fair. Yeah, I didn’t really mention game programming either. Good point!

Completely agreed. There are too many ways for data science to go wrong if you can’t think about how it works.

As a "webdeveloper" I have used math principles uncountable times. Maybe you are talking about wordpress users. I honestly think that anything that have the word developer in it, it is easier if you have a good math basis.

What type of scenario would typical web development work require math skills beyond the basics (i.e. what might be taught in a high school / secondary school)?

Anything that would require knowing about set/group theory, stats but then it depends on the project.

I believe that math comprehension is important, but math computation is not, which I realize is a very counter-intuitive statement. This famous Ted talk discusses the difference.

Absolutely agree.

It’s completely based on the industry.

I would say all programmers should have a decent math basis. Obviously, you need to understand algebra. I would say trig is not required but very nice if you ever need to handle ratios and angles. Most development roles won’t require advanced math, but will require practical math (especially fractions). You could definitely work at any “good” company (google lets say) without knowing calc.

For graphical development, trig and calculus are pretty important. There’s a lot of relational math and and sometimes you need to understand things like the golden ratio.

For game dev you need calc and linear algebra at a minimum. When I was writing game engines, I ended up needing to teach myself complex number theory so I could understand things like quaternions. Linear algebra is a constant part of daily life.

Machine learning engineers need strong calc and linear algebra foundation too. I’m working on a long post about implementing neural networks right now, and it involved hand solving a stochastic gradient based back propagation. That’s a lot of partial derivatives and matrix multiplications! Understanding latex can be pretty important depending on your role.

Distributed systems developers need some calc and a lot of number theory (discrete math). Optimization problems require some strong math theory and feeling comfortable with mathematical proofs is critical (at least where I’ve worked).

Developers working in security can get away with no math but sometimes need incredibly complex math. The closer you get towards cryptography the more math you’ll need. I think at one end of the spectrum, net sec actually has the highest math requirements of any programming field.

This is a good answer. I didn't think about game and graphical development, or cryptography.

Depends on the area of specialization. When I was studying wen development I never really used math, I didn't expect to use it so I spent my time focusing more on writing better software. Now that I'm studying computer graphics, it's all math. I only use software as a tool to express the math formulas necessary for graphics then optimize for performance.

In my case, I've always had problems with Maths, I went to multiple tutors and passed my exams but never with flying colors.

Today I understand that I use math in a level I don't think I really comprehend, but I have never had problems with coding and being bad at Maths. What I know is that I will need to study harder the day I decide to try IA, in which case I consider them very important.

I couldn't recommend you enough to read A mind for Numbers by Barbara Oakley which has a lot of insightful advices to learn science subjects effectively. I use many of those tips to swift through my classes in my engineering diploma.

Hey! I started just yesterday (reading foreword and preface). Do you think it is a book that is suitable also for people, let's say me, almost done studying at uni but that is still willing to learn more math/problem-solving in general after work?

I'm not Jim, but I'll say a big yes. That book (and her course Learning how to Learn) have been immensely useful for my general learning skills (I finished uni almost 20 years ago now)

Of course! One of the technique presented what a trick used by Salvador Dali. The other also says it a couple of time that even if it is science oriented, you can use these tips to any area where you want to learn something.

Great! Thanks guys! Looking forward to go further with it :)

Thanks! I'll give it a read.

Tell me if you liked it. Good read

same here!

I hope you will have a great read. Tell me how you liked it.

I think the ability to problem solve is the correlation between math skills and programming. The idea that we need to excel at math to excel in programming is what scares some people from going that route. It’s hard but even if math is not your strongest subject (it’s not mine) programming can still be learned. The types of programming and depth could vary based on how adept you are at math skills but I would say high math skills is not a requirement.

Harvard’s CS50 program hosts a puzzle day globally to help introduce the concept of problem solving to the world to help promote problem solving skills is what coding is all about.

medium.com/@cs50/this-was-cs50x-pu...

Depends what branch of maths you're talking about.

Arithmetic, not so much no.

Category theory? Very interesting and definitely related to abstraction

I always enjoyed factoring equations at school and that is very closely related to the process of refactoring.

I've only realized how bad I was at math when I went to college for a CS degree. After bailing calculus and statistics for a couple times, I eventually abandoned the course. But I never had any problems with practical programming / web dev. I'm sure there are important applications and much of what we use nowadays in our stack is improved with deep maths, but for most of us this won't really make any difference. Today I believe these disciplines are gatekeepers in computer science education.

Maths-fear kept me away from studying any development career. I turned directly to humanity-based careers. Which I liked a lot, anyway. My brain works better with words rather than numbers.

I guess like other colleagues here, it depends a lot on what kind of work you want to do. The development of certain very specialized software may require high mathematical skills. I also think that anything related to videogames nowadays requires a good knowledge of maths and physics...

I am a newbie, coming back from a letter path, who really really expects that Maths skills aren't really important for web application development.

I think this is a "this depends" one what type of software development you are doing. I know for most of the development I am doing these days, maths aren't overly important or even required.

But I also have friends who are working on more science or fin tech systems and these do need a bit more of a maths foundation. I think it's less being able to do it in your head and more just being able to work out a basic formula and understand what it is supposed to do.

Math skill and Software development are related, a big part of software development is our ability to understand logic and think in different ways all things that are important foundations in Maths.

If you're not doing graphics calculations by manually (as in, not abstracted away in a framework) or doing anything with big data or machine learning (which has calculus, but again, might be buried by a framework) then algebra I should be enough.

Will you ever need to simplify expressions or FOIL? No. But will you ever need to work through a coding problem with the same manner of thinking as you work through an algebra problem? Yes.

I mean, you have to know minimal math

I used to work in a real-time trading software applications development firm and at that time it was pretty important. Then after few years I worked for a digital media firm so didn't needed to have any math skills;)

Honestly I can barely do basic stuff like divide decimals. I used to be top of my math class but I’ve used such little math since I’ve been out that I lost off the knowledge. I suppose it depends on what you’re doing though.

Depends on the job.

It depends.

I think its important just in case...

I often find myself wishing I had

just a bit moreknowledge of math.I'm good enough with it to know that there

could besolutions to some of the problems that I'm facing, but not quite good enough to work out exactly what those solutions actuallyare.Of course, this has been continuously happening even as I've kept picking up more bits and pieces as I go along in life, so it will probably keep happening forever. Having a solid basis in mathematics is nice, but learning how to pick up more and when it would be helpful is the skill that's served me better.

Also, knowing when to not use your clever math-hax and just use a more obvious but less performant solution. Sometimes it's worth the performance gain, and sometimes it just makes your code untouchable.

It really depends on what you're working on. For instance, as someone who primarily works in devops I don't find myself frequently using math. I still believe most people should have a fairly decent grasp on advanced algebra as computer science uses quite a few concepts from there.

If you're in data science, you should probably have multivariable calculus and linear algebra / nonlinear algebra under your belt. If you're working in graphics you should

definitelyhave at least a good grasp linear algebra.It really depends, if you can do your job well without it though and are happy then no big deal.

For me, knowing that I could do math with code (Ruby, Javascript, etc) help the basic concepts click for me. But, now that I am deeper in, I'm not sure how relevant it is when it comes to object-oriented programming.

I think they are very important if you're going to take your career far. I think most people are confused when they hear "math skills." It's true that few of us are cranking out complex analysis in our day jobs, or solving programming challenges by mathematically describing in them on a chalkboard. But I do believe that the more one has done in math, the more one is capable of in computer science.

The difference is between a carpenter who can build a house, and a structural engineer who can build a sky scraper. A foundation of math will allow you to take on vast problems without fear, and it allows you to think further and more clearly about software systems.

Basic math skills are enough in most cases, you don't need to know crazy stuff like vector calculus etc.

But then again, the domain you work on determines whether you need to know complex math, physics or whatever you need to create a high quality business solution

It depends on the project. Sometimes, you may encounter an isolated very hard mathematical problem. You may get some help from a mathematician or search for a formula in google then use it blindly Yay it works then move on. If you're interested enough you may invest some time trying to understand it. Sometimes, your application is totally based on mathematical or physic problems ( Complex Games ) in that case you really need to boost your knowledge about math.

For instance, Once I was struggling to find a solution how I can find the nearest city ( from my database ) in a defined distance using longitude and latitude. First, I tried using some external service to fetch all nearest cities and filter only what I have in my database but that wasn't very accurate and practical. My problem instantaneously solved once I knew that there's something called "The Great Circle Distance Formula". Here is an article I just found now explaining exactly what've faced Fast nearest-location finder for SQL (MySQL, PostgreSQL, SQL Server), it's very interesting.

Math skills are not directly useful: in most cases you won't use much Math besides arithmetic. Still, if you're good at algebra it will be easier to start learning programming.

When Math skills become important you'll discover that normal Math and computer Math are rather different, the notations you learned in school cannot be used directly, solutions and algorithms you learned in school will work poorly and you'll have to find others (think about "numerical stability" issues, or about all the floating point pain), and most important of all you'll discover that most of the Math you learned in school was so generic and abstract that it is a pain to apply it when programming and you'll need to buy quite a lot of books to get a handle of it.

Notations from algebra will pass over easily but when working with matrices the issues are getting complicated: if you think solving a system of equations is easy you'll have to think again when trying to write programs to do it for you, that is unless you use libraries written by others. Calculus does not translate easily. Trigonometry translates well, at least the basic parts but the use is limited, mostly for game graphics.

Most jobs won't require much Math besides arithmetic, powers, square roots, averages, rounding and other rather basic knowledge. The very well paid jobs will require algebra, linear algebra, calculus, probabilities, trigonometry etc.

If you're doing anything with graphics, you will need the math you learned in school, thinking that you'd never need that in real life. You'll need affine transforms (e.g. when rotating / flipping / scaling / positioning things), and cos/sin when drawing arcs or lines at an angle and/or need to know where a point is.

I think every developer should understand basic math. For example, front-end developers should know the calculation of the size between two elements.

This is basic math. My cousin works for the defense industry company. He can't say he doesn't need a good math skill.

His responsibilities are the calculation of matrices, trigonometrical calculations, boolean algebra, digital electronic and more much.

Even if you're a front-end developer, you still need to understand basic math.

Let's say, you need to calculate something like invoice total. You need to understand math.

I can calculate these kinds of basic math problems. But I want to learn more than that.

Is there anyone to show some good resources for me? :)

Logic is a subfield of maths that we are always using to solve problems in programming, so at least we should learn mathematical logic. More than that depends of what are you programming, data science? Then you need statistics, video games? You will need algebra, graphics? Geometry.

They are important as another tool in your arsenal for problem fixing. Even simple UI/UX problems require basic arithmetics and algebra, but with a middle school math level you can do it.

More important, is Logic, a branch of Math that some times is oversight in education. Understanding boolean operations is a must. Being able to formulate logical statements will crack almost any problem. Luckily, it is something simple to teach and to learn.

I believe that algebra and arithmetics develop your step-by-step logic to solve problems. But it's not the only method to develop this kind of skill.

No matter how you train yourself to understand the problems to then process it into parts to solve them.

I’m not a mathematician, I’m a maths enthusiast. So I like it when I can use maths, and wildly delighted when it's also maths I can understand. I work in visual effects so that will take all the maths you care to throw at it. But I also write a lot of unglamorous tools that don't require any math.

But there's always the related element of problem solving. I think maths is certainly good practice in that regard. I like the challenge and the rigor. It's like a gym membership for my brain.

I don't feel like I've needed math skills for programming — certainly not any advanced math skills. But, you need a fundamental understanding of logic for programming and for math. Learning higher math skills may help with that, maybe? I don't know, I was always good at math until I took Calculus 2 in college. Then I couldn't keep up any more. I think that's why I dropped out.

I never studied algorithms either, but I think those become helpful when you find a performance problem that you need to optimize. For most of what I work on though, I don't need to know anything about them.

Of course, if you are in data engineering I'm guessing it all becomes really important.

None unless you're doing anything related to data science or deep tech related technology.

I will be the first to bang my head on the table and ignore whatever math problem I'm given as garbage and blast it with a nuclear bomb.

I'd say it depends on the nature of your work/position. Someone in the research & development area may need to understand/develop algorithms that involve Calculus and Differential Equations. The level of math for R&D may be different for someone who is a full stack developer.

I will add that a willingness to learn is more important than math skills.

As a frontend developer for 14 years now, I can't really say that I had to rely on my limited math skills as often as I thought I would!

Might've been useful for some of the animations I wanted to implement throughout my career, but aside from that, I did just fine. I think things would be different, had I been more involved with browser games or with data visualization.

I am doing a javascript data science course on Udemy (Stephen Grider)...math seems pretty important there LOL. But, my day to day coding in react or python doesn't involve complex math. In fact Brad Traversy states multiple times he is horrible at math, and he's a well-known and excellent web developer.

I feel like it depends a lot on what you're making. For me, doing web dev, it's pretty rare to be knee-deep in heavy math.

I think for most devs, math skills are neither necessary nor sufficient. However, I do think they are universally

helpfulskills, the degree of helpfulness depends on the industry/role.They're not

Software development is applied math. Carefully developing a logical construct that behaves in a certain way = building software = building mathematical ideas.

Agree. One strange thing I've seem is that some people in dev applies math concepts like, for instance, topology in systems architecture and set theory in SQL queries, and do not know that they are using them...

Very

ahemDo you mean "Arithmetic"?Depends on the area of interest. Mostly algebra and basic math skills are enough for a long way.

Basic maths - animation, Dynamic CSS calc

Algebra and probability - basic machine learning stuff