Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
DSC

Does Coding Require Any Math?

Recommended Posts

My brother has on several separate occasions before tried to get me into coding, something I personally have no interest into. The most I've done by myself was using ZDoom's MAPINFO, and that doesn't really count. And the reason I don't care about it is just because it seemed to have too much math onto it. So, just to see if I was right, I'll ask: do you indeed need math to code?

Share this post


Link to post

I'm pretty sure more experienced coders are going to answer in a more detailed and accurate way, but in my very limited experience, it really depends on what kind of thing you're looking to make. I'd imagine writing code related to rendering, especially in 3D, is extremely math intensive as you need to essentially simulate the way light, shadows, etc. all work, and translate that to equations, constants, and whatnot. But on the other hand, something like an AI is mostly logic based (which is still related to maths but not as extensively), and a basic interface even less so.

Share this post


Link to post

Yes, sort of. A lot of basic programing requires basic knowledge of  math and I find that it requires similar problem solving skills. It really helps if you have knowledge about binary arithmetic and storage sizes of different data types. But at the same time, languages like Python are simpler to comprehend and are more user friendly, but still require math knowledge.

 

However, it really all depends on what you're trying to code in the first place, but from experience most programs that I've written usually involves iteration and knowledge of how memory works, and optimization is math intensive from my knowledge.

Share this post


Link to post

Largely depends on context, stuff life rendering and optimization requires plenty of it, yes, but it also depends on what you understand by "requiring math" - the first thing that popped up in my mind was boring and frustrating stuff you learn in school, to which the answer is "no", I guess.

 

So there's no universal answer since it largely depends on your goals, but the more complex the task, the more math may be required.

Share this post


Link to post

You will probably need to learn statistics, discrete logic or algebra, which are all going to have a road block if you don't know math somewhere. Rejoice though! You can always learn those things on your own at the pace you like, and skip all the annoying shit they pad school math books with. Otherwise it might be nearly impossible to do some tasks or fix some bugs. 

 

Hell you can start learning some of them online for free! Sites like w3school are cool.

Share this post


Link to post

Yes, in decorate you need to know some basics of math, like the xyz coordinate system, the angles from 0 to 360 degrees, and in acs you will need even more like Algebra, so my answer is yes

Share this post


Link to post

Some. sum, rest, multiplication and dividition, power and roots, some trigonometry why not, but programming doesnt require really advanced maths.

 

And mapinfo doesnt really a programming language... its like JSON, you can set properties, etc, but no program like in C++/Python/etc...

Share this post


Link to post

You wont be doing complex algebra most likely but, depending on what you're working it, you'll have to have a good grasp on fundamentals and logic since it applies on some level to a lot of stuff. I'm really slow at math, but can get by just fine while coding even though i might have to look up stuff from time to time

Share this post


Link to post

I understand the worry that math will make programming difficult. But in my experience, it's oddly the other way around - programming makes math easier, more interesting and more relevant to my interests.

 

For example, I didn't do very well in highschool trig. But, when in my game development I started to think about rotating something, suddenly I had an interest in trig functions. They had context and they 'clicked' for me in a way they didn't before.

Share this post


Link to post

I agree with @Aaron Blain. I’d add that computer science and programming are a kind of mathematics but they are more of an “applied” math, which is an important distinction.

 

I didn’t like math classes in school or college. But I loved learning programming since late middle school and it’s now my career. Don’t let a preconceived notion of not liking math get in the way of exploring your interest. I assume that your distaste for math comes from school or perhaps some idea that’s it just these impenetrable  formulas written on a chalkboard.

 

The only thing I think that is really important as a deciding factor is if you enjoy learning programming, which you’ll only know if you try.

Share this post


Link to post

Sorry for ignoring this thread for awhile, but thanks everyone for answering! Seems I made the right choice in not following with coding!

Share this post


Link to post

As a bit of a programmer myself (novice but still) I would say that it doesn't really require you to be a mathmetician or anything, but it does require you to understand math. The compilers, interpreters and parsers do the actual math for you but you have to know what you're doing so that the math comes out right. Something as basic as order of operations can really matter. You'd be surprised how easy it is to mess up your code by forgetting that, then wondering why you're not getting the number you're expecting. Addition, subtraction, multiplication, division are all used. I use all in my line of coding, PHP for creating PDFs.

 

I know for sure that with more in-depth forms of programming, like game engine programming, you'll use a lot more math and will need to understand more of it as well because that's how anything can work is with math.

 

But something like ACS for Doom, it's not that heavy on math.

Share this post


Link to post

Basic math is probably all you need for ACS scripting. Advanced coding (like in general not specific to doom) definitely requires a better understanding, it really depends on what exactly you are trying to do.

In general logic/problem solving skills are required for coding.

Share this post


Link to post

At the very least, you need mathematical logic, because code is pure logic. No matter how simple a script is, even if you don't use any math function in it, it will still have to be shaped by logic.

