from Hacker News

Ask HN: How much math one needs to know to learn programming?

by joanna_ on 7/12/19, 2:49 PM with 19 comments

I am learning Python, and I have no prior experience of any language. I am switching career.

I want to know if math is required to learn programming for web dev.

  • by usgroup on 7/13/19, 8:20 AM

    Maths for web dev? You don’t need any maths beyond what you’ll learn in junior school:

    Arithmetic

    Basic algebra

    Basic Boolean logic

    That’s it. You’ll mostly be wrangling interfaces and/or api/DB plumbing. Making things testable and repeatable. Reliable. Etc.

    In my experience most programmers are useless at maths. Mathematicians and programmers are mostly separate populations and it’s relatively rare to find a solid programmer that’s also a solid mathematician or vice versa: totally different set of aesthetic preferences.

    Meanwhile you will find plenty of programmers that skim a book on graph theory and think they know something. Or mathematicians that write crap matlab code and say they can programme.

  • by rman666 on 7/12/19, 3:08 PM

    In general, nothing more than grade school math is needed to learn web development. Obviously, if your developing a statistical healthcare application you’ll need more math skills, but for most websites and web applications all you need is basic math skills.
  • by sp332 on 7/12/19, 3:38 PM

    I would learn the basics in a few fields that they don't generally cover in high school: graph theory, number theory, set theory, statistics, and calculus. Just getting a few of the basic ideas from each of those in your tool kit will make it easier to think about certain classes of problems. Plus, you'll have a better idea where to look for an answer when you hit a problem that requires you to go deeper.

    For web dev, statistics will help you spot A/B tests that are broken or meaningless. And set theory and combinatorics will help with database queries.

  • by scanny on 7/15/19, 4:07 AM

    Cliff Notes: Learn Math, I didn't, but still can do dev work, but I really regret it.

    I know almost nothing, really. I stopped taking math classes around 16/17 years old, I just wasn't able to grasp it and gave up.

    Double majored at Uni in CS & Geography which allowed me to pass over all the mathematical CS courses. If you can't substitute out the math heavy papers with papers from another course, over your whole `X` years studying, then you better upskill as best as you can or it will be tough going.

    But here I am in a dev job, that I got because it's hard to find geographers who can code, with my biggest regret being that I did not get enough of a mathematical understanding earlier on. It is such a useful and universal skill, it is a pity not to be confident in applying it. But the best thing is that if you work with a solid team you will have people around you to fill in your weaknesses, and you can fill in theirs.

    You can get by without it, if you find a niche you can specialize in where coders are hard to come by, but you will find yourself really needing it and having to pass work on to someone else or finding some library.

  • by jaChEWAg on 7/15/19, 3:01 AM

    If you are going to learn programming on your own and not planning to go through a computer science curriculum, then I would say you don't need much more than basic algebra and arithmetic. The majority of fields in demand (Web dev, mobile, etc.) don't involve much math if any.

    If you are going to a CS curriculum then I would advise learning up to Calc 1 pretty well before hand in order to be ready because I had to take all of calculus (1, 2, 3), linear algebra, and a few CS classes that involved math like (Discrete Mathematics, Theoretical CS, etc.). It wasn't fun because I am not strong in math but I got through them.

    Most importantly, if math is not your strongest subject, don't be discouraged to still learn programming because I was in the same situation and now after going through a CS degree and working at a few companies, I can confidently tell you that everyday work will very rarely involve any math beyond basic arithmetic.

  • by wizzerking on 7/12/19, 3:23 PM

    Database Applications Also require very low levels of math. And depending on whether you use Artificial, Convolutional Neural Networks for solving PDE's, or Image Classification will depend on the level of mathematical training you will need to verify or analyse your results.
  • by AnimalMuppet on 7/12/19, 4:44 PM

    You don't need much math, in terms of specific knowledge. However, it is helpful to be able to reason in a mathematical kind of way.
  • by heelix on 7/12/19, 10:36 PM

    Of all the maths I use pushing code, statistics are likely the skills I keep using the most. Not required, but helpful.
  • by macando on 7/14/19, 1:21 PM

    If math is not a big part of the underlying domain for your software you won't need it at all. But being good at math (like not having problems with it) is a strong signal you'll be able to pick programming fairly easily.
  • by mpetkevicius on 7/15/19, 9:34 AM

    Just recently I've had to implement camera preview on Android. This common task has required some knowledge of how transform matrices work. For me personally maths has been indispensable during my career.
  • by shims on 7/12/19, 6:38 PM

    Basic arithmetic and algebraic substitution.

    Set theory, graph theory, stats, discrete math and linear algebra all rear their heads in various fields, but you could go your entire web dev career without having to understand them.

  • by dragonwriter on 7/14/19, 4:46 AM

    Basically none beyond arithmetic, though more is helpful.

    You need some to learn computer science in any depth, though they can be learned togethe and quite a bit for some particular kinds of programming or application domains.

  • by sidcool on 7/14/19, 4:35 AM

    Honestly very little. Just the basics. Simple Algebra, arithmetic and geometry are enough. I would suggest start with a language without worrying about math. If you need for anything, learn it on the fly
  • by tychonoff on 7/13/19, 7:48 PM

    Mathematics isn't just another toolbox - it also represents an attitude. Well-structured code, modularization, and generality are natural by-products of theorem proving. So interest in any area of mathematics will make you a better programmer.
  • by grizzles on 7/16/19, 4:22 AM

    Math is not required to learn web dev.