Programming and Math.
June 21, 2010 2:18 PM   Subscribe

I've started learning to program and I'm enjoying it well enough, but I'm not fantastic at math. Do I have a future as an employable programmer?

I've taken College-level Algebra and passed well enough, and one of the advantages of being older is that numbers no longer scare me. But I don't really have a mathematician's mind. My understanding is that higher-level math and programming go hand-in-hand.

I don't hate math, but I don't love it either. Will I be employable as a programmer if I don't love math?
posted by lekvar to Work & Money (28 answers total) 10 users marked this as a favorite
 
Math is a huge field, and only a subset of it intersects with general Computer Science. You may want to see how you like discrete math and CS algorithms courses first.
posted by zsazsa at 2:21 PM on June 21, 2010


It depends on the type of programming you want to do. If it's mostly web stuff like CMS customization or simple desktop applications there won't be much math involved and you should be OK. Things like game programming will require more math and probably not be attainable with just college algebra.
posted by sanko at 2:22 PM on June 21, 2010


I was going to come in here and say that both "math" and "programming" are large universes, some of which don't overlap each other that much, but the first two comments beat me to it.

So...it depends on what kind of programming you're teaching yourself.
posted by dfriedman at 2:25 PM on June 21, 2010


Absolutely you'll be employable. The math part comes into play in terms of algorithmic thinking (what's the most efficient way to ____ a set of ____?) but these are often solved problems with known best answers. It helps to think logically, and systematically, but that's not 'numbers' per se as much as it is "How best to solve problem _____?" in terms of how you structure your program and allocate the data you're going to work with.

In my professional experience, most programmers are not math nerds by any stretch, and they do quite fine. There are areas where optimal mathematical solutions are crucial, but you needn't be doing those- most programming jobs aren't there. The best programmers I see where I work aren't numbers guys so much as inherent pessimists with low self-esteem. If you assume that everything you write will fail in some unexpected way and try to handle that, that every variable passed to a function will be of the wrong type and improperly formatted, and you'll write some decent code. Assume that external dependencies A and B will always work, that service C will always respond within n milliseconds, that configuration element D is always set explicitly, and your testers and those running your code live will hate your soul and wish ill upon your descendants.
posted by hincandenza at 2:26 PM on June 21, 2010 [7 favorites]


The myth of high-level math and programming being inseparable is a strangely pervasive one. You don't need to love math to be an employable programmer. You don't even need to be good at math. The type of math that goes with programming is more on the order of logic and problem-solving, not calculus and partial differential equations.

Of course, it depends on the particular programming field how much of that type of math might be necessary, and it depends on the employer how much they might think it's necessary to get through the interview process.

Long story short: You shouldn't need to love math to be an employable programmer, but I'm not guaranteeing you a job.
posted by ymendel at 2:27 PM on June 21, 2010


This may be good or bad news, but there's a lot of room for programmers who don't know math out in the industry. Remember the classic screed against imperative programming languages: "assignment statements and flow control statements routing between assignment statements" - no math in there.

