DEV Community

Luke Garrigan
Luke Garrigan

Posted on

Do you actually use maths as a developer?

This has always intrigued me as I see a tonne of posts saying that learning maths helps you become a better programmer.

I bloody love a bit of maths, I frequently go through my old notes and look up more and more complex problems to try widen the arsenal. But, to be honest, as a developer day-to-day I very rarely require any form of higher level mathematics to carry out my job. Every now and then I do a little game dev and that requires a reasonable amount: angles etc.

I’m curious to hear what you do and when you use maths as a developer, let me know in the comments.

Top comments (34)

Collapse
 
davidjao profile image
davidjao

My job is to develop cryptographic primitives. I could not do this job without advanced mathematics.

On a slight tangent, every developer needs to know the basics of cryptography and security. It has nothing to do with whether or not you are writing cryptography software. (You shouldn't; you should use existing libraries.) But no matter what kind of software you are writing, other people will be attacking it. You need to know the principles of defense.

Collapse
 
lukegarrigan profile image
Luke Garrigan

Sounds like a brilliant job! But yeah, I can agree with that, it’s also something you just kind of pick up on the job, but it is taught in computer science degrees a little more thoroughly.

Collapse
 
aminnairi profile image
Amin

Well, I don't require mathematics at work because I either use librairies that do that for me (Three.js and plugins for animations) or find the solution on the internet because I am not good at math but I guess it depends on the field of work. Someone that has to write a game engine from scratch for optimizations purposes will have to use maths more than I will.

Collapse
 
lukegarrigan profile image
Luke Garrigan

Awesome, what sort of development do you do?

Collapse
 
aminnairi profile image
Amin

I'm helping my CTO in the development of the website of a luxury brand that is using 3D rendering to allow their customers to configure their jewelry (rings, necklaces, ...). This is both challenging and interesting because I have all sorts of concerns (performance, SEO, design, ...).

Thread Thread
 
lukegarrigan profile image
Luke Garrigan • Edited

Sounds so cool, I’d love to see the final product!

Thread Thread
 
aminnairi profile image
Amin

We have a website and here is a page example of one of our rings (note that it is not optimized for low-end devices and is not working properly in Chromium, but is working well under Google Chrome).

Thread Thread
 
lukegarrigan profile image
Luke Garrigan

That looks amazing, hats off to you!

Collapse
 
michaelphipps profile image
Phippsy

You cant use Three.js without thinking about maths. In fact Three.js made me actually enjoy learning maths again.

Collapse
 
buphmin profile image
buphmin

As I do things for web and some other back end services math is only used sometimes. Most of the time when math is required it is simple add, subtract, multiply, and divide. Occasionally some algebra is needed, but still it is minor.

That being said I think it is important for everyone regardless of profession to be reasonably capable in solving algebraic equations (with the help of a simple calculator) and how to apply them to real life scenarios. In addition one should have and understanding of dimensional analysis as it helps apply algebra to the real world.

Collapse
 
lukegarrigan profile image
Luke Garrigan

I agree completely, I see the world differently the more I learn maths. Just don’t get to apply it nearly enough as a software engineer.

Collapse
 
jdforsythe profile image
Jeremy Forsythe

Most developers will never use any kind of advanced math and we're doing a huge disservice to our CS students by teaching so much math and theory and so little applicable concepts. I have to tell every new Jr he has just paid hundreds of thousands of dollars to learn things he'll never use and he has a ton to learn before he can contribute.

How about teaching networking fundamentals, git, how to design large projects, architecture, or any other real world skills? As our field grows and diversifies, we really need to be splitting CS programs into specialties. 90% of devs will never need a linked list or to know how to implement a bubble sort but likely 100% are taught these things.

Collapse
 
blazephoenix profile image
Tanmay Naik

Really depends on your field of work. Most plain old web development does not require mathematics much. You would need it extensively for anything in the field of machine learning, game engine development, operating systems, cryptography, etc.

Collapse
 
siddheshrane profile image
Siddhesh Rane

I don't use maths for my professional development, where I have to use libraries for extending the system. But one time I developed a radial gradient editor with WYSIWYG controls and for that I had to use geometry to figure out control point positions. So I suppose people in graphics and simulations need math. As for cryptography, it IS mathematics, not development.

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

I use functional programming, but do mostly business dev. So no, I don't use a lot of math other than basic arithmetic. However I do not view the advanced math I took as a waste, because I do not view understanding and knowledge as a waste. For example, operations like map and reduce (without side effects) are provably mathematically sound, which means I can rely heavily on them without worry. And there have been many other cross-overs from advanced math into tech-related fields. Even something as "simple" as parity in RAID has conceptual cross-over into modular arithmetic (mod 2 specifically) which I learned about in modern algebra. Also, it was in linear algebra that I was first exposed to operations which were not reversible. This kind of thing forms the basis of hashing and cryptography. I don't write hashing and cryptography code, but having an understanding of what is possible and how it works definitely helps to use it more appropriately.

Collapse
 
emoulson profile image
Evan Moulson

It's not required per se by my job, but my role in my team is kind of the efficiency/memory management/metrics guy, which leads me to use a lot of the statistics I learned years ago to determine statistical significance and model different approaches to a given problem.

Collapse
 
codemouse92 profile image
Jason C. McDonald

Yes, but I work a lot with algorithms, efficiency, data structures, and manual memory management. I'm also going to be working on a vector graphics rendering project, which involves plenty of linear algebra.

It all depends on what you're doing. The important thing is to have that knowledge in your back pocket, since you never know when it will crop up. Sometimes, it appears in the most unlikely places.

Collapse
 
thejoezack profile image
Joe Zack

I don't, but I wish I had a better grasp on statistics because it keeps showing up in Machine Learning.

Collapse
 
lukegarrigan profile image
Luke Garrigan

That is true game dev and machine learning are the only times I really ever use it!

Collapse
 
spidergears profile image
Deepak Singh

Try making a small gui based game like tic tac toe or something without using a framework and you will see why you need maths. We generally don't realize this because most of the time it's offloaded to some external library.
A simple easy to follow example would be plotting with d3.js, imagine setting up ticks on an axis without using d3 scale function for a dynamic dataset.

Collapse
 
spidergears profile image
Deepak Singh

There's a whole new world inside of the cryptographic algorithms, networking, image processing and machine learning that works cause maths does.

Collapse
 
charlesdlandau profile image
Charles Landau

Yes BUT:

  1. I'm a dev who does data science (or a data scientist who does dev work) so I primarily use math for that stuff.
  2. The math skills I have learned to make me a better data scientist bear almost no resemblance to math I learned in school
  3. Most of the time it comes down to understanding the logic of somebody else's implementations or applying statistical principles
Collapse
 
mattmoranjava profile image
Matt Moran

TBH I use precious little computer science let alone maths, as a BE web developer. I feel more like it's-a me: Mario! - I'm plumbing data through pipes & services from the CMS to the FE, & that's pretty much it.

Collapse
 
bugmagnet profile image
Bruce Axtens • Edited

Everything (and I mean e-e-e-everything) in my workplace is problem solving. Beyond the very occasional cartesian product, maths as such (and it's so wonderful to see someone use the word in its plural form) never gets mentioned, let alone considered. I expect there's a fair bit of it around, it's just not acknowledged as such.

Having said that, the database guy is trying to quantify aspects of SEO using SQL databases. He's probably doing a metric tonne of mathematics, though he doesn't acknowledge its presence.

Collapse
 
safijari profile image
Jariullah Safi

I'm in Robotics and I also do computer vision work. Mathematics both "advanced" and otherwise is essential to my day to day. Even when most of the work I'm doing comes from an external library an understanding of the math behind the functions is the difference between success and frustrating failure.

The old adage "another day passed without the need to use algebra" applies to me when inverted: it's rare that a day passes without me using algebra.