views:

1993

answers:

21

It has been discussed on this site before about the relationship between math and programming, and whether one is a subset of the other, etc.

In my recent study of programming, I've found myself more and more wishing I was better at math. You all know the scenario when programming books start to generalize something in a math way ("Therefore, we may say that for all <some single letter>, <lots of letters>"). My eyes glaze over in such situations. I know that that is mostly due to me being stupid, but it seems that if I could just improve my higher math skills, maybe I could get more out of such things.

Major question: Is math indeed something one can "get better at," or is your brain kinda either wired for it or not?

Important follow-up question: If the answer to the above is yes, then what are some ways to go about it?

+5  A: 

I'd say it's certainly something anyone can get better at. It takes time and patience and some texts are obscenely dense as far as the notation involved, but if you're willing to put the time in, I think it shouldn't be too horrible.

I'd check out Wikipedia's list of mathematical symbols, and keep if nearby whenever you see a large blob of symbols pop up. Translate them one at a time and put them together in the way that makes the most sense to you (or ask us a few times until you get the hang of it).

Chris Bunch
+1  A: 

study study study!

wikipedia is actually a fairly good math reference. start with something you're interested in learning and follow links until you understand all the building blocks for that initial thing.

Autoplectic
One thing I've noticed, is any wikipedia article on anything "mathy" seems to get quite advanced quite quickly -- I'm sure it's accurate and good stuff, but it does make it hard for simpletons like me
J Cooper
Somehow math formula and symbols doesn't match well with my brains.. almost like window's blue screen of death..
melaos
+2  A: 

Go to the local community college and sign up for Calculus 1. This covers functions in the mathematical sense, and has a rigorous refresher course on algebra, and will use just enough of the symbols to get you ahead.

Karl
If you are a programmer, discrete math is MUCH more useful than calculus. I would definitely start there.
Dana Robinson
I tend to agree with Dana, here.
Adeel Ansari
+4  A: 

It's both. You can get better at math. But you're also indeed limited/endowed by the particular wiring in your brain. What that means is that most likely you can improve your current mathematical skills. However, because of your mental hardware's limits, you may never discover a new theorem.

And when it comes to improving, I think the way as always is to practice. To read mathematical literature, to try to solve mathematical problems and eventually, develop an outlook where you are able to break, as a matter of habit, real-world conundrums you see before you down in mathematical terms.

As for programming's relation with mathematics, I think there's a pretty strong one. In fact, one could argue that a program is nothing but a proof of a theorem, the requirements document being all the inputs to the proof.

Frederick
+1 - It's definitely both. Your brain may be hardwired for a certain level of mathematical competency, but most never reach that limit for lack of trying.
romandas
+21  A: 

I think anyone can get better at math. You just have to be determined and practice.

Part of the problem is that math books tend to be written by mathematicians who ceased being math novices decades ago. What you want is books geared to your level and which contain material you can work with.