Share this post


Link to post

You need to be comfortable with basic addition, subtraction, and multiplication. Unless you're doing custom programming for 3D graphics or something similar, then you do not need very advanced mathematical skills.

 

What's far more important than math is being comfortable with logic. If, then, else, repeat, and breaking tasks into smaller steps. If you're the kind of person who doesn't enjoy thinking things through logically, then programming may not be for you.

Share this post


Link to post
11 minutes ago, AndrewB said:

Unless you're doing custom programming for 3D graphics or something similar, then you do not need very advanced mathematical skills.

*Laughs in quaternions*

Share this post


Link to post

If you wanna go low level, vector cross products, dot products, transformation matrices, projection matrices, quaternions, intersection of lines and 3d objects... but otherwise, game development tools these days obscure quite a lot of this so, not that much

Share this post


Link to post

I'm essentially a highschool dropout who flunked math (working on amending that tho), and I get by ok doing Decorate code. Most of the calculating is state jumps; how many frames, chance to jump or requirement for jumping, when to jump and where, etc. It's simple enough coding, though a lot of my code looks like fucking shit (but as long as it works without trouble, I'm good).

 

I find I've gotten by well with knowing addition, subtraction, multiplication, division, etc, but PEMDAS is a completely new concept to me, swear I never saw that in any curriculum I had.

For map making you can often wing it like fuck and then adjust as you go, though that's not really programming, unless you're voodoo 'scripting', where more complex actions require some good logic and timing (not necessarily a lot of math).

 

I figure most people who know their way around ZScript didn't flunk math though.

Share this post


Link to post

Not sure how much you'd need to know for advanced coding, but whether you're doing scripting or coding, I'd say you at least need to know the bare basics... such as addition and subtraction.

 

Example of one line python I use a lot in Ren'Py:

$ variable +=1

 

or

 

$ variable -=1

 

This can be used for any kind of stats, visible or invisible, such as how much money you have, or affection points, etc etc. 

 

So the short answer is "yes" you need to know math. How complex the math is depends on the script or code you're using, and what you're trying to achieve with it.

Share this post


Link to post

No. The whole point of programming is to have the computer do the math for you. :P

 

However, if you really hate math, you probably don't like logic puzzles in general. Even if you're not using complex equations in your program, you will always be solving problems with logic. Why does your brother insist you try it?

Share this post


Link to post
On 11/17/2020 at 10:02 PM, magicsofa said:

 Why does your brother insist you try it?

He doesn't do that 24/7, but he has indeed strongly insisted several times before.

Share this post


Link to post

UPDATE: And my brother yet again tried to force programming down my throat. I'm getting really sick at this point.

Share this post


Link to post
2 hours ago, DSC said:

UPDATE: And my brother yet again tried to force programming down my throat. I'm getting really sick at this point.

Tell him that he's making you uncomfortable, and that nobody learns anything worth a damn like that.

Share this post


Link to post
11 hours ago, Antkibo said:

Tell him that he's making you uncomfortable, and that nobody learns anything worth a damn like that.

 

Can second this. Forcing yourself to learn something that proves to be unenjoyable to you guarantees you'll never learn a damn thing about it.

 

Other times it's just the teaching method that is off-putting, so you could try a different approach.

Share this post


Link to post

Perfect example of what I described earlier:

 

A friend and I were kicking around the idea of a Gratuitous Space Battles-type thing, and I suggested flocking behavior for the fighters.

 

I knew that a 'boid' algorithm required some math that I'm pretty weak on. I struggled in high-school geometry and trig. After a few hours reading online and experimenting, and aided by having a project to give me context and incentive, I now understand vectors much better and more easily than I ever would have otherwise.

 

And now I got boids! Beautiful boids!

 

My point is, if you choose to devote maybe 10%-15% of your weekly gaming time to study and practice, then in a few months you'll be doing cool stuff. Applying the math to a fun project will help you build whatever skills you need.

 

Or don't. That's fine, too. Not everybody has to be a creator. Maybe your creative outlets just tend toward other things.

20201230_220535.gif

Edited by Aaron Blain

Share this post


Link to post
11 hours ago, Aaron Blain said:

Or don't. That's fine, too. Not everybody has to be a creator. Maybe your creative outlets just tend toward other things.

Yeah... I forgot to say this before, but I actually tried coding out all by myself and without my brother bothering me, but even then I barely understood a thing and got annoyed quickly.

 

And as for the "it makes learning maths easier" thing... Well, I absolutely detest it with all my guts, just thinking about it makes me irrationaly angry. Its the main reason my sophomore year was the worst time of my life, and I don't think there's anything that will be able to change my mind about the subject. Sorry.

Share this post


Link to post

Its been a long time, but there have been some recent developments that to me warrant just a small little update.

 

 

 

 

 

I've begun studying math again.

 

 

 

 

 

 

Not really something any of you would ever guess reading past me's posts, right? ;D

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×