Math Skills For Programmers — Necessary Or Not?
An anonymous reader writes "Currently, the nature of most programming work is such that you don't really need math skills to get by or even to do well; after all, linear algebra is no help when building database-driven websites. However, Skorks contends that if you want to do truly interesting work in the software development field, math skills are essential, and furthermore will become increasingly important as we are forced to work with ever larger data sets (making math-intensive algorithm analysis skills a priority)."
The one with more math is the one you want.
Math KNOWLEDGE may be debatable, but Math skills are essential.
If you don't have the ability to break up and solve mathmatical formulas, how do you expect to be able to solve complex programming tasks?
Plus linear algrebra is awesome. And everytime I do anything even remotely 2d or 3d related, I always wish I had paid more attention in Geometry.
But more than anything, its good to know that there's an equation for that. Even if you don't remember what it is, or how it works, having the simple knowledge that it exists to look up is more than worth the time of taking the class.
Another person who is ill defining mathematical thinking. I consider mathematical thinking not only Linear Algebra, Infi et al, but everything that requires exact abstract thinking and has the properties of consistency and a formal and defined "language" to represent ideas.
For that matter, I think that mathematical thinking should be defined more broadly, such as conceiving design ideas and representing them with, say, UML or DFDs as mathematical thinking as well.
So yes, mathematical approach is a must in programming.
Just my 0.02c of course.
4Z5TX
OTOH if you can't understand stuff like big-O notation you'll never be a good programmer.
No sig today...
It really does help to have math. There have been times when a software solution became ten times easier because I recognized it from a college math class.
Contrawise, when I work on software that uses math beyond my ability, I have trouble debugging it, and constantly have to rely on the math person I'm working with for help.
I would hope that if you are in the computer programing world you understand that cranking out solutions to formulas is way more suited to computers than it is to humans.
If you want to solve a bunch of math problems then boot up maple, matlab, or any number of programs.
Doing a bunch of calculus or whatever is _not_ the reason that you want mathy people to be computer programmers. Analyzing and quantifying problems, applying appropriate algorithms, optimization, etc are all areas where someone who understands the math behind a problem can far outshine those who don't.
To be honest though I think most software devs are into math anyway.
Whether the actual math knowledge helps or not, the act of learning the math imparts knowledge you'll need. Learning to learn is a skill.
Why not? The pay is good. The hours are reasonable. The work is easy.
There is a lot more to life than your job.
Math is necessary for programmers but also for life. That wasn't the best thing in TFA though. The most insightful nugget in this piece was that we should think strategically about what we choose to learn. One the one hand, a programmer can chase the buzz...Rails, Struts, and the Twitter API and get jobs with the cool kids. Far better is to learn general tools that will be around a long time. This is why I like free software and gnu/*nix. The community has built a core set of tools(scripting/database/web) that stands to be around for 20-50 years or more. Just something to think about as you build your programmer/sysadmin toolset (assuming programming/sysadmin work isn't just a temporary thing for you).
You need to understand it, but how often do you actually analyze non-trivial algorithms (one that require more than counting the number of loops and multiplying by known algorithm times)? In a 10 year career I don't think I've ever done more than that. Not saying more math hurts, and its interesting in and of itself. Unless you're doing 3D graphics (which require trig and linear algebra), you rarely use more than basic algebra and some discrete math concepts. I honestly say I've never used calculus or differential equations professionally.
I still have more fans than freaks. WTF is wrong with you people?
Asking if math-skills are necessary for a programmer is kind of like asking if people-skills are necessary in the field of law. Some lawyers find success by performing in the courtroom and for the camera, while others find success in their skills with research, interpretation and analysis.
"Programming" is a massive category. Some programmers need incredible math skills to do their jobs. Some programmers convert thousands to hundreds with broken substring operations, then keep their jobs, and make good money doing it. So there's a spectrum.
But if I had to hazard a guess, I'd guess that the majority of programming jobs out there don't require very much mathematical heavy lifting. And often times if you do run into something that could be tricky, it's already been solved by someone else, complete with copy and paste source code.
Yet many programming jobs do require serious math skills, and probably (hopefully) always will.
TBH I don't know if some of the best software engineers I've met are any good at math. They're good at interpreting API documentation, good at structuring code to meet the strengths of the language they're using. Good at project planning, time estimation, and risk analysis. Good at understanding how computer and network systems work and -- often more importantly -- how they fail. They understand how users interact with software, and what users expect and want.
The truth is, software development has become as broad as life & human interest itself, and generalizations about the practice are becoming more and more meaningless.
Heck, perhaps my favorite college course was the one where we proved the equivalence of various math and programming problems. The more ways you learn to think about problems, the less details like the "language of choice" matters, and the more you can think in terms of "what's the right tool for this job".
Plus, as Feynman noted, if you merely have a different toolbox than those around you, people wil think you're a genius, as you can often see immediate solutions to problems they've been struggling with for a long time (and the fact that the converse is true only comes up if you let it). Having a large toolbox has worked quite well in my career.
Socialism: a lie told by totalitarians and believed by fools.
A coder with great math skills can write some really slick algorithms. However, more often than not, despite how well their algorithms are documented, if they're working with a team of developers they are usually pushed to dumb down their code so as to accommodate the skills of everybody else on the team ('team' more accurately meaning 'project manager') to make it more 'readable'.
If you are a typical programmer, you'll be using libraries that already have the difficult math-y stuff worked out.
If you don't have any clue about what these libraries actually do, then they're basically as useful as a typewriter to a monkey. You don't need to reinvent the wheel every time, but at least you need to have a clue about how and why a wheel works.
The documentation says what the libraries do.
I assure you, reading skills are critical to programming. To just about any job, actually.
This was of course just an example but it's true for a lot of stuff, back then you had to spend a lot more time optimizing your code as well, these days premature optimization is generally considered a bad thing (since in most cases it ends up being a waste of $500 worth of programmer time to squeeze out a performance gain that $50 in hardware would've have gotten you.
If you're planning to sell a million units containing both hardware and software, then "wasting" $500 of programmer time to save even $0.01 in hardware per unit is a really sweet deal.
Many of you are operating under the assumption that there isn't a need for lower-rung programmers.
Much of programming is understanding workflow, UI design and other things that don't involve complex math.
I'll take the guy who understands the APIs and doesn't know math over the guy who understands math and doesn't get the APIs.
I think you need some statistics training :-)
To have a right to do a thing is not at all the same as to be right in doing it
Mathematics is essential so that you can spot when things will break, and how to fix them. You can't program solid algorithms without it.
[Intentionally left blank]
without profound knowledge of math, you are a tinkerer. you program off the top of your head. To really, deeply understand what you are doing, you need math!
The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
You need to understand it, but how often do you actually analyze non-trivial algorithms (one that require more than counting the number of loops and multiplying by known algorithm times)? In a 10 year career I don't think I've ever done more than that.
Yes, but you at least know of big-O notation and what it means. You know that the "cost" of an algo can be measured and calculated. And that it's important.
There are far too many "programmers" out there who don't even know that.
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
people who are almost universally respected in our field as great programmers are also great mathematicians. I am talking people like Donald Knuth, Edsger W. Dijkstra, Noam Chomsky, Peter Norvig.
I don't think these are great programmers. My respect for programmers goes to Phil Katz, Steve Gibson, the author of the Dark Avenger Mutation Engine and generally the people who consider their work to be an art form of elegance, minimalism and speed.
linear algebra is no help when building database driven websites
Oh for [whatever]'s sake, who on this earth started spreading the "wisdom" that all apps are database-driven web applications that do nothing more than displaying user-input two-line texts with images and videos?
I could list dozens of algorithms - even from my day-to-day use - that nobody on this earth would be able to correctly and efficiently implement without proper math skills. And even the term math is too broad, natural language-related stuff, image/video/vision content processing stuff, simulation stuff, overall machine learning stuff plus ai-related fields, control systems - and I could just go on forever - don't come without their associated - sometimes fairly deep - math topics.
The social web will come and go, but apps and algorithms that do something even remotely useful, won't ever be accomplished by math-knowledge-lacking code monkeys.
I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
Leslie Lamport's contributions should be more widely appreciated. He has the knack for reasoning very hard about apparently simple problems that aren't as simple as they first appear. This is a distinct mathematical talent from being able to solve tricky integrals. It's surprisingly hard to reason about computational processes in a completely convincing way. The effort does wonders for the correctness of my embedded code. Note that with the modular behaviour of integers, the normal rules of algebra don't always apply (this shows up most often dealing with pygmy integers).
Long ago when I was a beginning C programmer I managed to implement a simple binary tree in a wonky way. My comparison operator was deterministic, but didn't form a full order. The tree seemed to work fine. I could add elements and test for membership, it was all golden. Then I tried deleting an element. This worked. But I noticed something funny about the tree afterwards. Since my comparison operator was not a full order, the tree rebalance operation following a deletion could orphan some elements so that they wouldn't be found.
I showed this to a coworker who told me "What are you worried about? It mostly works doesn't it? Your tree insert and membership test passes doesn't it? We need to move onto another task." But I was stubborn and a voice inside me went "this can't be right". Element inserts and searches in that system were common (like #define in C) but deletions were fairly rare (like #undefine in C). That broken code could have been out in the field causing nightmares for a long time before we tracked the problem down. Half an hour of consternation later, I had figured out how I butchered the order operation in violation of the full order requirement. I had cases where A B && B C && C A. This is not good for a binary tree with deletion. The nasty part is that it limps along further than you expect.
In that same job I had an improperly initialized pointer that scanned through a memory data structure comparing on a string field on some odd field size such as 23 bytes. (Sue me for my youthful indiscretion if you've ever had to label diskettes by compiler phase). Strangely, the pointer scanned several hundred k of memory not part of the table, then properly aligned with the table it was supposed to find, and returned the correct field. It seemed to work under testing, but I noticed the performance was a bit odd in some cases. This lead me to investigate and I found the unitialized pointer. Once again, if this code had been released, it was a ticking time bomb the first time some random values in low memory simulated a match with the search key.
I learned a lot in that job about defensive programming. A couple of years later I came across one of Dijkstra's books and the spark jumped from his finger to mine. Bugs have been a rare event in my code ever since. Dijkstra taught me to think properly about all possible orders of statement execution where the program remains correct. The order you first write isn't necessarily the only one that works. The mental discipline is a lot like classifying all the components in your BBQ kit into formal symmetry groups before you begin assembly. It pisses me off immensely when I miss some obscure drill hole and conclude that two panels are entirely identical, only to discover much later they weren't (usually after I've pounded in those flimsy plastic wheels that resemble a hip joint with rickets).
Try next time *before* assembling the BBQ to formally write down the symmetry group for every little flim flam and see if you can still F up the first assembly. I bet you can't.
What it comes down to is that math is an attitude as much as a skill. I tell my GF from time to time that math is fundamentally the attitude that 100% of what you don't understand is smaller than a grain of rice. How many programs have I screwed up because of a big mathematical mistake? Can't think of any. Going way back, how many times have I screwed up
the bottom line is: yes, you can use libraries (for this, you don't need much math), but to be a GREAT programmer, you need to be able to program things yourself (for this, you need math). If you can only piece together other peoples code (which you don't even remotely understand), then you are a tinkerer. It will be complete coincidence, when your code works reliably and fast.
The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
I write a lot of software for experimental physics applications, statistics is absolutely vital for data analysis software... Calc is essential for PID control methods as well. It really depends on what you want to do, but having higher level math skills will make you a better programmer in the long run.
There's no reason that "most programming work" and "truly interesting work" would have anything in common.
People are saying two things here, and thinking that they're mutually-exclusive. Some point to areas of commercial programming beyond basic CRUD operations, saying that math would be a big help there. Others point out that for standard CRUD and gluing together pre-written software libraries, math skill doesn't much matter either way.
Hey, they're BOTH right. However, the trend is moving toward the latter type of programming job. Forget high-level math... I seldom use my COMPUTER SCIENCE skills on the job. I vividly remember participating in a code review session around 5 or 6 years ago. I started to point out why a particular function was inefficient, and wrote some O notation on the whiteboard. There were 8 Indian developers in the room, and they had no idea what O notation even was. There were three other Americans, and they had only vague memories of having seen it at one point back when they were in school.
That was the day when I finally just "gave up". I now approach my professional life as the job that it is. I integrate Spring and Hibernate with your legacy system. I don't get too excited or worked up about it. I leave promptly at 5:00 each day. I'm well-paid for doing what feels like very little work. Most of all, I look for my intellectual stimulation outside of work (mostly on the clock... typical jobs let me spend half the day goofing off online). My point is that I have to disassociate modern programming from real intellectual pursuits, or else I'll get depressed over how trivial and boring this line of work is. If I DID know PhD levels of number theory, it would just be something else going to waste and I'd have to avoid being depressed about that too.
Having a lot of math knowledge in most programming environments today would be like an experienced patent attorney posting on Slashdot. You'd be surrounded by people who LOVE to talk about your field, yet generally don't have a clue what they're talking about. They misstate basic ideas and rules constantly, and it irritates the hell out of you. However, they all THINK they're experts... and in fact know more about the field than you do.
No thanks... I would pass.
Basic math (i.e. 1+1 = 2) is obviously an absolute requirement.
Algebra too is mostly a requirement (though if you did programming first, you'd probably find algebra alot less difficult cause you'd dealt with representative values).
But thats where it ends for almost 99% of programmers. Programming is really about shuffling bits of data around and so you can get by with only those two skills. However, the rest are very useful depending on the field.
For example trig and calculus are infinitely handy in any kind of spatial programming, but knowing vectors and transformations are often essential if your getting into 3d coding (though u can get by without it, if your using a library).
The rest are usually straight forward and dependant on you already having the math skills. I.e. if your going to be coding something that deals with statisics, that you obviously need to know statistics.
Ultimately, any math you know is to your advantage, but not really essential unless you dealing as a coder in a pure math realm (i.e. trying to implement a math algorithm within code). There are indeed many things you could code that are based on math without having to understand the math behind it.
For example using rand() is easy, is based on math and you can use it without understanding it. You can also learn to understand the difference between random number generators without understand the theory of their operation, and indeed understand what the difference between strong and pseudo random number generators really is - again, without needing to know the maths of their operation and be a very effective coder.
Another example if neural nets - its easy to understand their operation in terms of a pure coding exercise if your using someone elses neural net library - their operation is quite simple. Writing the library would require a reasonable amount of math intelligence though.
There are huge numbers of example where these things are fundamentally true, things you may build on that are based entirely within the math realm but understanding their mathematical operation is fairly irrelevant (but useful).
What alot of people do think (and it annoys me no end) is that you should be able to reinvent the wheel constantly. This is a time waster. If your writing some program that uses a neural net, the only reason to know how to implement your own is if the several out there cant do exactly what you need. This is what most people do anyways, "gimme that library" and reuse peoples work - its the backbone of how we code and ultimately the world as we know it would be alot different if we didnt just use the library that does the thing we want rather then implementing our on constantly.
But as i said, it depends on what you want to be as a coder. I would say having high-school maths in your head is going to cover 90% of coding jobs easily (i.e. 1+1=2 and algebra). I really dont know too many coders who need more then that myself.