News for hackers. Stuff that matters.
Re:Programming is hard by RiderOfGiraffes on Wednesday October 20, 2010 @02:24PM (#1812203)
OK, here's a really biased point of view. The author says:

    It's OK to suck at math; you won't be using much anyway. 

    I'm not sure how this stereotype got instilled in
    me, but I'm slightly embarrassed to admit that I was
    surprised to discover how little math is involved in
    day-to-day programming, ...
That depends. The amazing thing is how knowing math can help in so many unexpected, tangential, apparently unconnected ways. Time and time again the guys I work with do stuff that would be easier if they knew more math. When I pair with them they frequently say that they wish tehy knew more math.

It's OK not to have a PhD, it's OK not to have a degree, but at least knowing about, and having a good, intuitive grasp of what goes on in topology, linear algebra, analysis, graph theory, game theory, logic and more is immeasureably useful.

Unless you're doing the kind of coding that really doesn't require design or algorithms or data structures or communications or database work.

I've never used stuff I did in my PhD, but time and time again, continuously (and I use the work correctly, I don't mean continually) I've used the stuff I learned on the way that enabled me to do my PhD.

Learn more math. It will be useful, even if only to give you the option of rigorous reasoning.

Re:Programming is hard by Xurinos on Wednesday October 20, 2010 @03:20PM (#1812588)
I agree with you. I find many reasons to know math during my career and in my programming hobbies. It is hard for me to ever take the statement seriously. We are not even talking about calculus here...

I surprised a fellow developer in the Dark Mists MUD by converting a table into a simple linear formula ("What should Y be when X is at this point in the range?"); this is grade school geometry, right? I just needed the formula for a line!

In my regular work, it is surprising how many times people do not understand the need for variance or standard deviation when they are looking for quality in averages of their data sets.

So web programming? If you have to put up charts of large data sets, things will get hairy without at least knowing how to interpolate the data points. A slow website may be a result of brute-force simplistic approaches in the code. Some of the packages we use (such as jQuery) require some good math knowledge to implement (example: drag-and-drop). We certainly cannot generalize that in web programming, it is acceptable to not know math.

You can get away with not using math in our industry if you leave it to others to do it for you.

Re:Programming is hard by cullenking on Wednesday October 20, 2010 @10:37PM (#1814056)
Spot on. You may not need math if you are working on very very standard boring things, or on some system level stuff. However, the moment you need to work with real data and do cool things with it, you are often left SOL without the ability to figure out the math.

Many people grab a scientific toolkit (psipy and the like), but understanding what a Gaussian filter is vs calling a function for it, does an immeasurable amount of good anytime you need to decide what your particular dataset needs.

Re:Programming is hard by nadam on Wednesday October 20, 2010 @04:38PM (#1812976)
I have been a programmer since I was a child, and I was also good at math, I won competitions, etc... But interestingly I was only interested in and good at discrete math. I loved mathematical logic, set theory, number theory, graph theory, algorithms, solving tricky logical problems. But I was not good at calculus. I did not understand why complex function theory is relevant and why I have to leran so much calculus. I now of course know some calculus, and already I don't hate it. But I still think that some part of math is not very cruical to a programmer, and some parts can help the programmer's abstract thinking. So I would change the kind of math which is taught for an average programmer.

The other thing is taste. If you are quite good at math you will like those jobs where math is involved. Unfortunatelly this can hurt if you have only have some mundane programming job. I certainly cannot use my theoretical knowledge at my job, I can only use it in side projects. I know a mathematician with orders of magnitudes bigger math knowledge than me: his taste is so abstract that even tasks which I find exciting are boring to him. His taste is so abstract that he is excited about only theoretical math reasearch. He is a researcher mathematician and he don't create any programs at all and his research is not really related to practical things.

I know programmers who have smaller math knowledge than me but are more passionate about their day job than me and perhaps they are even more productive for this reason at their day job (which is the same as mine.) Passion is more important than knowledge.

So if you want to be a good and happy web developer I think there IS something like too much math knowledge.

Re:Programming is hard by chipsy on Thursday October 21, 2010 @01:49AM (#1814440)
Interesting. I'm also very discrete-biased in my math background, perhaps because it lines up neatly with problems in digital computing. I never did well with calculus, but interestingly enough, my interest is more awakened now that I'm doing coding for a software synthesizer, which has to approximate continuous functions all the time(as sample buffers), and deal with the various distortions from said approximation that are taken care of "for free" in an analog environment.
Re:Programming is hard by feral on Wednesday October 20, 2010 @03:25PM (#1812612)
This is framed as a letter sent back through time to an earlier self.

I don't know what kind of programming the author does, but I was sending such a letter to myself, I would absolutely not say 'Its ok to suck at math'.

I'd be much more likely to tell myself: "Don't worry so much about learning about hardware specifics - spend lots of time on abstract math, it'll come in handy all sorts of places later".

Re:Programming is hard by CodeMage on Wednesday October 20, 2010 @03:29PM (#1812636)
He offers a clue: "[...] I was surprised to discover how little math is involved in day-to-day programming, especially for a web developer."
Re:Programming is hard by RiderOfGiraffes on Wednesday October 20, 2010 @03:47PM (#1812742)
Exactly, but if he doesn't know much math, and he does suck at math, and it doesn't think he uses it much in his day-to-day programming, he will think it's pretty useless. And he'd be wrong.

As commented in another reply:

   ... Never used more than a trivial amount of the math
   content, but the math processes of thought have been
   invaluable.
In spades.

How many people are crap at something, realise they can get along without it, and thereby conclude that it's useless? Most. It's like being incompetent and unaware of it. It's an unknown unknown.

Re:Programming is hard by jonhendry on Wednesday October 20, 2010 @11:22PM (#1814157)
"How many people are crap at something, realise they can get along without it, and thereby conclude that it's useless? Most. It's like being incompetent and unaware of it. It's an unknown unknown."

The reverse is also true. If you know a lot of math, you don't really know how you might have gotten along as a programmer without it.

You might know that you would have struggled at the mathy programming you have done, but you wouldn't necessarily know if you would have excelled at other kinds of programming despite a lack of math depth.

Re:Programming is hard by torme on Wednesday October 20, 2010 @05:54PM (#1813273)
I was pretty good at math in school, but I dont like math. Therefore I haven't focused on it.

I think your assumption is that people think like: I like programming. I'm bad at math. Math doesn't help my programming anyways.

Instead I think people think like: I like programming I'm bad at math, so I don't like it. I'm going to look at other fields to improve my programming.

I think the problem is, and the author hints at it, is that people tend to over glorify the importance of math at the expense of drowning out other fields, like prose.

In some fields like web programming, I would say that yes, my time is better spent learning how to write understandable code instead of how to solve complex equations. As a result, I probably won't ever program video games, but thats ok, games take a lot of math, and I wouldn't enjoy that anyways. It's not that I'm lazy and just don't want to get better at programming. I just want to get better at programming in ways that I enjoy the most.

With infinite time, I would certainly do it both.

Re:Programming is hard by RiderOfGiraffes on Thursday October 21, 2010 @04:34AM (#1814734)
And here we are again - same mis-conception:

    I would say that yes, my time is better spent learning
    how to write understandable code instead of how to
    solve complex equations.
Math isn't about solving complex equations. Common mis-conception, totally wrong, very understandable for those whose experience of math is limited to calculus or pre-calculus.

I don't solve complex equations, and yet I use math every day.

The problem I see is that people who might be really really good at advanced math are often completely turned off by high school math and the teaching thereof. Hence they never get the chance to see the really fun stuff that turns out to be useful in unexpected ways. Even more, I'd guess that the really good programmers who hate math are in that group.

I would so like to be able to test that hypothesis. There's a Ph.D. waiting in it.

Re:Programming is hard by torme on Thursday October 21, 2010 @11:07AM (#1815715)
This response is frustrating because I feel like you didn't read my comment, but instead honed in on a single phrase, "complex equations". Even in the context of that sentence that's a moot point. If you'd like, replace "solve complex equations" with what you consider to be the best, most useful, fun part about math, and it does not change my point. I'm sorry I chose an example that seems to have offended you, but I do understand that there's more to math than solving complex equations.

That said, to re-summarize my point tersely: If someone doesn't like a particular field, I still feel that they can be successful programmers by focusing on fields that they do like which are also useful.

Re:Programming is hard by MaysonL on Wednesday October 20, 2010 @03:04PM (#1812490)
I did enough math at college that complex data structures and algorithms were not at all scary. Recursion just reminded me of the infinite descending spiral of the ideals in Noetherian rings :) And working through the proofs of the equivalence of a dozen different versions of the axiom of choice helped me learn to reason about my programs. Never used more than a trivial amount of the math content, but the math processes of thought have been invaluable.
Re:Programming is hard by CodeMage on Wednesday October 20, 2010 @03:23PM (#1812605)
Recursion has always been my favorite example of how learning math helps understand programming. If you've ever proven something by induction, you should have no problem understanding recursion.
Re:Programming is hard by edanm on Wednesday October 20, 2010 @03:50PM (#1812765)
Honestly, I think most people who "prove" things using induction don't really understand what they're doing. Then again, most people don't really understand recursion either.
Re:Programming is hard by ent on Wednesday October 20, 2010 @07:52PM (#1813658)
This sounds more like a case of people not understanding what proving by induction is (and as a consequence, not doing so) rather than them proving by induction and and not understanding what they are doing.
Re:Programming is hard by tkahn6 on Wednesday October 20, 2010 @07:18PM (#1813554)
Honestly, I think most people who "prove" things using induction don't really understand what they're doing

Can you explain what you mean by this?

Re:Programming is hard by edanm on Wednesday October 20, 2010 @07:26PM (#1813584)
Sure.

In my experience, most people who go through math classes at a University, not to mention classes in High School, are mostly "blindly" following a template of how to do induction. They don't really understand the principle behind it, why it's a valid proof technique, etc. Put another way, if I used induction incorrectly, I could probably still trick them into thinking it's a valid proof because it looks like induction.

The same goes for a lot of things in Mathematics. The same also goes for recursion - most people don't really understand recursion (unless it's used at a "simple" level, like in Tree Recursion).

Re:Programming is hard by lmkg on Wednesday October 20, 2010 @08:27PM (#1813744)
> if I used induction incorrectly, I could probably still trick them into thinking it's a valid proof because it looks like induction.

You mean like this one?

http://en.wikipedia.org/wiki/All_horses_are_the_same_color

My college calculus professor used this example when she was teaching induction.

Re:Programming is hard by johnaspden on Thursday October 21, 2010 @06:11AM (#1814875)
Beautiful. Thank you.
Re:Programming is hard by jemfinch on Wednesday October 20, 2010 @10:46PM (#1814078)
That's a perfect demonstration of the difference between epistemic induction (unprovable) and mathematical induction (provable).
Re:Programming is hard by RiderOfGiraffes on Thursday October 21, 2010 @04:37AM (#1814736)
Er, actually it's not. It is mathematical induction, but with a broken case.
Re:Programming is hard by jdp23 on Wednesday October 20, 2010 @05:34PM (#1813203)
> I've never used stuff I did in my PhD, but time and time again, continuously (and I use the work correctly, I don't mean continually) I've used the stuff I learned on the way that enabled me to do my PhD.

One of the best software engineers I know has a law degree and says exactly the same thing. So I suspect that the same is likely to be true for anybody else who's gotten a PhD or other advanced degree.

Re:Programming is hard by johnaspden on Thursday October 21, 2010 @05:23AM (#1814796)
But law, maths, computer science, and weirdly, classics all appeal to the same minds. Are there examples of people with English Literature or History degrees who say the same?

I would have thought they would be more useful for the sorts of things that programmers are bad at, like dealing with, or in, lies and half-truths. And not be so good for the 'long chains of precise reasoning' type problems.

Of course, you might equally say that being able to handle the political side of life 'makes you a better programmer', but I don't think you'd mean it in the same way.

Ideally you'd want both.

Re:Programming is hard by jdp23 on Thursday October 21, 2010 @11:43AM (#1815924)
there's a big difference between "appeal to the same kind of mind" and "you should study this subject to become a better programmer"

and yes, I do mean that being able to handle the social side of life (including politics) makes you a better programmer in the same way.

agreed that you want both.