Math, Programming, and Language Learning
An anonymous reader writes: There's often debate amongst modern programmers about how much math a professional developer should know, and to what extent programming is math. Learning to program is often viewed as being on a spectrum between learning math and learning spoken/written languages. But in a new article, Jeremy Kun argues that the spectrum should be formulated another way: Human language -> Mathematics -> Programming. "Having studied all three subjects, I'd argue that mathematics falls between language and programming on the hierarchy of rigor. ... [T]he hierarchy of abstraction is the exact reverse, with programming being the most concrete and language being the most abstract. Perhaps this is why people consider mathematics a bridge between human language and programming. Because it allows you to express more formal ideas in a more concrete language, without making you worry about such specific hardware details like whether your integers are capped at 32 bits or 64. Indeed, if you think that the core of programming is expressing abstract ideas in a concrete language, then this makes a lot of sense. This is precisely why learning mathematics is 'better' at helping you learn the kind of abstract thinking you want for programming than language. Because mathematics is closer to programming on the hierarchy. It helps even more that mathematics and programming readily share topics."
The problem with all the articles like this is that they're either written by people who did take math or didn't, and in either case both believe their side is right. The article is clearly written by someone who took a lot of math so, surprise, he thinks math is good for programmers. But I took nothing past Calculus (and have never professionally used even Trigonometry), and I'm a successful programmer, so I think math is unecessary.
Until someone actually does a study on this, it's all gonna come down to "the way I did it was better" ... and that's just noise.
As long as we're making gross generalizations...
A big part of organic chemistry in college is "synthesis" problems where you are presented with a molecule and you're supposed to outline the steps (chemical reactions) required to turn it into a different molecule. I find that this closely mirrors programming where we're manipulating data instead of chemicals. We all have access to the same tools and there's more than one pathway that will work, but we're trying to find the most elegant / efficient solution to get from A to B.
Most of the students in my OChem class were premeds and many of them struggled with the synthesis problems. A lot of the premed curriculum involves memorizing and regurgitating huge amounts of information, with less emphasis on problem-solving. I always thought the ones that were good at the synthesis problems should switch gears and become programmers.
az0
... and that's it.
If you're programming litigation, you'll have to pick up some legal knowledge. If it's banking, then finance. If it's science, you'll have to be exposed.
But ... you don't have to be an expert at anything but programming. The experts do all that stuff. They can spec, but they can't code.
It little behooves the best of us to comment on the rest of us.
Programming is mathematics, it is the application of decision and discrete mathematics. Not all mathematics is infinitesimal calculus (there are different kinds of calculus), algebra or geometry.
As a guy with two masters in math who knows 15 languages... I also disagree. There are some languages that are mathematical (like Haskell) but most programming has more in common with cooking (sequencing the application of resources) than math.
I suppose set theory, and propositional calculus/boolean algebra don't count as math either ?
TFA tries to make the case (poorly) that Math involves ambiguities and Programming does not.
The greatest of all mathematicians, Carl Friedrich Gauss, stated, "I mean the word proof not in the sense of the lawyers, who set two half proofs equal to a whole one, but in the sense of a mathematician, where half proof = 0, and it is demanded for proof that every doubt becomes impossible."
Not much room for ambiguity in that.
Proficiency in mathematics for the most part has little to do with being able to learn a programming language. This much I agree with. However, proficiency in mathematics does provide a strong indicator as to what you will be capable of doing with those languages. You may not be performing Calculus or manipulating matrices in the software that you write but the skills that provide an aptitude for performing such math are very much relatable to software development. Such skills include, abstraction, visualization, and logic to name a few.
Two of my imaginary friends reproduced once
No you don't need math to write an iPhone App or an interactive website.
You do need math to understand why looking up some keys in a HashMap is much faster than iterating over a vector.
You do need math to understand why some encryption algorithms are better than others
It just gives you the tools to better comprehend what's going on under the hood, so you have more information to make the right choices in how to implement something.
I went for years keeping my math and my programming separate. Often programming involves little more math than x++. But then I really buckled down and learned a pile of math which I now pile into my programming. Interestingly enough when I try to show my algorithms to other programmers they say, "I forgot all that math 1 day after exams." But these algorithms often are cutting thousands of lines of code away and result in answers that are instant instead of a more iterative approach that could take minutes or much longer.
The math that I am referring to is all pretty basic year 1 or 2 stuff. Basic Discrete, basic calculus, etc.
some 20 years ago (yikes, did the math and it's closer to 30). I wanted to do signal processing and such, but I realized MIT grad students were doing all the fun stuff. I now write embedded software, and the only time I use math is when I either go off on a tangent, or sine off on an apology for doing so.
...on my Commodore 64, since we didn't have any games when it came out.
Interestingly enough, I sucked at "school math" and flunked math entirely. Imagine the expression on my math teacher when he saw me coding in assembly at the new computer-park back in the 80s, when he barely could understand basic.
Since, I've made numerous demos in the DemoScene with Amiga, and later on coding robotics AI with MCUs (as a hobby, nonetheless).
So no, you can absolutely learn to code quite decent software and hardware without deep math skills, but it helps if you want to do real advanced stuff like coding your own Render-Engine (but then again, how many are they?) My advice - learn whatever you need to achieve what you want.
What this world is coming to - is for you and me to decide.
A "programmer" can be someone who spends two days putting together a complex Excel macro (poorly), or someone who designs an information systems architecture for a significant enterprise. These are VERY different activities.
On top of that, I'll say that approximately 85% of people doing programming aren't really competent. Compare how often software crashes vs how often cars fail in such a way that they crash themselves. So you have to specify, are you talking about MOST programming, or competent programming? Most programming isn't done competently.
Well-designed and larger software projects require a thorough understanding of a large set of rules, both knowing what the rules are, and understanding WHY the rules are as they are, and when to apply which rules in order to move forward. In that sense, it's very much like math. Also like math, one wrong decision can lead you down a path of futility, from whence reversing course is time-consuming.
Until you hit something that does require higher math.
Find the optimal coverage schedule for employees next week given their varied availability
As simple as this sounds, unless you're willing to wait for the computer to churn thru every possibility: you are going to need some higher math know how to program that answer.
Math IS sequencing. So is using recipes. That is how math works.
Math is a language. Just because you can frame things in that language doesn't mean that that language is necessary. Recipes are often in English. English is sequencing (words are a serial stream after all). That doesn't mean English is necessary for programming (there seem to many competent non-english speaking programmers as far as I can tell).
Disclaimer: I am a professional research mathematician; I do understand math just fine.
Craft Beer Programming T-shirts
In the real world the picking order is more like:
1. Rich parents / Male who is excellent at a popular sport
2. Prestigious law degree
3. Prestigious MBA
4. Good salesman and good at golf
5. Economics/Law majors/MBAs who got into strategic/management connsulting
6. (The rest)
TFA is really about the human mind. We understand patterns as different forms of language, music is the most basic and universal, it lights up all areas of the brain, then you have spoken language built on top of musical patterns, then along comes symbolism in the form of writing and icons, math is our most recent and most precise form of natural language.
The take home message is, expose your kids to maths without boring them to death.
And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
You might not be terrible at math. I thought I was terrible at math (I'm also a software developer). I also thought I was only good at discrete mathematics (which was a course I took during my university degree, heavily related to programming and CS). Furthermore I thought I was terrible at learning human languages, after having had 7 years of compulsory French at school and not being able to form a coherent sentence in French.
It turned out I was wrong on two counts:
A while back I started learning Spanish. The way I was being taught now was in a fun and easy way. I was also self motivated. In six months after starting, I could actually use some of it and knew more Spanish than I did French from 7 years of French lessons. 14 months after starting I was giving a technical talk in Spain (with an admittedly terrible accent and many grammar errors). Later today I'm off to Spain to help organise RetroEuskal with a bunch of Spanish friends. I started learning Spanish in my mid-30s, not as a kid. I learned it far faster than I would have as a child.
More recently I realised I needed better mathematics skills to be able to do more complex things in my electronics hobby, so I took an algebra course on Coursera. At school I had pretty much flat out failed algebra. In fact I was put into the lower maths set with all the thick kids (where you could only score a C at most in the GCSE, the exam we take at age 16) because both myself and my teachers were convinced that I was bad at the subject. But doing algebra in a course that was interactive, fun and gave instant results - I passed that with a distinction. I then did a pre-calculus course, and passed that with a distinction. I then did Jim Fowler's (Ohio State University) calculus 1 course on Coursera and passed that with a distinction too.
So it turns out that I was wrong about myself. In reality I was not bad at maths nor human languages. Now I admit I will probably never be a mathematician or linguist, but I can now do two things I never thought I ever would be able to. The reason I never succeeded at these things at school was because they were taught in a very boring and overly complex manner, and I was also pathologically lazy and didn't pay enough attention. The reason I succeeded now is due to having more motivation to do it and being exposed to teaching methods that inspire, and that aren't just hours of boredom.
Furthermore, while I don't usually use calculus or algebra in my day job, I have found that learning these things has improved the way I approach a problem.
Oolite: Elite-like game. For Mac, Linux and Windows
The big thing holding back computing is that computer programmers tend to think only in terms of algorithmics, and not in terms of (mathematical) computation. Computation in mathematics allows all sorts of funky stuff, and the only area where it is commonly applied is in vector manipulation. Applying matrices to matrices to matrices allows us to create infinite combinations of reusable transforms, which can then be applied to all the vertices in a 3D model at a low cost. Applying a series of algorithmic procedures to manipulate the same data would be unworkably slow. Algothmic programming results in lots of unintended interactions, and hard-to-track phantom bugs in the code. Computation is harder to start with, but it scales so much better and results in much more stable projects.
Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'