Let's just discuss this
Math. Computer science.
I found this quote on Google Groups:
"I think he asks this way because most to the programming curriculums that I
have seen seem to try to point out that all a programmer ever does is math.
In fact I have had professors tell me that unless I can handle Calculus I
will forever suck as a programmer. As far as I can tell, this sounds like
the general consensus of most CS professors at the larger schools for some
reasons. "
http://groups.google.com/group/comp.programming/browse_frm/thread/deebd5db93aa1b05/e9f109f104766965?tvc=1&q=what+math+is+used+in+computer+science&hl=en#e9f109f104766965
...
I feel compelled to study math because the interesting stuff, the theoretical, is discussed in terms of mathematics.
Not only that, I am really not very good at it, and I want to prove to myself I can do it.
Is it really going to help my career? Yes. It will give me the "street cred" with people who think like certain professors and employers who believe people who are good at math are somehow superstar programmers.
I enjoy math, too. It doesn't require study as much as practice. Which fits my personality to some degree.
My question is, then, of you who studied math, did it help you in your programming? If so, how?
I've not studied math, but I don't feel like that's been a hurdle. The hurdle for me has always been the architecting bit. How to structure programs that don't break down or become unmaintainable spaghetti as they grow.
That's exactly what Math teachs. To think logically and to structure everything because you will use later. I'm thinking in calculus as much as in logical reasoning, but yeah, math teachs you how to think and how to think in a proper manner. Like what Joel said about pointers.
I suppose you added the exactly for emphasis, but software architecting is not *exactly* mathematics.
Maths are very much like programming languages.
Take Geometry for instance...
You have keywords (theorems) that can be put together in various ways to solve a problem (proof).
It's taking a given set of concepts and applying them in particular ways to accomplish a desired end result.
It's almost exactly like programming. But people that think that about math are dead wrong.
For one, in my experience, math is not taught in a manner that it is useful to the programmer as a "train your brain" aid in the way it should be. It tends to only go so far as memorizing whatever the concept of the day is and applying it ad infinitum to meaningless problems. That is why, while I can do math, I've always hated it even though I do think it very much like programming, which I like.
Additionally, just because you can retain syntaxing, or even complex class structures, does not mean that you are at all talented at combining those bits and pieces to make things happen.
JoC
September 8th, 2006 4:38pm
>>Additionally, just because you can retain syntaxing, or even complex class structures, does not mean that you are at all talented at combining those bits and pieces to make things happen.
You can say exactly the same about Math. But if you think Math as just "i have to do this to approve the test" you are certainly wrong about the concept.
"applying it ad infinitum to meaningless problems."
Better put...
The problems tend to vary only in the specifics of the data. Everything I've been exposed to, there was an absolute minimal in the variance of application.
I think most college students would be capable of factoring a polynomial. But if you threw a real world problem at them where such factoring may come in handy, most would flop.
JoC
September 8th, 2006 4:42pm
That's more or less my point Masiosare.
Maybe I had sucky instructors in pretty much every instance. But math just isn't generally taught in the way that it would be at all useful to teh average programmer.
And any implication that you simply must know anything beyond (+,,*, and /) to be any good at the vast majority of programming is a fallacy.
JoC
September 8th, 2006 4:47pm
Then is a problem of the instruction, not the Math per se.
And as I stated before, I was not talking about Math tools, but the strong logical reasoning you get by solving problems. Think about Advanced Calculus or Linear Algebra. Those are not just formulae application, but a deeper thinking to solve problems by the "divide and conquer" concept.
Actually I think there is no better training for good programming than Math. You train your brain to get an specific result by applying the right steps in a good direction.
I studied math. Math to me is about proofs and patterns. The latter is helpful for software engineering. The former only a bit  s/w engineering is far more pragmatic than many mathematicians like. There is the goodenoughness provided by automated testing and the desire to have a drink Friday afternoons.
Imagine your boss waiting years and years for some nut wandering around in the Russian woods to finish his crazy work. Though I guess the boss would be happy when the nut refuses to cash his paycheck.
just me
September 8th, 2006 4:53pm
Ultimatly the logic is there only for the benfit of the computer and if you break any complex program down in to snippets, very few problems are really hard. If they are hard, break them down further.
The trouble begins when you have 1000 snippets, and that problem is, I dare claim, mostly psychological. The compiler can swallow a whole lot of spaghetti, but maintainers can't.
So the challange of most programming is to create of structure where in it is clear what code should go where and how the parts fit together, both to your self and to others.
I'm thinking that a couple of you never studied higher math. Math isn't about arithmetic, it's about exploring relationships between things, and doing it in a very structured and logical way. I've never seen any other field of study more applicable to programming. It infinitely more applicable than any of the intro programming classes that I took.
At bare mimimum, math stretches out your brain, makes you expand its capabilities. Kind of like lifting weights: it might not feel good at the time, but once you've completed it, you feel a lot better about your new capabilities.
If you haven't studied at least Calculus, you are missing wonders you can't even imagine, thing that will make your programming a lot more enjoyable.
Ohhh and shark asks to discuss this and leave?
That's why you never anything missy!
That's sharky. Hit & run.
The boss just asked me to write a customization at the last minute. Sorry. Gotta work now.
I'm thinking a couple of you keep redefining math.
Various commentators, _emphasis_ mine.
>> That's exactly what Math teachs. To think _logically_ and to structure everything because you will use later. I'm thinking in calculus as much as in _logical_ _reasoning_, but yeah, math teachs you _how to think_ and how to think in a proper manner
>> And as I stated before, I was not talking about Math tools, but the strong _logical reasoning_ you get by solving problems.
>> Math isn't about arithmetic, it's about exploring relationships between things, and doing it in a very structured and _logical_ way. I've never seen any other field of study more applicable to programming.
Or you study, hmm, I dunno, logic? Or reasoning? Not that math is a bad thing to study ...
Mongo
September 8th, 2006 5:22pm
"My question is, then, of you who studied math, did it help you in your programming? If so, how?"
Math has virtually nothing to do with programming. People I know who are really excellent in math are terrible programmers and viceversa.
Obviously, there's math in almost anything you do. If you're going to graphics, you need to know matrix math. Algorithms you need to know that Big 0. But that's really no different from any other subject area.. chemists and physicist need to know there own areas of math as well.
I don't do any more math than anyone else does in their jobs... the requirement is nonexistant. It's too bad such a fuss is made about math because it drives a lot of people away from computing science for no reason.
Wayne (AHA)
September 8th, 2006 7:16pm
If anything more people need to be driven away from the computing sciences. Regarding math, if you want to do something other than CRUD or infrastructure you need to know higher level math.
vincent d'onfrinio
September 8th, 2006 7:33pm
"Regarding math, if you want to do something other than CRUD or infrastructure you need to know higher level math."
(Vincent D'Onofrio was great as a serial killer in The Cell, by the way).
Every job that's interesting, including sound, graphics, cryptography, DSP, any engineering, any actual "discipline" in the area of comp sci, seems to require higher level math, above and beyond the first year of calculus.
I did graphics and I understood matrix manipulations just enough to build my operatoroverloaded classes and then I never thought about it again. There's a big difference between knowing Math and knowing enough math to pick up quickly what you need, encode it, and move on.
Wayne (AHA)
September 8th, 2006 8:41pm
"There's a big difference between knowing Math and knowing enough math to pick up quickly what you need, encode it, and move on."
That's great. You don't need a specific degree in a library/API to use it.
But would you know how to apply or write a new algorithm to process graphic data? Could you create the next ubiquitous compression algorithm? If someone wrote a paper with a new mathematical theory that has practical applications, can you see those practical applications and write your own API to implement it?
Seems sharky is talking job requirments rather than actual requirements. I agree that matrix math, as far as 3d graphics are concerned is easy enough to implment and forget.
Audio DSP is tricker, but it's still not something I'd go to college three years to learn. I wrote a VST synth in 4 weeks and most of that time went to learning the framework.
It had a oscillators with cubic interpolation, filters, waveshapers and envelopes.
...I designed the filters and waveshapers in my synth all on my own.
I suppose, Rock, the question is would you be allowed to use your DSP code in a project that someone else is paying for, without having the math diploma or equivalent.
I'm not saying you can't do that stuff; I don't know. I'm just that ignorant.
What I'm kind of asking is, would you get to even play in the game as a team member; will they even give you the ball, without substantial math background.
And yes, let us separate the actual math necessary from what the employers/investors want to see; I am sure the reality is very different from the perception in both cases.
By the way, if I had listened to my college professors, I would NEVER have bothered with programming. I simply started calculus too far away from my trig course. So when we started differentiating trig, I was lost.
Looking back, all I had to do was refresh my trig by reading a decent book on it. I was really naive and I thought everybody just already knew and I thought I was hopelessly behind so I stopped math after Calc II.
So I didn't know what vectors were (I didn't take Calc III, which was when they were introduced) and didn't get what the Physics prof was trying to teach, either.
I got all fucked up by lore, the "wisdom" of people I trusted, the myth of my own lack of brainpower, etc.
I drank the KoolAid.
Now that I'm older, I'm discovering the things I missed out and dismissed.
I always thought IT would be enough, but it just isn't. THe things I want to build, invent, understandI have to sit down and read the notation...
...remember, now that I have access to the internet, I can download any math book I want.
But which ones? There are so many. I admit I really need a teacher. Whereas I can selfstudy comp sci concepts, math selfstudy is almost impossible for me.
And math books pretty much suck. The few gems out there, I'm going to blog about as I go, so some other poor person doesn't have to go through this. The best math books are these hidden gems you have to dig for.
"...I designed the filters and waveshapers in my synth all on my own."
There are some great, easy to study DSP books out now. A few years ago, they simply did not exist. If you did this before 2000, I applaud you.
You must be pretty damn smart.
Maybe, maybe not. If the company wants to develop new algorithms, they will want a mathematician or a programmer with strong maths skills. That doesn't mean that all the other programmers in the world will "forever suck as programmers".
No this was last year. Plenty of good material around.
"Whereas I can selfstudy comp sci concepts, math selfstudy is almost impossible for me."
That's because the selfstudy of comp sci is generally fun but I never found anything terribly fun about math.
Wayne (AHA)
September 8th, 2006 9:17pm
Rock, I am totally with you on this. Let me share another bit of my experience in the work world: a runofthemill Israeli owned software company hired me as a sales engineer a few years ago. The software wasn't that difficultjust some VB code and a front end to a "secret algorithm".
This algorithm was able to consistently find the best route from point A to point B for delivery trucks. And if you gave it several points, say, a day's worth of deliveries, it gave you the best way to go and plotted the map, with directions.
This was a big deal in 2000. It was rumored that the algorithm was patented.
It was right about that time that I went through a bit of a career doldrum, where I realized I made some very poor assumptions about what I ought to be studying and learning. Sure enough, when I left that job, the next one was writing support apps for one of the first VOIP services, in Java. Let me tell you, they treated VERY WELL the software developer who wrote the code that processed the phone calls. The code probably didn't have a mathematical side (or if it did, I don't know) but the developer was a math geek.
Is this stuff difficult? Probably not. It usually seems difficult until you learn about it and then it is just like anything else.
But those experiences have shaped my perceptions a bit.
It's just hard to learn anything in a vaccume. Have a project with specific problems and learn by solving those problems.
It's generally easier to figure out how to do something than looking at something and figuring out what it's supposed to do.
I agree with Rock. You're trying to fill the prerequisites before you know what you're doing. Project first, knowledge second. It's much easier to learn something when it isn't just random but rather needed to find some solution to what you are working on. Applying it practically also tends to make things make a lot more sense.
Wayne (AHA)
September 8th, 2006 9:24pm
(Folks, I'm just as convinced that people who know how to write goodgreat UI for CRUD apps can be just as wealthy/rich/important/successful.)
"looking at something and figuring out what it's supposed to do."
That's my job *exactly*. Whee!
> My question is, then, of you who studied math,
> did it help you in your programming?
Fuck no and no.
Professors talk about math so they don't have to worry about the hard work of creating software.
son of parnas
September 8th, 2006 9:49pm
Excellent, vincent.
Thank you very much.
I should mention my first real job after obtaining my BA was working at a software company that sold statistics software. The stats geeks were royalty.
Hmmm. That makes at least three companies I've worked for that relied on a heavy mathematical basis to survive.
Perhaps I have some, um, bias.
By the way, I don't know what you want to do with DSP, but I'll have to say it was one of those subjects I thought would be far more interesting than it actually is.
In my opinion, the only way to really learn it is to find a specific problem you are interested in (in my case, audio effects) and work from there.
Trying to learn it in the abstract is tough because it is so damn BORING.
vincent d'onfrinio
September 8th, 2006 10:13pm
"In my opinion, the only way to really learn it is to find a specific problem you are interested in (in my case, audio effects) and work from there."
I can't really take the time to learn it now, I have so much reading on my plate. But I wanted to understand how you would make a camera pick up your movement and then move a character on the screen. I ran into DSP as a possible solution, so I read a teeny bit about it. I still don't know if DSP is required for such, but it was mentioned by a company that does this kind of computer/human interaction.
I assume movement in real life is analog, and you have to translate to digital, thus, DSP solution.
I was amusing myself with a motion detector this morning. If I moved my arm fast, even with a whole motion, it wouldn't go off. But if I made a "quick" movement with my whole body, it would go off. Good enough gets the job done.
My take is most things of worth took time. Not so much that there was some ubergeeklord tricky equation solved, but just a whole lot of interconnected things that were good enough to get the job done. Value is something that adds up, IMHO, it's not so much a trickshot. Just like I know that experience has been the most invaluable tool in improving my chess, more than talent, ability, and skill even.
I know the "Not" stuff from DeMorgan's theorem, which we use in our programming, a coworker showed me it. But that Math post you posted the other night, that book sounded as dry as sandpaper. It's still all 1's and 0's when you get down to it, you just build from there.
LinuxOrBust
September 8th, 2006 10:36pm
"that book sounded as dry as sandpaper. "
I enjoy proofs which we are also learning about.
Most people think programming is boring, too.
Or Sudoku. I would rather do math problems than Sudoku, for instance.
I've got a PLC with me I brought from work w/my bosses permission. Kinda cool, I can program in ladder logic right now, and I don't need to be a math genius. ;D
I've been coding PLC stuff, most of it just our basic stuff, for the last two days. Just picking up a few more things here and there every day. That's what it seems to come down to, picking up a few more bits here and there every day, from a broad array of interelated parts and programs, and knowledge of how it's applied by the customer.
LinuxOrBust
September 8th, 2006 11:03pm
I can enjoy rigorous subject matter, but I guess with math I tend to look at what am I going to get out of it. I took quite a few math classes, repeated a lot of them below calculus, and even dropped Calculus twice.
It was right when I started to grok it that I dropped Calculus in Jr. College the second time (only stuck with it for a few weeks), but that was good enough for me because I realized that the homework problems were such that yeah if it wasn't my hobby it would have been. Math is *the* most timeconsuming college subject for me, the homework is.
LinuxOrBust
September 8th, 2006 11:08pm
I agree with what Wayne says.
Sathy asked about math in a previous thread.
http://www.crazyontap.com/topic.php?TopicId=10320&Posts=13
What I feel is you and Sathy love to learn math and use that knowledge to do programming based on the knowledge. But you shouldn't come up with reasons that math will help which will justify time spent learning math. That way, I feel that it's putting the cart before the horse.
vincent says that it's a fun hobby for him. Knowing math he says you don't need much of it to do DSP too. The self study guides he refers to shouldn't take up, say, a couple of months at most to finish and that would be ok to spend that time.
Saying that math helps see patterns and all is fine. But it's not the only subject that helps you see patterns. If you draw analogies one can come up with a theory saying music is math, that Beethoven symphonies when looked at followed series like Fibonacci series, etc and on and on.
I feel Joel makes much ado about pointers. What about people who have never used pointers in life and started with a different language? There are plenty of them and there will be more in the future. There should be a way to make out if someone has raw intelligence and that's the crux.
Again one can't be sure what learns will be useful. But at least the chances should be more if you want it to be useful. Else, you should be sure that it's a hobby you are pursuing for its own sake.
Senthilnathan N.S.
September 9th, 2006 1:01am
So don't study math, Senthil.
What I'm saying is, I don't think anyone is trying to justify learning math. I think the question is more about whether math knowledge will leverage your career, your programming knowledge, or neither.
One does not necessarily need a degree to apply higher math to a programming problem. You do need the degree in math to do it for a salary.
I have already explained why I'm biased in the direction of math as a good study option for people who already have a lot of programming experience: if you don't have a degree in it, you won't be taken seriously for positions/opportunies/jobs that let you do fun stuff like write the APIs all of us use so we can avoid math.
If you are just studying comp sciwhy bother with math? Because the books that are interesting are shrouded in math detail. On the other hand, you can decipher it on your own without going to school. But now you have nothing to show for it except for a fun hobby.
I was looking at the Bookyard book, Logic Programming and Prolog. The earlier PLCs my co. used were Prolog based, although it's very expensive now because it's near extinct.
Anyway, supposing you knew all the author knew about writing in some cryptic formulaic logic fashion, one benefit could be proving the value of an algorithm.
Logic programming is not quite like regular programming, it's better to get your proof right than to prove it by debugging it because sometimes it's like you can't debug it by errortrapping. Most normal programs debugging is of simple to nearsimple logical outcomes. When you are purely programming in logic every little thing you do just about is another possible branch. Possibly lots of variables and outcomes involved, so proving in your mind or on paper is what you must resort to.
Books on normal programming tell you how to errortrap your way through it. Kind of the lazyman's logic way, find out by seeing the results first.
LinuxOrBust
September 9th, 2006 2:14am
Two things:
The self study guide I mentioned, "All the Mathematics you missed" will not take a couple months, as S.N.S stated. It is not a selfcontained guide. It is a metaguide to the math subjects you probably know about already, gives an overview of the ideas you should understand, provides a few problems, but mostly points to other books you should read. If you actually did everything the book recommends it would probably take 2 years.
The second thing is that I don't agree with AHA or SNS but I'm not sure if I agree with Shark either. A math degree certainly didn't do shit for my career. If I didn't know how to program beforehand, I would have been some hopeless grade school teacher. However it has let me work on things other than the boring crap most programmers do day in and day out and I generally have a good time doing it. So if your goal is to do more interesting work I think more math is always the way to go. But I suppose it depends on what you consider interesting.
vincent d'onfrinio
September 9th, 2006 2:23am
I don't find most things involving math and computers all that interesting but I think I'm alone in this topic with that opinion.
I build software that connects with people, not numbers.
Wayne (AHA)
September 9th, 2006 2:28am
I'm all for studying math. I find it interesting. I'll be happy if it would really help me become a better developer. But I think that it's in a different league and that what would be required as far as software engineering work is concerned should just be at most scratching the surface. If there's more help available there I'm unable to see it after I've seen the work that happens in software.
sharkfish  I just felt that you were more inclined with learning math for its own sake. I'm sorry if I incorrectly assumed so.
As far as the DSP stuff I guess I've been grossly incorrect in the time it would take to learn it. Two years is also fine. But I keep thinking what after that.
The main reason why I think this way is I see a lot of people doing well without even reading a lot about software engineering per se. What is relatively difficult is usually internalized in the langauge constructs or libraries. I'm even sceptical if learning design patterns or similar topics would help. It looks like it would but I can't see how as people who don't do it also seem to do pretty well.
I work on SharePoint and InfoPath now. I have worked in VB 6.0. New stuff had to be learnt when .NET came. It wasn't any difficult. Nor was SharePoint or InfoPath. I code in C#. Class design is like the 3NF in database design. The usual getter, setter, etc. If I need patterns, I download code from the net and modify them as it is needed for me. Tinkering with SharePoint/InfoPath and the new advances in them seems to me to be something which would help me rather than learning math now. I feel that it should somehow make a magnitude of difference. That usually happens because I've went some wrong way somewhere and learnt because of experience. If someone takes 2 days to do something I might do it an hour or so.
Data structures are really helpful. We did a database design and it required lots of code. I read Wirth's data structures and in the opening chapter he discussed different ways of doing the design and in one of them made a remark that such a design would take lots of code. It was a very basic observation. That was great. I read about math too. May be there are patterns which would help but I haven't been able to relate with anything that I've worked.
I feel that it's in a way like the diminishing returns they talk about in economics. At least if it is running that I have to do to even stay in the same place it's fine. If you can do it without math making much of a difference is it worth it is my question.
Senthilnathan N.S.
September 9th, 2006 10:40am
But Senthil, that's exactly my point. The real work isnt in learning Sharepoint, or some framework. That takes at most, days.
Maths won't teach you how to follow a conversion, nor will it teach you how to deal with all the tiny details you need to design and understand to write our software since they are mostly not designed mathematically.
And not all maths are useful for a programmer.
Most of Calculas I & II are NOT useful. The only useful piece are sequences, series and limits.
Math education in university is a mess: why Calculas I & II are required? They are not useful for nonengineers.
If you look at the book, beyond Linear Algebra and Real Anaysis, you could skip all of the middle and continue at Combinatoric and Probabilities and Algorithms :)
Rick Zeng/Tseng
September 9th, 2006 4:04pm
"Calculas I & II"
Weren't they like emperors or something?
