Coding is related to maths?

MasterA

Madly Diligent
Joined
Jan 20, 2013
Messages
7,389
Reaction score
701
FP$
115
Hey,

Is coding related to maths? The general impression I am getting is that coding is very heavy on maths and algorithms but I really don't get why that is the case? Like you hardly use any numbers and it doesn't seem to affect you if you know nothing about algorithms?
 
The main link I personally see between maths and programming is the logical thinking and planning it requires; there is a definite link between the thought process used in maths and that needed to plan, design and implement algorithms in programming.

It's also worth noting that the theory behind computers and other such stuff is extremely maths based (it's actually really interesting and I'd recommend looking into it if you're interested in that type of thing).
 
I hate it when people say "maths" it is so wrong. The correct word is "mathematics" if you want to be plural with it. People seem so immature and young (children in elementary school I mean) when they say "maths".

Sorry, OCD kicking in.

I don't think mathematics is related to coding much. Maybe a little bit but nothing like Calculus or whatever. At least not for the basic codes.
 
The logical thinking is certainly the main reason why it could be said that programming and maths are connected unless you're going down into lower-level theory (stuff like base-2, binary logic, etc.)

I think though it's generally the case that people who are good at STEM subjects (science, technology, engineering and mathematics) usually find it easy to transition to programming, but it's not a complete requirement.
 
If you do a degree in computing it requires you to take a few math classes. The main reason for this is the logical thinking and understanding how the mathematical process works. Many times writing a program comes down to understanding the process and usually a great deal of math is involved, even when you don't think it is.
 
Any good programmer will NEED to be familiar with at least basic algebraic arithmetics. Pagination uses math. Though this is basic, i woyld assume this is one that is used the most in any script found online.

Payrolls, subscription.services, security all uses mathematics as well.

If you.ever.get into game development, your be using soo much math you go nuts when there's no syntax error and believe its the flow of the.code but dind out it wad of your algorithms.
 
Very basic math is used in most programs: addition, subtraction, etc. There are also some branches of math which prove particularly useful in every day programming. In particular, coordinate systems are essential to understand to properly do graphics work. If you want to calculate whether a projectile has intersected a 3D wall, you'll need to do some conversions between coordinate systems, and use a few basic formulas you'll learn in geometry.

More advanced concepts such as algebra and calculus and more frequently using when dealing with jobs. A programmer who builds websites all day will never need to know calculus. However, a programmer who works for a company which does data analysis will very much need to know these mathematical concepts. Also, researchers in the field of computer science, developing algorithms, graphics drivers, and what not, will need to have a very good knowledge of mathematics.

Overall, I'd say the answer is that basic math is used pretty frequently by programmers. Knowledge of more advanced math is a bit more specialized, and not necessarily needed, though.
 
You would need to know the basics in mathematics for coding.
 
I struggle with maths and in university there is a lot of programming and I struggle a lot...so much so that I've failed 🙁
 
What you need "math" for:
Discrete Math - Solving Algorithms. Discrete math isn't hard but often times if you have to solve a problem, you will often have to use discrete math.

Calc - Learning calc is mainly for 3D computing.

Linear Algebra - Same as calc. If you are going into 3d graphics (like a gaming engine or some sort), you will be using this.

Regular Math (algebra, geometry) - For specific applications like a calculator or an application regarding calculation geometry functions or some sort.

To be honest, discrete math is all you are going to need unless you go into 3d design. And to be even more honest, you most likely won't even be trying to solve very difficult algorithms until you are 10+ years in the game.
 
@cyimking - It all really depends on who you work for. I work in the defense industry, so have to deal with the kind of math that engineers do a lot. Linear Algebra is very good to know, because they use matrix math quite a bit. Also, geometry is very important, because to analyze the type of data which I have to analyze, you need to be able to compare points, calculate radiuses, etc.

Similarly, if you work in Biotech, you'll need to understand the basic science behind what they do. If you work for a software contracting company, then you'll probably need to know a little bit of everything, depending on what kind of work businesses in your area tend to do. I guess with web stuff you generally don't need to know much math, though.
 
I'd also like to add that programming has a very close relationship to discrete maths and decision theory. Although it is not necessary to know this to be able to program, they're very interesting subjects (at least, I think so 😛 ) and you may even find yourself doing some parts of it without even knowing. 😉

Other than that, pretty much any sort of applied mathematics can be applied to programming. It just depends on what you happen to be developing at the time. Like Sinon said above, he needs linear algebra, and if you do something like game programming, your vectors and matrices come in useful.
 
Yes, of course, Coding is writing an algorithm, so you must have a good knowledge base of Math. I can't believe that some poets could code any thing 😛
 
I think that at least a basic understanding of advanced math is needed. Do you need to be an expert, no, but knowing the basics would definitely help you.
 
There are a alot of graphs here and channels there when ever you code, so I would say yeah! 🙂
 
@kaizax: Writing algorithms is definitely one aspect of programming, but it is really just one aspect, I think. I guess I like to think of it like this: you have a set of tools at your disposal, and you have to figure out how to apply them in order to solve a particular problem. Sometimes you have to write an algorithm which does that at O of log something, but most of the time you don't. Once you've done enough coding, it gets kinda boring, really.

My usual day at work involves having to solve some new requirement which has been set down by the powers that be. Usually that means throwing together a few checkboxes and text fields, then writing some code to store a bunch of objects, send some messages from one place to another in the code, and maybe some graphics stuff. It's pretty basic, nothing mathematical.

And here's the thing. I'm not a mathematician, and I'm not paid to write math, really. My company employs electrical engineers to know all the math stuff, and usually they're give me a mathematical formula or algorithm which I need to implement, when we're doing something complicated enough to require one. Mathematics is a different fields from coding, I think. You can know both, but high level mathematical concepts are no more useful to a programmer than high level concepts in physics or biology. When solving a problem, you'll sometimes need to know math. But you'll sometimes need to know biology too, if you work in biotech.
 
Back
Top Bottom