Some recommendations:

  • If you can find a copy, get Mathematica and a good book on it (the Schaum's outline is actually pretty good and cheap). I use it all the time to visualize things.

  • As a programmer, you probably want to aim more for discrete mathematics than calculus.

  • The Concrete Mathematics book mentioned elsewhere is excellent.

  • Most introductory discrete math texts have good coverage of the things like logic, sets, combinatorics, probability, graph theory, etc. My school used Rosen's text which I liked.

  • Linear algebra is useful if you are going to do 3D graphics programming. Most intro texts for engineers will teach you what you need to know. Linear Algebra Done Right is probably the best on "real" linear algebra if you want something more theoretical.

  • Look for books by Martin Gardner and play with his puzzles. He's an excellent writer and teacher.

Remember that math doesn't change that much. You can get used books for cheap on Amazon and in used bookstores. I always look for the n-1 version when I buy textbooks.

Dana Robinson
I would warn that using Mathematica doesn't teach you anything fundamental about understanding math...
Alex
No but you can test things and plot them to see if they work how you think. I used to TA math classes that used it as a teaching tool and the courseware was outstanding.
Dana Robinson
I've never used mathmatica, but I've used Matlab and Scilab. Scilab is a very similar to matlab and is free. It's a great tool for plotting functions and just over-all testing out various mathematical ideas. Plus it teaches you to vectorize your problem, and of course a bit of a paradigm shift makes your thinking process more flexible.
jhufford
+1  A: 

practice practice practice!

Schaum's outlines are good for this. If you're interested in probability (which touches on combinatorics), see 50 Challenging Problems in Probability.

yacdmnky
+6  A: 

I can share my experience...

I have been terrified of math since grade school. Hated it, didn't get the point, didn't pursue it.

By contrast, I have always been fascinated by computers. I study programming from a "need to know"- I can't stand not understanding computers and programming from the lowest to highest levels. I am almost completely self-educated, and have a career as a programmer/architect.

Last year, at my wife's urging, I began to go back to college. I signed up for a remedial Algebra class, knowing it was going to be a pain. It wasn't.

Somehow, through all the years of learning to develop OO software, it seemed that I had tricked myself into learning how to think mathematically. The concepts just weren't that difficult anymore. It may be that I had learned to think in terms of complex systems made up of smaller, less complex ideas.

I am now researching game development, and that is some seriously math-oriented programming. WAY more so than the business development I've been doing to this point. However, I don't find it so daunting because it's applied mathetmatics. Working to solve practical problems seems to make the study less tedious and far more interesting. I have found Wikipedia and Wolfram's Mathworld to be helpful. If you already know how to program, you're ahead of the game learning math.

Dave Swersky
+12  A: 

When you first started learning English all those "symbols" (letters) looked like gibberish to you. I'm sure that at some point you were frustrated over your lack of understanding. But slowly, and gradually you began to understand them.

Eventually you were able to construct your own words and sentences using these symbols. After being corrected on it's structure and grammar for years you now have a command of the language.

Math is just like that. Your eyes glaze over because you haven't learned the language. Maybe in school you didn't particularly enjoy math because you didn't see any practical applications for it. Certainly the way we teach math to our students is atrocious, so it is no wonder why many get through school without being well versed in it (for further reading, check out A Mathematician’s Lament which discusses how horrible our current method of teaching math is).

However, it is never too late to get up to a degree of proficiency that will allow you to read many academic Computer Science writings. Start out with Pre-Calculus at your local community college at night (to brush up on everything you have forgotten). Then move on to Calculus and after that take Discrete math. Honestly, this is all the math you will need 99.99% of the time. In less than 2-3 semesters you can be fully caught up and you'll no longer have your eyes glaze over when reading something with some mathematical roots.

Simucal
Quite an interesting read.
Paul Nathan
Calculus is not really necessary, and one can skip straight to discrete maths. Depending on one's domain, it's quite possible to be a programmer without "any of that continuous stuff". [One will have to learn the discrete analogues of much of it, though.]
ShreevatsaR
@ShreevatasaR, I find that I use Calculus a considerable bit. But again, it depends on what type of programming you do. Pre-calc (algebra + trig), Calc and Discrete will give a person enough Math to have their bases covered.
Simucal
The Mathematician's Lament is an amazing read.
Dana Robinson
Yea, it is the best and most entertaining document I have found on the subject
Simucal
+3  A: 

Studying math is like getting a classical education, one specially suited for programmers and other computer professions. And math's the sort of thing that you can appreciate more as you get older. You realize that it's not about grinding out answers so much as it's about thinking deeply and conceptually. The "answers" you might grind out make a lot more sense that way.

At one time, I would have recommended taking a geometry course, and take some time to learn how to prove theorems, see how the concepts flow together. These days, though, I'd say it may be better to take a course in discrete mathematics. It's much more practical, and there's a lot more variety, but there's still enough theory in there to make it challenging if you want.

Discrete math also provides you with programming challenges you might not have thought of before. Maybe you can hack up a good heuristic to solve an NP-complete problem, like an N-city Traveling Salesman problem. Maybe even come up with a couple solutions, and test which ones work best in which circumstances.

(I never took CompSci classes in college. You can probably tell.)

eksortso
+4  A: 

Your skills get rusty if not used and knowledge fades with time if not used. If you don't use your math skills you soon have no math skills. Continuous new learning and practice of the skills you already have will lead to you one day being a math/programming master.

Project Euler has lot of math problems that can only be solved through programming. The problems get more difficult but build on the skills and knowledge acquired in your previous solutions.

I also buy some interesting textbooks at second hand book shops. Their cheap and slowly your skills improve. I use them in conjunction with MIT Open Course ware.

Gerhard
+4  A: 

A fun way to practice math is http://projecteuler.net/. Although it's less systematic/effective than doing a course or reading a textbook.

Ronny
Found it, registered and puzzling frequently on it. Thank you!
BeowulfOF
+2  A: 

First of all, I would recommend Steve Yegge's Math For Programmers. It pretty much sums up your struggle.

And now I would like to tell a personal story. I was a double major in Math and CS. I learned a lot in the Math classes, but I honestly didn't appreciate it as much as I should have. I will tell you that a lot of things that I did have helped me in my programming career. And it's not about some formula or knowing calculus, or any of that stuff. It's that a solid Math background teaches you how to think in order to solve a problem. To me, that's the Math that you need.

Charles Graham
+4  A: 

I know exactly how you feel. I've always wanted to learn more Math, but as I was unable to do it at college after school (not enough space) and not able to take it at university (not able to with a CS degree) I'm still yet to study Math formally since the age of 16.

Math is something that anyone can learn. Some will argue that it gets harder with age but I've met people going on for 60 that are taking Math classes with ease. There's one woman at my university that's going on for 70 and she's a few months off of graduating with a degree in a Mathematics related field. If you want to learn Math then now is the right time, although I'll be the first person to say that it is not easy. Whilst you'll find many of the problems extremely easy with programming experience you'll still find that going through a set of problems takes a lot of time out of your day. I almost finished the MIT OpenCourseWare course on Linear Algebra, then ended up getting a new part-time job, working 10 hours a day, 7 days a week, and forgetting the majority of what I had learnt.

That being said, if you have the time and true dedication I can recommend some links to video lectures that may just help you get on your way.

I'm not saying that this is what you need to know. This is what I've set out to learn myself before I graduate from my CS degree, so feel free to pick and choose whatever you feel is best for you.

EnderMB
+2  A: 

1) Yes.