If the above good news makes you feel bad, it may cheer you up to know that programming is a discipline which I think in the long run will make you love math. You can spend months or years working on a specific representation of a problem, then learn some math and watch your relatively complex OO approach condense down to a simple system of inequalities. Rather than saying you should know math to learn programming, you may just be one of the guys (like me) who is happiest learning math by doing programming (even if you don't intend to).
posted by doteatop at 2:29 PM on June 21, 2010 [1 favorite]


I've been a software developer for five years, and the most complicated math I've done is algebra - and even that is rare. I do more UI/web-type/shell scripts than algorithms/cryptography/graphics though, I assume the latter fields are more math-heavy.

What does help more in programming is back-of-the-envelope type estimations, like "on the worst case, if this line of code takes x milliseconds to run, and by reading this code it will run once for every line of input..." Discrete math covers pretty much everything I needed to know. As far as upper-division math, I don't even remember what I learned in those classes.
posted by meowzilla at 2:36 PM on June 21, 2010


I've been a working programmer for over 10 years. I think I did a "modulus" once. Other than that, the most I've ever done is add, subtract, multiply, and divide- stuff I knew by second grade.

At the relatively low level I (and most people who work in offices) do it, programming is far more related to logic than to math.

Which I realize ymendel just said more or less
posted by drjimmy11 at 2:37 PM on June 21, 2010 [1 favorite]


And by "low level" I mean "easy," which is actually "high level." Ha ha.
posted by drjimmy11 at 2:38 PM on June 21, 2010


I never liked math much in school. I hated getting whole problems wrong for forgetting to carry the one, I loathed tedious proofs, and pulled my hair out over interminable long division exercises. I never truly struggled, but my lack of enthusiasm had me second-guessing my choice to start as a computer science major.

However, after I started college I started into a different math world, one that clicked better with my brain. I learned to love statistics, combinatorics, number theory, logic, linear algebra. The tedious math sort of faded away and I was left with a set of sharp, well crafted tools.

I program almost everyday and I almost never use long division, calculus or trig, and certainly none of the parts of math that I always found scary or boring. However, I do use my sharp tools on a regular basis, sometimes to solve a programming problem, but more often to evaluate whether a solution is a correct one.

Computer Science isn't about finding the one right answer to a problem; it's more about breaking problems into pieces into pieces and solving them one by one. I'd say that someone who enjoys solving problems is better adapted than someone who is good at remembering and applying formulas.

So, yes, the advice to look at different areas of math is great. You'll be surprised at the stuff they didn't teach in high school.
posted by Alison at 2:47 PM on June 21, 2010 [1 favorite]


I have a math degree, and I just got my first job as a programmer. There won't be any math involved in my work, and many coworkers come from non-scientific backgrounds: Management, History, Environmental Science.. all programmers. You can definitely find a job. As others have said, overlap between math and programming surely exists, but in the real world, it's not prevalent.
posted by alligatorman at 2:51 PM on June 21, 2010


Doh.. Environmental Science is a scientific background, but you get what I mean.
posted by alligatorman at 2:53 PM on June 21, 2010


Yes.
posted by benzenedream at 2:59 PM on June 21, 2010


My understanding is that higher-level math and programming go hand-in-hand.

I would say that an acceptable statement is that higher-level math and higher-level programming go hand-in-hand. Where in this case higher-level programming is mainly abstract CS stuff, and not necessarily more difficult/useful/interesting programming.

I did a math undergrad, got a job programming, and I used my math all the time. But I was doing a lot of collaborative filtering stuff, where math is needed. And so there'll be things you can't do without more math. But they're few and far between, and you could definitely pick them up.

Mainly my math helped in learning to be incredibly formal and algorithmic in my solutions - checking every case, etc. But math isn't the only way to learn that, naturally.
posted by Lemurrhea at 3:23 PM on June 21, 2010


It's sometimes claimed that an ounce of mathematics is worth a pound of computer science. So, yeah, for some problems, knowing relevant math can be huge. For lots of other things that lots of programmers spend lots of time doing, not so much.

See here and here.
posted by Zed at 3:28 PM on June 21, 2010


I don't love math, and I was a successful programmer for many years before moving into technical translation. (And I'm still a happy programmer, just not for money any more.)
posted by Michael Roberts at 4:01 PM on June 21, 2010


Me too - I'm not a mathy person AT ALL, but I am highly analytical and I've always gotten statistics. I found my programming niche in health care informatics (my degree is MIS). If you're a troubleshooter by nature, you will be fine.
posted by smalls at 4:49 PM on June 21, 2010


Being good at math is correlated with being a good programmer, but I think it's not strictly necessary. I a good-but-not-great math student, but my career as a software engineer is doing well. I'm not afraid of math, but if I have a problem that requires a lot of math, I'll consult an expert in the field. That doesn't happen very often, though. What's more important is to think like a mathematician about programming-specific problems: What's the upper bound of the runtime of this algorithm? Can I prove to my satisfaction that these two functions do the same thing? And lots of intuitions about statistics. It's more puzzle-solving than algebraic manipulations, formal proofs, etc.

