r/CodingForBeginners • u/darksllmm • 11d ago
math in coding
hello everyone im about to start learning to code (python specifically) and i want to learn the math i would need for it first to make the learning process a bit easier.
any pointers would be greatly appreciated
thx for the help
7
Upvotes
4
u/BobCorndog 11d ago
You don’t really need math knowledge unless you do stuff that involves math
3
u/mjmvideos 11d ago
Really, the math comes with the domain area you are programming for. The language itself requires no math at all. Though an understanding of addition is helpful in working with loops.
1
u/ninhaomah 11d ago
Start with basic Python first.
1
u/Top_Finger_909 11d ago
You do not need to know much “math” to code however if you’re intent is learning data structures and algorithms then you will need:
1.) Discrete Math: https://personal.math.ubc.ca/~PLP/book/frontmatter.html
2.) Algorithms: https://theswissbay.ch/pdf/Gentoomen%20Library/Algorithms/Algorithm%20Design%20-%20John%20Kleinberg%20-%20Éva%20Tardos.pdf
Id highly recommend starting with something like the discrete math book up top. Then the algorithm design manual by Steven Skiena, then once you are comfortable do one of Kleinberg and Tardos or CLRS (only read specific sections)
This is about as “math” heavy things can get although again you don’t need strictly need all of this
1
u/cvco210 11d ago
You don’t need to study math to learn how to code. Just start coding
1
u/wak_trader 11d ago
It really dependson what you want to do. Linear algebra understanding will be essential after a certain point for a lot of hte paths available.
1
u/dld2517 11d ago
Math for Programmers (No Starch Press).
1
u/RedAndBlack1832 11d ago
"Math" in terms of like classroom study is very domain specific. Knowing powers of two and modular arithmetic is generally helpful though. Abstractly, the "math" is more about logic and procedural thinking. Breaking things up into steps with intermediate results and representing systems as functions (the math term, not the programming term) that feed into each other.
1
u/Jeremi360 11d ago
Coding is more logic then math, you only need math for math things,
you only need to know that: `con`, `sin`, `tan`, etc. exist and when to use it,
you don't need to write them by hand or how they work under the hood.
1
u/SeaTeaching3550 10d ago
what do you exactly want to do using python ? if its AI/ML or data science, then maths is much needed otherwise you dont need maths. basic maths which i am sure you know, is more than enough for programming stuff.
But if you are planning to learn ML, you need statistics, calculus, linear algebra, probability etc
1
u/Hot_Dog2376 10d ago
General purpose? Linear Algebra. Vectors help a lot for things that you don't even think they would at first.
Discreet number theory if you really wanna get into it.
1
u/JGhostThing 10d ago
I find that I used basic algebra, calculus, and trigonometry. There are some subjects that I would have liked to have known linear algebra, such as computer graphics and such.
1
u/StageSubstantial1626 9d ago
I would use ai for that kind of stuff as someone who can't do math to save my life
1
u/aodare90 6d ago
You don’t need “math” to begin programming. Programming is a thinking and problem-solving discipline. You would only need “math” if you were planning to work doing physics or data science or machine learning which requires linear algebra. Web Development/Design doesn’t require “math”.
1
u/cranky-programmer 4d ago
If you just know the basics, its more than enough, you don't need math as much as logical thinking ability
1
u/[deleted] 7d ago
u dont need to learn math first, just start python. basic arithmetic and a bit of algebra gets u through the beginner stuff, and % (remainder) is worth knowing bc it shows up a lot, like n % 2 == 0 to check if a number is even
after that it depends on what u wanna build. websites, bots and automation barely use any, games use some vectors and trig, data and ML want linear algebra and stats, and algorithms lean on discrete math
so pick something small u wanna make and learn the math when it actually comes up