2) Explore mathematical questions which sound interesting. Buy/read books that give you the information needed. Repeat.

Paul Nathan
+1  A: 

Short answer:
There may be people who are to stupid to get good a maths. But those people generally are to stupid to program, too.

So if you have some skills in programming, you might consider yourself smart enough to learn maths as well.

Note: I know there are smart people with a serious math learning disability, but I think thats more like an exception.

Brian Schimmel
+2  A: 

It can absolutely be learned. I personally had the most benefit from the math (especially proof) courses I took in college.

Recommended courses:

  • Discrete Math
  • Mathematical Thought
  • Abstract Algebra
  • any other proof courses

Recommended book:

  • The Nuts and Bolts of Proofs, by Antonella Cupillari

I strongly recommend trying to take one or more of these courses at a school of some sort. Find a local college and audit a course.

Joshua McKinnon
+1  A: 

I would also recommend project euler While it does not exactly teach math, it gives you problems that you can then look up how to solve. I've always preferred solving actual problems instead of just learning theory.

Jim C
+2  A: 

A 2nd vote for Lockhart's "A Mathematician’s Lament", which recommends that math be taught like painting, poetry, or music -- not for it's practical usefulness but for simple pleasure:

There’s no ulterior practical purpose here. I’m just playing. That’s what math is— wondering, playing, amusing yourself with your imagination.

Look at the diagrams in a recent Knuth paper, Dancing Links, and tell me he wasn't having fun making those.

ja
+2  A: 