You won't be on the forefront of research, but then, that's a completely different career track than what you described. If you veer more towards workaday applications (as opposed to, say, machine learning) you'll be pretty far removed from anything you'd need calculus for.
posted by jewzilla at 6:19 PM on June 21, 2010


*I was a good-but-not-great math student.

Apparently I also a bad english student.
posted by jewzilla at 6:20 PM on June 21, 2010


Like others are saying, by and large, math is not a big factor in lots of programming. In some sense, an understanding of at least the idea limits from calculus is probably useful for figuring out how efficient something is going to be (as the size of the dataset grows, the speed or disk space required by your search/sort/whatever asymptotically approaches something... it's the whole big-O-notation thing, if you ever read an algorithms book). Some discrete math stuff is probably also useful, I guess, and if you're doing something really involved like physics simulations or crypto, you'd obviously need experience in the relevant area of math for what you're doing (probably calculus and linear algebra for the former, and, at a minimum, solid number theory for the latter), but if you're building websites, odds are you're not going to be calculating integrals or anything.
posted by andrewpendleton at 7:37 PM on June 21, 2010


Working with graphics, and generally any game programming, will require math. Cryptography too, obviously. Having avoided that, I've at most used used quasi-complex algebra, some trig, and realized once I needed some linear algebra. Most of my serious math has involved more Excel than anything. More important than math for general day-to-day programming is boolean algebra/logic - all that fun not-ing and and-ing and or-ing :) And if you can wrap your head around big-O, that'll be much better, if only because you'll be able to express to others how fast your stuff runs.

I think the correlation to math is more in the mind set that's required to be a good developer - to think logically, juggling a bunch of variables and concepts in your head, and working through problems in a systematic way.
posted by cgg at 7:49 PM on June 21, 2010


As others have mentioned, there are certain types of programming like crypto, quant and analytics where math is essential, but it's not all that important for the typical business applications programmer.

I have worked as a professional programmer for about the last 15 years, and although I am pretty good at math, I have only recently found it relevant to my job. I am currently developing engineering software for an aerospace firm, but we have mathematicians who handle the really hard stuff — they give me equations and proofs and I translate it into code.

My previous jobs were in the insurance and brokerage industries; perhaps surprisingly, these didn't require any math skills beyond what any liberal arts graduate might have.
posted by tomwheeler at 10:42 PM on June 21, 2010


When I was a professional programmer, on the rare times I needed math more complicated than 5th grade math I'd take a mathematician friend out to lunch in exchange for him doing my math homework for me.

I think over fifteen years that cost me around 6 lunches.
posted by Ookseer at 11:22 PM on June 21, 2010


Response by poster: Thanks for the answers, everybody. I appreciate it.

Now, hypothetically speaking, what would you say if I said my long-term focus (hopefully) would be audio, MIDI, and signal processing?
posted by lekvar at 1:14 AM on June 22, 2010


Now, hypothetically speaking, what would you say if I said my long-term focus (hopefully) would be audio, MIDI, and signal processing?

I would say that you will need a very great deal of math.
posted by atrazine at 2:56 AM on June 22, 2010


Now, hypothetically speaking, what would you say if I said my long-term focus (hopefully) would be audio, MIDI, and signal processing?

Math. Fourier Analysis-based stuff.
Just looking through my old academic calendar, you're going to eventually need:

Calculus (as a basis for everything that comes)
Intro to Mathematical Stats (once you hit the info theory you need it)
Analysis (more Real than Complex I think, but I'm not positive)
preferably but maybe not necessarily Differential Equations (leaning towards needed)
Fourier Series
Then the big one, Information Theory
You may want Source Coding and Quantization.

This list might be a bit overkill. But it also could be underinclusive - you might want some engineering stuff as well, depending on what you do.
posted by Lemurrhea at 5:47 AM on June 22, 2010


What atrazine and Lemurrhea said. That's one of the areas that actually is math-intensive.
posted by Zed at 11:51 AM on June 22, 2010


Response by poster: Curses.
posted by lekvar at 12:33 PM on June 22, 2010


« Older Crappy insurance for crappy teeth!   |   More Gifts of the Magi? Newer »
This thread is closed to new comments.