Olga Khazan writes in The Atlantic that learning to program involves a lot of Googling, logic, and trial-and-error—but almost nothing beyond fourth-grade arithmetic.
Victoria Fine explains how she taught herself how to code despite hating math. Her secret? Lots and lots of Googling. "Like any good Google query, a successful answer depended on asking the right question. “How do I make a website red” was not nearly as successful a question as “CSS color values HEX red” combined with “CSS background color.” I spent a lot of time learning to Google like a pro. I carefully learned the vocabulary of HTML so I knew what I was talking about when I asked the Internet for answers."
According to Khazan while it’s true that some types of code look a little like equations, you don’t really have to solve them, just know where they go and what they do. "In most cases you can see that the hard maths (the physical and geometry) is either done by a computer or has been done by someone else. While the calculations do happen and are essential to the successful running of the program, the programmer does not need to know how they are done."
Khazan says that in order to figure out what your program should say, you’re going to need some basic logic skills and you’ll need to be skilled at copying and pasting things from online repositories and tweaking them slightly. "But humanities majors, fresh off writing reams of term papers, are probably more talented at that than math majors are."
(Score: 2, Interesting) by gawdonblue on Thursday September 03 2015, @09:46AM
I don't think that you can generalise that you need advanced maths to program. You would definitely need it in certain situations, but in 27 years of paid programming I've needed it maybe twice.
I've done mostly banking software and I've needed to understand some advanced accounting principles but the mathematics behind is usually fairly basic. When there have been interesting formulas it's been knowing how to convert the symbols to code that's been important, not understanding how to derive the formula in the first place.
I do like maths and I enjoy a mathematical challenge, but it happens all too rarely in my work.
(Score: -1, Redundant) by Anonymous Coward on Thursday September 03 2015, @10:08AM
Every program is maths. Every programmer needs maths to code.
It’s not because you have never needed to use quaternions or Fourier’s transforms that you don’t do maths when you program.
SQL requests are algebra for ****’s sake!
(Score: 2) by The Mighty Buzzard on Thursday September 03 2015, @11:03AM
Boolean algebra is more logic than math.
My rights don't end where your fear begins.
(Score: 0) by Anonymous Coward on Thursday September 03 2015, @12:12PM
Logic is mathematics, unless you're speaking about philosophy, but I've never encountered any programming problem that required me to use philosophy (and frankly, I've got no idea what such a programming problem might look like).
(Score: 2) by linuxrocks123 on Thursday September 03 2015, @01:07PM
MP3 decoder
http://www.youtube.com/watch?v=K5G1FmU-ldg [youtube.com]
(Score: 3, Insightful) by Dunbal on Thursday September 03 2015, @01:08PM
You don't need math. You need to understand basic algebra. You need to understand how computers actually work and how your language actually works so that you know what you're doing. And you need to have the kind of mind that breaks things down into little steps. Unless you're writing a very specific application, in almost every case a "best approximation" is better than the actual mathematical formula - which you can always find in a textbook or online anyway.
The use of variables and algebra is not "math" just like putting a band aid on someone does not make you a doctor. Unless you wish to be shot by some insane advanced mathematician you should avoid statements like that!
(Score: 0) by Anonymous Coward on Thursday September 03 2015, @03:24PM
Algebra is not mathematics?
Do Americans call it "math" because they only know just one?
(It's always mathematics or maths in the UK.)
Just about everything is mathematics, but the substance of the article is correct, none of it is advance mathematics. I'm sure most of use have seen plenty of examples of programmers with surprisingly poor literacy or numercy but somehow still being programmers.
The "rediculous" [sic] spelling mistakes I see all the time I'm amazed some people are ever able to compile or debug their software.
(Score: 0) by Anonymous Coward on Thursday September 03 2015, @05:12PM
Algebra is not mathematics?
Yes, the OP was saying it isnt a difficult one.
Do Americans call it "math" because they only know just one?
(It's always mathematics or maths in the UK.)
Wow, really? Americans don't pluralize it because we see it as one overarching subject. Do you call your literature classes Literatures, haha does that mean you only know one, haha. What about your History class, do you call it Histories?
The "rediculous" [sic] spelling mistakes I see all the time I'm amazed some people are ever able to compile or debug their software.
Ahh you're so smart huh, sorry to have questioned you and your grammars and codes skillz.
(Score: 2) by frojack on Thursday September 03 2015, @04:05PM
You need to understand how computers actually work and how your language actually works so that you know what you're doing.
Not really.
You need to know the basics of computers, and the basic idea how your language works.
Most programmers have no real clue about how a computer actually works (is there any one person on the face of the earth that understands all about how a computer actually works?) and most programmers don't actually know just what goes into a simple addition of two numbers!
No, you are mistaken. I've always had this sig.
(Score: 3, Interesting) by DeathMonkey on Thursday September 03 2015, @05:46PM
Just because it doesn't contain a big scary formula doesn't make it not math.
In fact, if you can parse that (unwieldy) sentence you just did math! [wikipedia.org]
(Score: 1) by Ethanol-fueled on Thursday September 03 2015, @09:43PM
Do coders who are also good at math even do their own math anymore?
I thought nowadays they just offloaded their work to MATLAB or automagically exported [mathworks.com] their MATLAB algos to C/C++ libraries if they had to go that route.
(Score: 1, Funny) by Anonymous Coward on Thursday September 03 2015, @11:41AM
As soon as jquery publishes a math lib every programmer can have a beautiful mind.
(Score: 2) by martyb on Thursday September 03 2015, @12:35PM
Mathematics is a very broad field which does include numerical calculation. But it is far more than just that! Boolean algebra. Set theory. Algebra. I regularly use all of these when I am programming.
At its simplest, an algorithm is a mapping of inputs to outputs. Or, more specifically, a mapping of a domain to a range. Let's look at a simple program to calculate an average for a user's grades for a semester. Input is a string of blank-delimited grades. Output is the average. Simple and straightforward, right? This example is in AWK.
Let's test it with a couple of samples of test data:
Looks good... ship it!
But, it fails.
There is no input checking. It returns a non-integer in many cases. Non-numeric 'grades' are treated as having a value of zero. Worse still, the program crashes on a null-input with a divide-by-zero error.
I would argue that one needs to know what the entire domain of possible inputs is and needs to be able to accurately parse that into non-intersecting subdomains that cover the entire of the input domain. Further, one then needs to be able, for each of those subdomains, perform the correct processing and generate the correct results.
These are not difficult concepts. I learned set theory in 5th grade, algebra in 7th, and Boolean algebra as part of a programming course in 8th grade. But, I have had a successful career in software test and quality assurance because these simple concepts constantly fail to be fully implemented by developers!
An aside. For those who know this already, it's no big deal. But until I learned these, conditional expressions were just a miasma of quirky symbolisms. Sadly, it seems, there are many professional programmers who are unaware of these!
The Boolean operator 'AND ' is just multiplication on the domain of {0, 1}:
Further, Boolean 'OR' is just addition on the same domain, where one defines 1 + 1 to have the value 1:
Combine this with the rules of associativity, distribution, and commutation and even the most convoluted conditional expression can be evaluated. =)
Wit is intellect, dancing.
(Score: 0) by Anonymous Coward on Thursday September 03 2015, @02:04PM
tl;dr - Error checking and exception handling takes up a lot more time and code than the basic task at hand. This requires the programmer to understand the requirements rather than just the math, but some parts of the programmer's skill-set for checking/handling these issues can be compared to basic math learned in grade school.