Part of the problem is that a few mathematical symbols convey a heck of a lot of information. If you are reading a normal programming book, it is full of words and code. Neither of these is super verbose (although I often have to slow down much more on code than normal words). However one complicated mathematical equation can easily be a screen full of programming code or words. We have all sorts of simple notations that convey complex processes.

Another issue is that notation is standardized but not exactly. Different books use slightly different notation so it takes a while to get used to it. Also many textbooks leave out key steps in mathematical proofs or even examples. Sometimes even college professors puzzle themselves with the missing steps in a given proof in a textbook and then give their own proof, or give a slightly modified one over the one in the book because they learned it differently or can't recreate the missing step exactly which takes the proof in a different direction.

So anyway just because your eyes glaze over doesn't mean you have to give up. The first time you see the equations you will probably be in read the english text mode and have to pause to consider them. Going over them slowly and paying attention to what all the symbols mean one step at a time may yield the answer for you. If there is some notation you haven't seen before, there is probably an intro chapter or appendix explaining the notation, so check there. Finally, look for other sources. Use google/wikipedia to look up equations for the concept and you may find a derivation and/or proof that you can follow. Additionally the other one may help you to understand the current proofs/derivations better. Even if your understanding of the proof/derivation does not improve, your additional research will probably aid in your understanding of the equation.

Cervo
+2  A: 

I think there are two things to learning math: 1. Learning the general techniques. Ie how to add two fractions, how to differentiate, integrate. 2. Learning to problem solve and apply math to the real world.

I think by picking up math textbooks yo will learn 1. Many math textbooks are organized by section where there will be a few pages showing you a technique and then a bunch of problems. The problems tend to be related to the technique that you just learned and very similar. Ie a section on logarithms will have all problems on logarithms and probably won't include any polynomials. By doing the problems in the section you will learn the techniques. The more problems you do the faster you will get and the more you will understand the concepts. Many times you will find if you work through the problems without explicitly memorizing the formulas, you will find that after you do enough the required formulas will be implicitly memorized. Ultimately if you are having trouble looking at probability formulas you will want to read a probability book. If you are having trouble with sum notation you will want to consult that section of an algebra book, etc...

To learn 2 I think math textbooks don't help as much because each section tends to have problems related to that section. Occasionally there are a few "mixed review" problems or a "chapter review" which mixes problems, but they are typically far in between. Science textbooks like Physics, Biology, Chemistry, etc. tend to be better for this. There you often read the problem, lay it out, and end up using a variety of mathematical tools to to solve it. Sometimes calculus, linear algebra, and geometry all within the same problem. The value here is that it teaches you to problem solve. Generally the SAT/GRE do not test if you know how to do Algebra, they test if you know how to apply it to the real world, and the science problems really help you here. Also programming in general is about problem solving and the better you get at problem solving the better you'll be at programming. Basically in programming you take problems, create a mental model, design a solution, and then model it in your programming language of choice. This is similar to say Physics. You look at the problem, extract a mathematical model, design a solution, right down some equations with the model of the solution, then plug numbers in. I highly recommend physics because after my college physics class word problems became simple for me and they used to be quite difficult (though not impossible).

In day to day programming you probably won't use more than algebra and logic (for if statements and loop conditions). There are some places that use high math like computer games, cryptology, data mining, etc. but for a typical business application you probably won't use more than algebra and logic and maybe a bit of set theory (the stuff so basic you already internalized it). Even in places that use high math (like financial companies) often the business users (or some industry literature) will have done the higher math and you will just need to implement the equations (with some algebra). I only mention this because most programming books don't have more than algebra and logic either, unless you are reading textbooks on Algorithm Analysis (Introduction to Algorithms), Artificial Intelligence, or some other research area. General application books on how to do things are usually short on math.

But depending upon what you are reading math can help. For most computer science algebra + discrete math should be enough. Couple that with some physics practice and you should be good to go. It may still be a slow go but you should have the proper background.

Cervo
+1  A: 

I like combinatorics and algorithms - having fun you learn faster.

kuszi