Math And The Computer Science Major
An anonymous reader writes "What sort of math are CS majors expected to take? Why are these classes useful? Does programming really have that much to do with math? Lineman.Net has published an article that answers these questions and more. If you are considering a CS degree, be sure to give it a look and make sure you are taking steps to prepare for your college career."
...demand more math than others. Artificial intelligence techniques, for example.
And what the article said about game programming is right on... trying writing even a simple Brickout clone without knowing basic trigonometry and you'll run into problems.
The Army reading list
As a student graduating (June) from a CS similar degree, I take this opportunity to warn/help inform others about such fields.
:-)
If you truly love programming and want to code for a living, do NOT attend such Universities as DeVry, many State Universities, or other small "tech" schools. This may sound like common sense to some, and outright madness to others, but trust me on this one. I personally am about to graduate from DeVry, and, although it's surprising reputation, they in no way prepare a student to enter the world of programming. The majority (I'd say 70%) of the skills I've obtained have been acquired by means of self-teaching and learning from friends.
More and more, I've been seeing that "programming" degrees focus much more on the management side of things, instead of the developer role. Perhaps this is because of the apparent problem of off shoring IT jobs? The main problem is not that the Universities have changed to this approach, it lies in the fact that the said schools teach in such a manner, WITHOUT advertising so. It brings about a sense of deceit and trickery...but perhaps that's what they were going for?
01000001 01011001 01000010 01000001 01000010 01010100 01010101
we have to know math because the math majors cant program, usually. as a programmer, youll have to work with NUMEROUS different people from all sorts of other fields. you might be designing heat control systems, biochem simulation software, or electronic simulation software like me. the more you know the better in this field, i think.
use your turn signal! you people act like it's divulging information to the enemy
Not entirely unrelated question about high school math: A couple of weeks ago I was out with my little brother who recently turned 18 for a beer and to shoot pool. He was having trouble making shots so I said "Imagine the table is a large sheet of graph paper when you plan your angles and shots." he said "I've never used graph paper."
He's graduating from Grade 12 this year, am I just a relic[0]? What do schools use now to teach geometry? I hope it's not all done on a computer, the practical hands-on stuff is invaluable.
[0] I'm 38; mom died in '82, dad remarried and could still get wood.
Trolling is a art,
I am an engineer working with programmers and one of the biggest issues I have is getting them to implement some of the complex math in their code. Many struggle with it and that is a huge problem.
Evolution or ID?
Coding is not as important a part of computer science as you may think it is. CS is full of theorems and proofs. Computer science is the science of making algorithms more efficient. Programming is about implementing algorithms.
At my school, Xavier University, Math and Computer Science are a single department. It makes sense, though - the study Languages and Automata is an extremely mathematical pursuit, but it's also very important to Computer Science. The same could be said of any number of different CS related topics.
My blog
Useful?! You can't do anything without it. You can't study graphics without maths. You can't study 3d graphics and simulation without quite advanced maths. You can't study audio without maths. You can't study just about anything in computer science without maths.
Only a Mickey Mouse comp sci course would not require maths to quite a high standard.
Excpect everything up to calculus 3, and possibly physics which is a calculus class in disguise They have litte or nothing to do with programming, Most of what you will learn in colledge has little to do with anything.
Neural Nets store their information in matrices of varying dimensions. Without knowing how to manipulate them, you'll be in a world of pain.
How else are you going to figure out how much money to ask for in Rupees? ($1USD = 44.5641 Rupees as of this morning)
programming != computer science
if you think programming is all there's to computer science, then don't study computer science.
..i never want to touch their code. usually it lacks basic logic. the programmer/designer usually does not have a good grasp on other mathematical concepts either. this is true for even simple business logic. the code is usually inefficient...in my experience anyway. the math really helps you to deal with thousands of processes working together, as well as potentially avoiding deadlock by looking at things on a grand logical scale. again, just my experience. take the math.
Perhaps the most related, useful, but most underappreciated related discipline is statistics. Of all the non-CS classes I took, stats is the most relevant to my day-to-day life. For example, doing analysis of performance and tuning software system, I often see people use bogus statistical analysis, and making mistakes based on those results. Even if your curriculum doesn't require it, I would highly recommend taking a stats class or two.
I usually thought of it as the difference between learning how to program vs memorizing a bunch of useful code snippets and how to translate them to different languages.
You are in a maze of twisted little posts, all alike.
Let's assume that you are well versed in Trig and Algebra (you should have learned them both in HS). Take, at minimum:
Discrete Mathematics (some call it Applied Mathematics)
Calculus
Number Theory (Cryptography)
Linear Algebra
I have a CS degree with a math minor and have been completely surprised at how often I've used the math portion of my education in the workplace. I'd recommend taking a good mathematical modeling course as well, as it typically offers a great mix of math, engineering, and CS.
As with many things you do, you can do it quite a while without getting heavily into math, but when you deepen yourself you have to understand math and master it to a certain extent. For several years I did quite a lot of sw development without really using math, but when later starting my PhD I would have been lost without math. Programs are math. Every program can be converted to lambda calculus which is a mathematical expression form. Programs are art, as well as math can be seen as, and... programs are literary work. A certain story or idea can be expressed in many ways, without changing he actual idea behind the program. This is also the reason why software can not and should not be patentable, as it is now within USPTO (due to an old mistake...).
Most people don't ever use mathematics much more complicated than basic arithmatic, so why do we have to take it in school? Math isn't about math; it's about thinking. Complicated problem teach impressionable young minds how to tackle problems logically, using what you know to be true to determine what you do not. I happened to love it (of course), but a lot of kids were always complaining about how they were never going use Modus Ponens in life. Turns out they were very wrong...
For my BS in Comp Sci (1992 U of Wisconsin), I had to take 18 credits of math, and achieve a B average in those courses. The 18 credits comprised:
Calculus 1: 5 credits
Calculus 2: 5 credits
Calculus 3: 5 credits
Matrix Algebra: 3 credits
Although the University offered minors, my college (the college of letters & sciences) did not. If they had, I would have taken the remaining two credits in order to get the minor in math.
IMHO, the assistance that math has provided me has been invaluable in my career. NOT because I use calculus on a day to day basis, but because it forced me to develop critical and systematic thinking skills. And THAT has been invaluable. At the time I hated it, but in retrospect it was really good.
$.02.
Key to financial independence: Spend less than you earn. Save and invest the difference. Do it for a long time.
I have found that Philosophy, especially Logic, is also very applicable to Computer Science. It has been especially useful in relational database design and development.
The SCIENCE of programming requires math. The art of programming may not. There is a distinction. That is why the lawyer in the next office over from me was able to put together a fairly good system to manaage his office and case load in a 5GL but couldn't truley understand the difference between a quick sort and a bubble sort. Of course, almost no one writes sorting algorithms any more. If you are writing a program that utilizes mathmatics to accomplish a goal ( e.g. the matrix algebra used in 3D graphics development ) it is not the programming that requires the math it is the problem space. The thing to remember is that, in a way, when you are studying computer science you are not learning how to program you are learning how to learn to program. Now and Information Systems degree would be more about learning to program and leaving it at that.
More than anything else, higher math teaches you how to solve problems.
How to approach complexity step by step and break it down into manageable pieces.
How to deal with abstraction.
How to THINK.
Anyone who is an accomplished programmer will appreciate these skills.
It is by no means the only way to learn this, it just seems to work. If you can master higher math, you can usually pick up programming.
First I just want to say that computer science programs are not all created equal. There are definately less schools who teach it well than those who dont.
Now for math, personally I was required to take a fair number of courses during my first and second year. While I didnt find it all relevant to CS, there definately are reasons to take math courses to help you in CS. Proving runtimes is mainly math, encryption is mainly math, etc.
Also, I just want to make a note that CS != programming. You take a 4 month course to "learn to program", and you take a 4 year program to begin learning computer science.
[I can picture a world without war, without hate. I can picture us attacking that world, because they'd never expect it]
The rest of the world is filled with mono-educated outsourcing fodder that have crammed a narrowly-targetted CS education into as short a time as possible, memorizing syntax and call center protocols. The best possible insurance of future employability for someone considering CS is to add something else to your curriculum to expand your horizons. Math is certainly one likely candidate, but some other excellent combinations are CS and Music, CS and the Humanitites, CS and Foreign Languages, or CS and English. The suggestion is somewhat counter-intuitive. Most CS majors will frown on your interest in the Humanities. Exactly. Set yourself apart. Study what you are interested in, distinguish yourself from the pack, and seek an advantage through challenging, broad study.
Inorder to do anything useful with 3D graphics, you will definitely need knowledge of linear algebra. Whats important for CS students is the application only, but understanding the theory is always a definite plus. Also, an aptitude for physics is also very important inorder to simulate reality. You may want to check out 3D Math Primer for Graphics and Game Development by Fletcher Dunn.
Wow, are you sure about this tough guy? If you want to be a programmer that does nothing but hack java code for your run of the mill application, sure you don't need any math. But if you want to do somthing USEFUL in the CS field (research, grad work, etc.) you cannot DO WITHOUT the math.
College is not a vocational school, although that many would argue that DeVry is a vocation school.
College is supposed to teach you how to think & learn... it's become a necessity since US secondary schools are so malfunctional. Your college classes should give you a base of knowledge about whatever you are studying, and the rest is up to you.
The reason that top schools like MIT are top schools is that they force their students to explore and learn new things. If you are a serious student, you can come away with a good education from almost any school.
Conformity is the jailer of freedom and enemy of growth. -JFK
I find that the math courses I took in college had about as much relevance to the comp sci courses I was taking as the comp sci courses themselves had to the actual work I do as a computer programmer.
On the one end of the spectrum is pure theory, and proof, and on the other hand, we have complete practice, and "get it done now".
Math is a great theoretical background for computing, and made some of the algorithmic courses a breeze.
Ironically, I found the proofs in algorithms classes an attempt by computer scientists to say "see, we are a real discipline, we do proofs too", but I found that I wanted the CS courses to be a counter to all of the proofs and theory I got in my math courses. I wanted some "hands on" learning.
Once I got out in the real world, especially with languages like Java, even the CS theory/practice (this is a hash table, now write one), I found that most of the data structures/algorithmic stuff had been written and I just filled in pieces.
Where am I going with this? I guess basically that math is useful for comprehension in CS classes, but depending on the programming you do, you may not even use the CS you learn in the real world, let alone the math. But understanding is good.
Rhymes that keep their secrets will unfold behind the clouds.There upon the rainbow is the answer to a neverending story
From the article:
If you have the chance to take calculus in high school, I may surprise you with my advice. I would not automatically jump at the opportunity for a couple reasons. Please forgive me as I climb onto my soapbox, but keep in mind that I am a math teacher and I know a lot of this from experience.
First, high school calculus teachers tend to be the teachers in the math department the longest. The problem with this is that while these teachers are more experienced, they have been away from calculus longer than the other math teachers in most cases. Besides that, these teachers are often near retirement and may not be as motivated as younger teachers.
Second, calculus is the upper-crust of high school math. In college, it's one of the lowest math classes offered. This results in a completely different teacher mentality. A college calculus teacher will be used to working with struggling students because for many of them, that is the toughest class they will ever have to take. But high school calculus teachers will be more used to working with the top students in the school. If you aren't especially gifted in math, you may find that you don't get what you need from these teachers.
Here's the problem with those ideas:
1) In Calc I in HS, you're looking at a class of 30 people. 50, max. In Calc I in college, you'll likely be in a class with something on the order of 100-200 people. See, *everybody* takes Calc I their first year, not just the comp. sci's. All engineering majors, all the math geeks.. Hell, even English majors probably have basic math as a requirement... So most of the time, it's a big class, usually a seminar type of deal. If you're having a hard time with it in there, then you'll also likely need to take another not-for-credit class where they can give individual instruction or take some extra tutoring on the side. Whereas in high school, you've not only got a smaller class, you've got an experienced math teacher, who likely knows his stuff, and you've got a year to learn it as opposed to 1 semester only. Okay, so the HS teacher may be less motivated, but you've got a longer time period, a smaller class, and you're in that class with the top students in the school (who can probably help you out somewhat) instead of in there with everybody in the whole school (who likely need just as much help as you do).
2) Yes, calculus is the upper crust of high school math. It's also a heck of a lot easier than a college level math class. But here's a thought: The high school class doesn't usually count towards your college GPA, while the college level one does. What's so bad about taking it twice? Take the high school calc if you can swing it, then take it again in college. You may still have a hard time in the college calculus, but it'll be somewhat easier because you've got at least some background to it already.
- Give a man a fire and he's warm for a day, but set him on fire and he's warm for the rest of his life.
I think the question that should be asked instead is `Does computer science really have that much to do with programming'? I mean, I'm graduating in EE this year and I sure didn't choose this major because I wanted to learn how to solder -- that's the technician's job, you know.
I repeatedly question the reasoning of others in becoming a CS major if all they want to be is a code monkey.
Join the NFSNET. Our prime goal is making little numbers out of big ones. http://www.nfsnet.org/
I don't use any advanced math in my day to day programming job, but solving math problems uses the same type of thinking as solving many programming problems.
Basically, if you're having problems solving differential equation problems, you're never going to be able to really conceptualize what
MyClass **p;
means. Its why you see people start to struggle when they try to use STL, and have just memorized the syntax instead of knowing whats it means.
Excellent article. I like the line, you need to come to grips with one important fact first: computer science has more to do with math than computers. I couldn't agree more, and this is something that many freshman CS majors need to realize quickly.
Heh, I just finished my CS Masters which included a class on Advanced Neural Networks (SVMs and classifiers).
You would not believe how much math is involved! There was one proof in a whitepaper I read that used calculus, algebra, trig, linear algebra, and geometry. In one proof!
My recommendation: take all the math you can. Make sure you take linear algebra (vectors/matrices), trigonometry, calculus, probability, statistics, and anything else that looks interesting.
Why does a CS major need math? Let's see:
Graphics engines - trig, geometry
Physics engines - Calculus, trig
AI - Statistics, probability, calculus, linear algebra
Basic GUIs - Geometry, algebra
Networking - Statistics, linear algebra
And of course, you can't do ANY of the above without algebra.
Another interesting quote: If you have the chance to take calculus in high school, I may surprise you with my advice. I would not automatically jump at the opportunity for a couple reasons. I think I agree on this one. You're going to start at ground zero when you take Calc I in college. So use high school to become badass proficient in algebra and trig.
"You cannot find out which view is the right one by science in the ordinary sense." - C.S. Lewis on Intelligent Design
Computer Science, in spite of popular opinion, is not programming. It's the science of computation. This is a MAJOR misconception that causes nearly 75% of CS students to drop out in the first year.
At Indiana University (granted it's a liberal arts college), I learned more about theorems, thesis, mathematics and logic than I did any language. For example, I learned the Church-Turing thesis but not how to make a GUI. The first year of my CS degree was spent entirely in Chez Scheme (a derivation of LISP) for the explicit reason to teach us computation, not languages.
If you want to learn how to write something stupid for your enterprise (as Linus says), get a IS or IT degree. If you want to learn what a flip-flop is, how to stack circuits to do multiplication or what recursion is, get a CS degree. Those who detest Von Newman matrices need not apply.
Taking theoretical computer science classes may seem like a waste of time, but I highly recommend it if for no other reason than because you're not going to learn this stuff on the job or on your own. Taking an extra class on object oriented programming or databases instead may be tempting, but you can teach yourself most of what you need to know about these. Take advantage of the time you have in a university and learn about the logical foundations of your field. For those who love computing, it's an experience which you won't forget!
What sort of math are CS majors expected to take? Why are these classes useful? Does programming really have that much to do with math?
The fact that the second and third questions are even asked in a serious (or semi-serious) way reflects a sad state. How can you do any "real" programming without knowing Boolean algebra, theory of computation, integer math, algorithms, etc.
Without knowing the underlying math, how can you understand the logical and arithmetic operations that your CPU can perform? How can you understand whether a given task is solvable? How can you understand how much time a solution should take so that you can compare it to how long it is actually taking?
Ok, rant over.
Recently a "nuclear scientist" (the guy was a nut) was rather disparaging of Computer Sciences in an open forum. (Made the standard comments about "not a REAL science", blah, blah). He then went on to claim that in his younger days he had built the earliest computer cluster and that the software he wrote was so powerful that the cluster could have scaled up to infinity.
:-)
Suffice it to say, it felt really good to throw Amdahl's Law at him and call *bullshit*. He didn't talk to me after that.
Javascript + Nintendo DSi = DSiCade
I've always thought of CS as a branch of math. The field of computer science was founded by mathematicians, and the important concepts of computer science are heavily based in math (such as the study of algorithms and data structures).
That being said, I don't think of CS as majoring in programming, it's more about the theory behind programming. Kind of like the relationship between physics and engineering. Students may not always learn the most practical details about programming, but they will come away with a good understanding of how computers and software work (assuming they went through a good program).
The new IS majors that are out there might be a better choice if you want to focus on just high level programming. It could be a good choice for people who want to learn the practical skills, while computer science will exist for those who want to learn the science behind computers.
I am a math and computer science professor; I teach both types of classes. And I feel very strongly that computer science majors must learn to do proofs. And not fakey set identity proofs that they teach in Discrete. I mean real proofs from an axiom system like graph theory, abstract algebra, or analysis (pick one).
Why? Because in my experience, exposure to axiomatic systems greatly improves abstraction and critical reasoning. I teach a "bridge class" (what we call them these days since high schoolers are typically unprepared for math beyond calculus these days) which presents an axiomatic approach to linear orders and the topology on that line. Many students take this class before Data Structures and they remark that it makes the distinction between Interface and Implementation much easier for them (especially since search algorithms are all on various linear orders). They also know how to design APIs cleanly without having to write the program first.
The point I am trying to make is that you should not just take math because of the techniques you learn from it. (This is anecdotal, but) When I was at graduate school at Cornell, almost every math major I met who started programming after taking a lot of math classes was a stronger programmer than anyone who started programming first.
It really depends on what you're doing. I tend to think of programming as split into two groups:
Computer Science programming - embedded, drivers, algorithms, etc...
Business programming - This involves moving regular data between buckets. Math isn't so important as common sense. Both seem to be in short supply.
It's been my experience that CS majors can perform well doing either. But there are other skills necessary for business programming that will allow a mediocre programmer to produce excellent work (such as knowing the business or being a wiz with SQL).
I speak from the perspective of a math major who does business programming. I work with a lot of other people who do just great but occasionally run into a brick wall when some strange math comes up. These tasks come up only rarely. The most common place to see a math weakness manifest itself is when they foolishly matrix a couple sets of data and everything grinds to a stop. Even that is easily fixed (as long as they tested full sets of data before going into production). The only time I've *had* to be involved was implementing some probability and statistics packages.
All things being equal, I'd take the guy with math. It means he can think, comprehend written works and probably has a good sense of when his numbers add up (very useful in business programming).
t
My take on discrete math, as a former wannabe mathematician, is that the high school math curriculum is just enough to get you to calculus and all the extra has been squeezed out. Lots of material in the realm of discrete math is accessible to a high school student.
In addition, many of the techniques and methods, like difference equations, parallel those in calculus, so it can reinforce what you've learned in calculus.
Finally, as to the author's point about calculus in high school, I think he's way overgeneralizing about the quality of high school calculus teachers. My cousin, a professional mathematician, recommended that I retake calculus in college. She said that she hadn't really understood calculus until advanced calculus in grad school! Having been down that path myself, I can see this - calculus is such a different way of thinking than its predecessors in the typical high school curriculum.
Ya know...maybe it's just my field (computational biology), or the fact that I've been in school for far too long, but the more I code, and the more math that I use, the more I see the two as different faces of the same beast.
You don't have look at much interesting software before you realize that the difficult problems -- the ones that are fun to solve -- are inherently mathematical. And conversely, once you start seeing programming languages as expressions of underlying mathematical forms, they start to become very similar to one another. And I'm not even referring to bleeding-edge research code, either -- look at P2P networking, and you're staring into the eyes of a massive, graph theory problem.
Anyone can write a shell script. Very few people can express mathematical concepts in code.
Let's try not to let fact interfere with our speculation here, OK?
This is all so true. I am a computer science major at the Tufts School of Engineering, and the math requirement is huge. I appreciate it though, and I am seeing all the time that the more comfortable I am with math, the more clever and efficient my solutions to large computing problems becomes. Math is the basis of computer science. It allows us to *compute*, which is the obvious origin of computer science. The function of these machines is to process computative operations, and Math is the tool by which we can understand these things, and engineer new more efficient ways to perform them. CS without math is nonsense, who proposed that anyway???
sigSEGV - doy!
The particular class I took was one of a pair; mine was 2/3 probability and 1/3 statistics. The twin class was 2/3 statistics and 1/3 probability. Either version would have worked in the end, but I suspect most engineers find probability more interesting.
Take them if you can find them, even if you have to go to another school to do so.
sPh
Modded "flamebait" but it's a good point. DeVry, ITT Tech, Phoenix U and so on have questionable standards. Why? Because their main purpose is to separate students from money, not teaching. I think that even a more or less unknown state college is better, at least their mandate is to teach, not separate money from the marks. The parent also mentions that he thinks these schools primarily teach management, and that is certainly true of Phoenix, who's primary clientele is management looking for the coveted Masters so as to be able to move on to tenured PHB status.
"Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
OK, fine. So you can program.
What does any of that have to do with Computer Science?
When Daniel Hillis, founder of Thinking Machines, and all around brain-wave, first went to MIT, he asked AI guru Marvin Minsky what he should study. Minsky said, "Study math, because that way, everything you learn will still be true in 10 years." I've been a software engineer for 8 years, and majored in math in college. I had some disadvantages starting off in trying to convince companies to hire me as a programmer, but once I had that critical one year of experience, the math degree has only been an advantage. Moreover, if you are the math guru where you work, you get to be the hero and alpha geek all the time. My sole regret in taking math? That I didn't take more.
"Math is vital to computer science"
Well, it's certainly important sometimes, possibly often. I used a lot of math writing a conversion library for 3D file formats, but not so much writing a user system in php.
Learning to think is what's really important. I got my first software job by explaining at the interview that my skills were in complex problem solving -- skill they had trouble teaching straight CS people they had hired.
"You really dont need much maths to write a shopping cart applications"
Possibly not, but... I taught applied calculus at a university for many years as a grad student and I always loved it when students asked me "When we I ever use this?". A seemingly silly question to ask in an APPLIED Calculus class to be sure, but the most important use was always that if payed attention, the course would give them problem solving and thinking skills that would help them advance in whatever field they chose. Bottom line: After school you may not remember the Fundamental Theorem of Calculus, but the thinking skills will be invaluable.
The US doesn't have as many CS folks around anymore.
I was a CS major for one year back in the Summer 2001 through Spring 2002. It was quite enjoyable, though difficult. I quit because of all of the math classes. I was not looking to be a computer hardware engineer, but in what I want to do (business oriented, non-entertainment software) there is less of a use for advanced mathematics.
Sure, math is still important. I don't deny that. I'm saying that I am not going to be writing the next Photoshop (yay vector manipulation!) or video game with the "most realistic phyics yet."
Maybe it is because I've never ever liked math (except for geometry/trig) but that was my weakness in CS. Now I'm a liberal studies major, though I am a service technician for a major computer company now. Oh, sweet irony!
Computer Science was actually under the Faculty of Mathematics. So while I was majoring in CS, I had to satisfy all the requirements for a 4 year math degree. I ended up with an Honours Bachelor of Mathematics in Computer Science.
I remember thinking what an odd situation this was in first year. But, as time went on, it made more and more sense. The math turned me into a great problem-solver and honed my analytical skills. When programming tasks were given to me, I didn't think about which lines of code to use, I thought about the problem itself and how best to describe it, simplify it, and abstract it.
I always save my last mod point to mod up a good troll. You people are too serious.
If you want to be a programmer, a real hardcore programmer, you should major in something other than CS, and then minor, or perhaps double major in computers. I would suggest this to most people. Sure, there are reason to be a pure CS major, but think about the degree you have. Physics, Chemistry, Biology and Mathematics don't change nearly as quickly as Computers do, so your degree will be worth more longer. Plus, once the IT field hits rock bottom, you can simply move into the field of your degree. My cousin is a senior at NJIT, and he told me this straight up. I never went to college for programming, I just kind of picked it up along the way.
Th
If you drop the coding part of CS and focus exclusively on the theory, then fill in the rest with math and physics, I daresay that the result will be far better coding skills than if you focus on coding and throw in math and physics and theory as an afterthought.
The reason is because math is a formal language, just like any programming language. Except math is far more expressive and complicated than any programming language. We handle the complexity by writing functions and abstractions to simplify it. However, in order to abstract, we have to dot all of our i's and cross all of our t's and lay out the law on when the abstraction will or will not work. Sounds familiar?
The beautiful part is that there is no compiler and no test suite you can run against your "programs". You have to do it all in your head. If programmers were able to better predict the behavior of their programs, or if they were to write their programs in such a way that it could be done, then we would have far fewer bugs, or at least debugging would be easier to do.
So, if you are a pro at math and physics, then programming languages is a toy to you.
Why physics, and not just math? Math is programming for programming's sake. Physics is programming tied to reality in some way. Or in other words, you are practically applying the discoveries mathematicians make, and fudging stuff they haven't discovered yet, all in the interest of getting an answer that agrees with the way stuff really is. Physics adds that dimension of "reality" that is inescapable, just like real programming has the shadow of the "user" or "API" or such that is inescapable and must match what people want to see.
There is one area that math and physics won't teach you, but it is easy enough to pick up as it is a rather simple system compared to, say, Thermodynamics or Quantum Mechanics. That is the way computers really work and the limitations thereof. This is the field of data modelling, data theory, B-Trees, and hashes and stuff, or the details about the various hacks people have come up with to stick mathematics into this system.
The radical sect of Islam would either see you dead or "reverted" to Islam.
Should I be scared that my first thought was an image of a nerdy math-type hunched over an HP calculator and unleasing PI=2.7 on the internet.
"I've done it! I've successfully hacked math!
1 0wnZ0rd j00 Py7h4g0r4z!"
Anonymous Kev
Proudly posting as AC since 1997
(Finally got a dang account in 2004)
You and your new-fangled Cartesian co-ordinate system. Why, back in Euclid's day we just had points, straight lines and circles, and we were grateful!
I went through a computer science undergrad which was part of the math faculty. As such, about a third of my courses were in math... not CS, math.
At first, I thought along the same lines as many of you. Unless I got into some hardcore graphics coding, I never thought I'd use half of what I was learning. And you know what? I was right.
However, what took me a while to realize is that this conclusion does not make math courses a waste. Those math courses, full of really tough proofs and theorems, tought me how to think. Every single day I use the thought patterns that I learned in my math courses to perform my programming job much better than if I had not been exposed to those math courses.
Were the math courses hard as hell? Damn straight! Were they worth it? Definitely :)
As someone who just graduated with both a CS and a Mathematics degree, I would say any (good) CS program is going to require a few semesters of Calculus, a semester of Linear Algebra, some sort of Numerical Analysis class, and a Discrete Math course. Most of these would probably be of the computational/applied variety - e.g., not proof-based. Since I am a Math guy, I would add a second semester of Discrete Math, personally. Maybe one being proof-based and one more applied.
That said, personally I think CS majors should have a strong math background (the Calculus gives you that) but the only relevant Math, unless you are doing something specialized with a specific requirement, is what you learn in a Discrete Math course (what some programs actually call "Math for CS Majors" or similar).
While I was an undergraduate I was first a math major and then switched over to computer science. When I got there, I was shocked by how much the other CS majors around me despised mathematics. After observing this behavior for some time and thinking about it, I have realized what the real issue is.
In the past, Computer Scientists really were scientists of computing, but now there is a new niche: commercial programming. Many people who want to be commercial programmers end up in the Computer Science major but have no interest in the theoretical aspects of computing. They just want their degree and their job. I think that the modern trends in commercial programming require a new approach. If you just want to be a programmer, a computer science degree is going to annoy you with lots of math and computing theory.
After working in the commercial programming world I have come up with a new analogy. Programmers are to Computer Scientists as construction workers are to engineers. One is a trade, one is a science, and we should stop lumping them together at the higher education level.
Does programming really have that much to do with math?
I see or hear this question all of the time in relationship to a degree in computer science. The short answer is:
You can make a living at programming without knowing much about math. Most programmers can get along with some basic algebra skills, and understanding boolean logic.
The long answer is that the question asked in the context of a discussion of computer science shows a lack of understanding of what the field of computer science is. Computer science is not about java or c# or sql. Computer science is about understanding and analyzing why a computer acts a certain way given a certain set of conditions. It is about understanding the best way of instructing a computer to perform tasks. Its about knowing that a computer cannot perform certain tasks no matter how well it is programmed. What does this have to do with math. All of the tasks I mentioned are addressable with some mathematical analysis. A computer scientist will write a program to demonstrate a concept or test a theory. A computer scientist will not write a program to do inventory controll for walmart, unless there is some novel or interesting problems in that task that no one has tackled before. In general someone graduating with a cs degree is well versed in theory, and will have to catch up on the practical aspect of the field. For example, I graduated with a CS degree having only seen one Design Specification Document. I now deal with them every day.
There are many trade schools out there that will give you training in a group of technologies (c#, sql, java, html) and call it a computer science degree. The best of these schools turn out software engineers (a very good skillset to have) the worst of these schools turn out people who are capable of passing a cetrification exam and that is it. In general these guys (the software engineers)can jump right into the business of writing software much more easily than someone with a straight cs degree. However the devry graduates tend to have trouble designing and understanding larger systems, and the ramifications of their decisions within those systems. I find this due to the lack of theoretical underpinnings to their education.
Don't get me wrong. I'm not saying every trade school graduate is not capable of dealing with and analyzing large system analysis. I'm just sayind that in my experience that these graduates come out a little less well equiped for the task. And yes I know several CS graduates who are dundering idiots, so you don't have to tell me about your experience with one.
When I want your opinion I will beat it out of you.
Just to know what makes a good program involves quite a bit of math. Nothing made the speed of nested loops clearer to me than this. Basically, it lets us define the best worst and median cases of general types of code with very simplistic functions.
O(1) - loopless program
O(N) - One loop from 0 to N
O(N^2) - One loop from 0 to N with another loop nested in it that is from 0 to N
So, the length and basically anything that is only executed once is considered inconsequential. It also shed light on is a stupid question.
Coincidentally (no it's not a coincidence), the number of CS sutdents that change their majors to something else during the first year is about 40%.
George II -- Spreading Freedom and American values, one bomb at a time.
I don't know about your experience, but I find that post bachelor research in CS to be between 5 and 20 years ahead of industry. Some of the research goes no where, but some becomes the bleeding edge, then the mainstream. Like relational databases. Started (or first written up) as a paper in 1969. If you want to see where theory hits programming, check out game development. That is where most of the new technologies first hit development and get used successfully (the game may suck, but it becomes a showcase for some new techniques). Writing code for the TMS320 (a single chip digital signal processor) is an excercise in math: you spend more time modeling the code in Matlab than you do turning the code into C or assembly.
I am also finding that graphs (not those blasted pie charts) can be useful in solving complicated problems. And some of the tasks to do, can be described with names like traveling salesman problem or minimum spanning tree. One of the first shocks I ever got in a meeting full of programmers was having to spend most of it explaining graphing algorithms and why algorithm X would solve the problem and why the proposed solution in the meeting would be a bad one. It would be hard to correctly, or quickly, solve a minimum spanning tree problem if you could not recognize it, nor understand what the algorithms were trying to solve. Education is about learning to solve problems and recognizing new situations resembling a problem you already know how to solve. Being uneducated is like only having a hammer to solve problems: you can only fix things by bashing them, good for nails, but not a good tool to use to remove screws and bolts.
It is also fun to explain to the PHB why something he asks for is totally impossible. Usually it is headbangingly painful. .1 cannot be represented as a floating point number, but that ended up being a waste of time. Or how, to answer a question he had would require a time machine.
Him: This number must be absolutely accurate, no rounding is allowed.
Me: I can write 2 numbers on your notepad here that cannot be represented the way you describe.
Him: BS, there ain't no such animal.
Me: (writing) e and pi.
Him: (scowling).
I once tried to explain how
Our society does not value intelligence, and has been actively disparaging intellectuals for 200+ years. Our country may have been founded by intellectuals, but de Tocqueville pointed out the disparagement of intellectuals back in 1835 in Democracy in America.
(1) You can always code better, if you know more about the problem you're coding to.
(2) Every domain will in some ways be impacted by mathematics.
Therefore (by 1 and 2), more math skills will almost always make you better equipped to understand any given problem domain, and will almost always make you a better programmer.
And that's just computer programming; there are parts of Computer Science that have nothing to do with programming computers, but have everything to do with logic and math.
Education is the silver bullet.
Being a mathematician won't make the switch go off that allows you to expertly use object oriented programming. Nor will it help you create a good GUI. Nor will it help you validate date formats. You need a firm grasp on the math you learned in middle school, but the need to be a mathematician has diminished in many computer science workplaces to the point that the "need" is now a simple "added bonus".
When coding was entirely procedural and focused almost entirely on crunching numbers, well, yes, math was a big deal, but the paradigm's changed greatly now. Now aptitude in pure logic [rather than a broad math bkgd, much less pure calc] is much more important in my experience. Relational database design and object oriented programming require great understanding of set theory, not calculus. I AP'ed into sophomore calculus and had two semesters (plus an audit of DiffEQ) in college, and haven't used that stuff once since entering the workplace (on my sixth year).
When I look to interview and hire new programmers to my team, for pure intellectual skills I'm looking at good coding style, properly factored (as in refactoring) coding examples, and the ability to explain, say, why an example database schema is or isn't in good third normal form. The math I've seen in my tasks is very basic, whether the product I've helped develop was a simple web-based MIS, county-wide tax system, or financial tracker for the largest non-profits.
In fact the only time it's been useful for me to understand mathematical concepts [beyond set theory] was when I thought our resident Geographic Information Systems (GIS) experts weren't considering all the ends and outs of different map projections. Even then, what I was commenting on was well outside of my job description of a database admin.
It's good to know math, all other things equal, but in today's programming workplace, the emphasis on math in CS programs is unfounded. I'll even daresay that's why so mnay people who weren't schooled as programmers do so well -- I know about as many programmers that have impressed me with their proverbial skillz that had a degree in the humanities or no degree at all as I do those with a CS background.
Wake up & catch up, CS programs, and teach what's useful in "the real world"!
It's all 0s and 1s. Or it's not.
Proof?
For what it's worth, the best software developers I've ever met all had a good math background. The better the background, the better quality work done by the software developer. The worse the background, the worse the quality of the software.
Writing a high quality, very solid program is quite similar to proving a theorem by construction.
A good mathemetician covers every single possibility when proving a theorem and leaves nothing out.
Similarly, a good programmer covers every single contingency in his software. As a result, the software runs and it runs correctly.
I took CS in college and remain somewhat bitter at the experience. The heavy emphasis on mathematics drove me away after two years.
I have now been professionally writing business software for about eight years, and in that time I have never used mathematics more complex than arithmetic and very basic algebra.
I do, however, use my English skills on a daily basis. I have to write documentation and communicate with clients. I have to explain things to non-programmers and I have to translate business speak to techs.
I have to understand the workings of business. My software exists to make businesses more efficient. If I do not understand the real world processes, I cannot improve them with software.
When I took CS, they acted as if we were scientists and would all get heavily algorithmic signal processing jobs or some such theoretical crap. The reality is that 99% of us end up in the business world helping people make more money.
It sickens me that CS is churning out people who took calculus but know absolutely nothing about the business world in which they will most likely be working.
I had to take:
Calculus I
Calculus II
Calculus III
Discrete Math
Advanced Mathmatics for Engineering
Numerical Analysis I
Numerical Analysis II
Numerical Analysis actually has programming projects and I can see using many of the algorithms in "real-world" situations. Discrete Math obviously has uses. Advanced Mathmatics for Engineering also has obvious CS related topics. The only math courses that I probably won't ever use in programming are my Calculus classes. However, the other math courses listed above are all built off calculus so you had to take them.
P.S. If all you want to do is write average-joe database connections, perhaps CIS would be a better major rather than CS.
-
90% of the jobs out there are development positions. These require basic programming skills, understanding of the newest buzz technology and an eye for asthetics.
-
10% of the jobs are computer science jobs. These usually entail designing/optimizing algorithms or interfacing with "sciency" types like engineers(gasp), physicists and chemists.
A good COMPUTER SCIENCE degree is designed to prepare you for 10% category. If what you want to do is build java apps and database applications then go to college and learn those skills instead of all of the theory involved in a CS degree.My Numerical Analysis final is in 30 minutes. Can you explain the whole predictor-corrector thing? Cuz' I'm lost.
You want the truthiness? You can't handle the truthiness!
from there, there're cool things like "modern math", and then you should go deep--way deep: two semesters of linear algebra, graph theory, set theory, algebra, real analysis, numerical methods, mathematical logic, ohh, right, and some more calculus... as a computer science graduate student, I'm hating my self for not taking these classes as undergraduate. (well, or for taking them and not remembering too much) It's all very very useful!!
Or.. well, it should not. A lot of the responses here mirror the main conception I came across while in University. "Everyone" wants to go to University, but they really just want to learn skills easily acquired at a trade school (not that there's anything wrong with that.) Engineering or CS (notice, it isn't called Computer Programming) majors should be embarrassed to be heard complaining about learning theory. How do you think people figure out new applications? There are entire countries full of hungry people who technically, know how to program. How are you better if that's all you know, too? My assumption is that the people complaining about theory simply find it too hard to understand. Though, the complainers are right, in a way, we don't need that many folks graduating from University. They should just be in some tech school. Oh, and the more mathematics you know, the better. How come most people don't get the fact that since math is just a big glob of abstract structures, you can take different parts and apply them to any application you want?
p
No question, there is a TON of math required for computer science, but if you're into computers it shouldn't be too difficult, as long as you actual read your assignments, unlike myself who coded until late in the night instead.
The one mistake I felt I've made is not taking enough business courses. I'm not saying to take the CIS route, as that skimps on the math, but now that I'm in the real world I find programmers are often called upon to make real business decisions, even sometimes inappropriate ones for the position.
In a world where many US jobs are being outsourced to India and I'm sure others soon, there will be less/no available junior level jobs that pay anything. I don't have a problem with this, but that means that for a lot of us to maintain our comfortable standard of living, we will need to come up with the ideas and forge business relationships, rather than just implementing the ideas.
As an individual with a B.S. in Computer Science I find all this negativity towards CS Majors absurd. If you are considering a B.S. in Computer Science you have to decide what you enjoy doing. Do you enjoy programming, solving problems, implementing solutions that require in depth technical knowledge of how both hardware and software function, etc? Or are you more of a customer service related, implement technology solutions with knowledge of how hardware and software interact, and want to concentrate on using pre-existing software apps to provdide solutions? Obviously, this is just the tip of the iceberg in deciding MIS and C.S. A lot of my friends from school loved doing web programming (HTML, XML, some applets, and web design), but hated the whole theoretical aspect of computer science. If you can't take the theory and its inter-relation with math then you should go MIS.
Computer Science is itself inherent to math. You can't really separate the two. Sure you can implement all these solutions with A+, Network+, CCNA, MSCE, but how much do you really understand about truly optimizing performance. What about tailoring apps to employers requirements? Cost/benefit analysis of code? Sure, all that helps, but your not really implementing a complete solution just by setting up a network and providing support. There's so much more to it and that's where the theory, programming, and math come in.
Sure you can get by without the math and theory, but how are you going to implement better solutions and design without them? Even with a loose understanding, CS majors have a skillset and problem solving ability that IT majors just don't have. A good question for potential CS majors would be can you make a contribution to the linux development community? If not, maybe you should concentrate on getting an MIS or minoring in IS with a major in business or another field of interest to improve your marketability.
In the end I guess it comes down to each person's ability and interests. Math is inherent to computer science, but focuses on better development and better development techniques while understanding the underlying structure of systems. If you don't want to understand this underlying strucutre and don't care about innovation and theory then stick with IT. IT is innovative, but is more system functionality and maintenance rather than optimization, efficiency, development, and extensibility.
Sure.
There is math in carpentry too, but you don't need to attend college to be a brilliant carpenter.
SQL is all about learning the constraints of data i/o and organization. Claiming it is steeped in Set Theory makes it sound a lot more complicated than it is. Sure there are aspects of it that will help, but you could learn all of Set Theory or just learn the one specific instance of that database. Practical experience and common sense will help you more than Set Theory.
Of course, I'm talking about SQL from a programmer's point of view. This usually assumes the database is already made. In this situation I'll take the person with industry experience and SQL skills over the person with SQL skills and Set Theory (Learning Set Theory does have an opportunity cost, you know).
Anyhow, my point was that there are vast areas where very mundane programming is done that don't require real math (good math skills always help though). So much of business programming fits into the business way of doing things. Like running something once a day that looks up a list of data and sends notifications to the people on that list. Simple, simple stuff that needs tobe done and can be done well by a plain coder. It is the coder that understands the business logic (hey, they don't need a notification *every* day, except in California where it is required by law, unless they are a private entity) that will excel. There are numerous positions for whole careers for these kinds of programmers. I tend to think of this kind of position as a translator, where his foreign language is "computer".
One little caveat to what I'm saying. I'm saying there is room for programmers who don't have formal math skills. I'm not saying having no math skills is beneficial. The fact is that the people who have what it takes to be good at programming tend to gravitate toward college and formal math. This means that it is uncommon for a really skilled person not to have pursued math. There is a glut of people without a clue doing the job right now that would disprove my point, if my point was "people without math skills make good programmers".
t
I graduated with a double major in Computer Science and Math. I now work as a software engineer in a large defense company. Many people interchange the terms Computer Science and programming. These terms are not interchangeable. Computer Science is the theory which provides the building blocks that programmers use (often with no underlying knowledge of what is going on). The act of programming really falls more into the term Software Engineering.
Computer Science is theory. In most fields, the theoretical people make heavy use of math. The same is true in Computer Science. Algorithm and development is inextricably linked dependant on math. So if the question is "Does CS have that much to do with math?", the answer is a resounding yes.
Programming or Software Engineering arguably doesn't have as much to do with math. As other posts mention, there are programming/software engineering jobs that use little to no math. However, there are a very large number of jobs that need math. Whether you have one of these jobs or not, you can still benefit from having taken more math.
The issue is not that you took a class that taught you how to do the math that you need to accomplish the job. The issue is the critical thinking skills that math develops. When I started my software engineering job after graduating, the first project that I was assigned to required lots of math that I had never seen in school even though I was a math major. I was able to do the work not because of something I learned, but because of the critical thinking and logical reasoning skills that my math classes had helped develop. My math background also gave me a familiarity with the basic mathematical tools that I needed.
There will always be new problems that school has not prepared you for. If you go to school to learn how to solve the problems you will encounter in the workplace, then you are in for a big surprise. The important thing to get out of school is the ability to think critically and learn new concepts.
There are a lot of great threads in this discussion. For the most part I am firmly in the "math is good" part. The more types, the better. The barest, most essential minimum is actually often taught in the Philosophy departments of universities: Logic. A thorough grounding in logic is essential to being a good programmer. And I don't merely mean being able to throw together a chain of ands and ors that work, but being able to optomize logical expressions to find the most compact and efficient expression possible. I can't think of a single kind of programming that doesn't benefit from a fairly deep knowledge of symbolic logic.
Beyond that, various mathematical disciplines have different levels of demand based on the work being done. I'm largely excluded from the world of real-time 3D graphics because I never went beyond the basics of the math that underlies it. (Some of the most terrifying evil geniuses I know are guys who can not only do all the math involved in projections and rotations, but can also implement it using only integer math -- they scare me!)
You'd better have your logic (deep) and at least your algebra, pre-calculus, calculus, geometry (with trig). From there, every bit of math you learn broadens you and gives you the potential to see solutions your competitors (other job applicants) might not see.
This is the value of all education: Having more knowledge at your fingertips is the rich soil that grows insights. I know a lot of people who think they they can use an Internet connection and Google and they are "programmers." To some extent, this is true. But you can't look for things you can't imagine or remember. Information and knowledge are not the same things.
I don't limit this to math education either. Even history, music, literature, biology, chemistry, physics, and philosophy can provide the mind with the possibility of new ideas. Anyone looking for "the easy path" through education to a job is short changing himself. University time is the time to wallow in the sea of human learning. The goal is to be an educated person, not a unit of productivity fitted to a particular cog in the great machine of industry. We make and use machines for our rote tasks. Your goal in education (to me) is to become maximally adaptable: to achieve cerebral fitness.
In other words, I think this question is the wrong question.
The most rewarding math class I took in college was called "Advanced Calculus" where we basically proved why everything in calculus works, start at a very low level. The thinking required for making proofs is very close to the thinking required for making algorithms...only much more defined. I'd highly recommend getting a background in writing mathematical proofs.
And I think everyone on the planet should take simple probability and estimation courses. People are really clueless when it comes to estimation. Like if I asked how many hairs are on your head...I don't expect the right number...but there are logical ways you could come within an order of magnitude or two. Just simple things like this are useful every day. Estimation is good just for a simple check if your numbers are even in the ballpark. Or just trying to judge how far away something is. People seem to think that a smart person is someone who knows everything..but its more a person who knows how to figure out anything...whether it be by looking in books or asking a friend for help.
-Stype
Bus error -- driver executed.
Here is an Keith Devlin article "Do software engineers need mathematics that addresses a number of these issues.
The overall point is that math courses often develop abstract thinking skills, which may be more important for developing efficient, correct code than learning a specific toolset which may not age well. I know Keith Devlin has written other articles about this but this was the only one I could find online.
It's psychosomatic. You need a lobotomy. I'll get a saw.
Remember when Yahoo, Altavista, MSN, etc etc had their crappy search engines running? What did they base their search algorithm on? It was text/string batching mostly...heavily investing in lists and relevance factors. What does Google do differently?
They use advanced mathematics to predict the likelihood of matching. What exactly do they do?
Google represents the Web as a Markov chain, where each website is a node and each link increases the unidirectional transition probability of moving from the origin node to the destination node. You can find the 'limiting probability distribution' of a Markov chain relatively easily, even though Google has billions of nodes and trillions? of links.
The limiting probability distribution gives you the relative probability that, web surfing through the links (ie. performing a random walk on the chain), you will eventually settle on a particular website. This is Google's original innovation and technology.
Unfortunately, this type of mathematics is usually only taught in CS graduate school. It should be taught sooner, but it requires getting into a branch of mathematics called 'stochastic processes'.
Favorite
As a minimum, I would suggest:
- Algebra, Analytic Geometry, & Trigonometry. Know this stuff cold. After 30 years in computing, I still use it every day.
- Logic. Ditto.
- Calculus up to, but not necessarily including Differential Equations.
Very helpful at times:- Linear Algebra
- Probability & Statistics
- Numerical Analysis
- Automata Theory (offered in CS departments)
And if you're really into it:- Number Theory
- Topology & Graph Theory
A good grounding in one of the "hard" sciences like Physics can also be useful. And if you've got an aptitude for music, indulge yourself! Remember, it's not just the content of these discplines that makes them valuable. Each one teaches you to think in different ways. And an agile, flexible mind will make you more valuable to your future employers.Go for an education, not just training!
And as was said before, if you don't know math, good luck writing video games. Games like Quake perform tons of mathematical operations every second.
For sure! I don't know Quake personally (I'm not into video games at all), but I assume that it's another one of the 3D videogames where your surroundings change with your perspective.
That requires loads of matrix transformations directly out of linear algebra. It sounds terrifying, but it's just about having a group of numbers called a matrix. By multiplying them with a bunch of (x,y) coordinate in a certain order, you can do all sorts of warps and shrinks and stuff. If those (x,y) coordinates correspond to a bitmap of an object, you've just warped or shrunk the object, exactly as you'd have to do in a 3D maze or similar.
Then, there's calculus. There are two courses *everyone* should have to take in high school - auto mechanics (so you know how to change a tire, among other things) and calculus. Calculus means "small stones", as for counting. It's all about rates of change. You could tell the speed of your car by looking at your odometer and your watch, but that will give you only the average speed over a given time or distance. The speedometer, on the other hand, gives you your instantaneous speed - which is the derivative (calculus term) of your position (odometer) with respect to time. This makes sense when you think about it: speed is the rate of change of position.
(Actually, it's velocity, but that's a whole other kettle of fish if you don't know about vectors from Linear Algebra yet.)
Don't worry about the math. It's usually the easiest course in your university schedule - and I tell you that as someone who failed high school math classes constantly and who dropped out of high school because of math (that's a long story, though). Math *is* your friend. How's that? You can be guaranteed that if you do all your homework, you will get an A+ in the course. That's it. No reading, no stupid assignments which get marked by TAs who know less than you, nothing. It doesn't even matter how good or bad your teacher is. Just do all your homework and you'll get an A+. It's a non-linear relationship, do 50% of your homework (every second assigned problem) and you'll get a B+. Do 25% of your homework and you'll get a C+.
As an EE, I had to take 7 university level math classes.
Fire and Meat. Yummy.
Well, that really depends on what you want to program. For instance, to do probably about 80% of the programs out there, a fundamental knowledge of Algebra is useful - but not even required.
If you want to program video games, you'll need college level algebra just to program the physics, but again, you don't have to be a math wiz.
If you want to do cad/cam/cas programs, your ass better know some calculus and trig.
Point in fact, traditionally you've found that people program as a supplement to their chosen profession - mathematicians use computers to crunch large numbers. Engineers use computers to test and design structures. Biologists use computers to analyze and predict populatons. Chemists use computers to simulate complex chemical reactions.
If you want to get a better picture of where you use math (and a tremendous insight into computing mathematics), check out Wolframs A New Kind of Science. He developed this book while researching computers and mathematics, and its really an interesting read whether you understand wth he's talking about or not.
Surely you can come up with at least three reasons why knowledge of (chemistry/biology/women's studies/poly sci) could possibly be imporant to a student working towards his degree in CompSci?
Yeah, right.
Let's face it - you are not a geek if you can't prove L'Hopital's Rule.
I am very small, utmostly microscopic.
I don't know about today but, when I took CS in the early '80s at a Top-3 Canadian University, there were more required Math courses than required CS courses, probably because the School of CS was relatively new then and had grown out of the Math Department.
While I probably haven't directly used 99% of the Math that I learned in school, what I believe I gained was the ability to solve problems and to think abstractly, analytically, and rigorously.
The best programmer I have every worked with had a BS in Phys Ed. I got a math degree and have worked in dataproc/IT for over 35 years. Spent several years coding, db admin, now a network engineer. My math degree has not helped a bit. Thats not to say that you never use any math concepts beyond basic algebra writing most apps. But by and large, I coulda had a degree in 17th century french literature and probably done just fine!
From my experience as a programmer, I've never had to use anything beyond trigonometry in programming. Of course if you plan on doing scientific computing there would probably be a need for higher level calculus, but I would say 90% of the programming jobs out there make no use of it. A basic understanding of statistics can also be useful.
Now, thats for the actual programming. For being a CS major you will need to be pretty "good at math," whatever that means. I suppose it means be able to learn and have at least a passing interest in the subject. Binary logic is closely tied to what schools teach as "math" (algebra, calculus, set theory), so becoming familiar with these maths will prepare your brain to handle computing theory, which is why I suppose CS majors at my school (UCSB) had to take a lot of it.
it's *how* you learn that matters. First of all, 90% of people commenting here really don't understand math at all. I'm going to sound like a math snob, but trigonometry, geometry, and (American) Algebra are not math at all. As much as you might think they are math, they are in fact just tools. They are tools like your favorite programming languages and operating systems - you can use them accmoplish certain tasks. "Real" math is concerned with a way of thinking - knowing how to see structure in things where structure is not obvious, then translating that structure into symbols through which others can understand it (whoa... I didn't intend it, but doesn't that description sound a lot like what computer scientists do?). Maybe you think I'm full of crap, but "real" math is often better done by people who have backgrounds in History and Literature. You say, "yeah right," but I guarantee you that actual mathematicians are much more verbally (symbolically) inclined than regular tech-savvy people. I've really diverged from the argument here of whether or not math is useful for a computer scientist... but here's what I have to say about that. The best computer scientists will be interested in and excel at "real" mathematics - computer science is just a subset of information science which is math. No, I'm not a mathematician.
Every time you read this, I am going against my principles.
If you're a member of ACM (one of the major professional organizations for CS folks) you can download the articles from the digital library - if you've already done away with your hard copy. Most University libraries should have the journal available for checkout.
Having recently received my PhD in CS, I can tell you that if you're going to pursue an advanced degree - then the math is TRUELY necessary. While I was an undergrad, I never understood the requirement - but once I started working in the 'real' world, a lot of it made sense. I don't necessarily use it on a daily basis - but there are times when I say "yeah, that makes sense now"
"Software is the difference between hardware and reality"
Mathematics is involved in most aspects of computing, from the complex calculations of modelling and engineering systems (which includes video game models, movement skeletons, and physics models) to the set theory that drives RDBMS coding.
You don't need a math degree to program, but you do need an understanding of set theory, linear algebra, O(n) algorithmic efficiency, and boolean logic transforms.
At very least, you need to have an understanding of O(n) algorithmic efficiency to know when to use a particluar solution for a problem. Just because a hackjob from a coder works doesn't mean it's going to scale to solve the full problem set in production.
Without those basics, you aren't programming, you're just bodging code and probably causing more long-term issues and expense than your salary is worth.
I do not fail; I succeed at finding out what does not work.
- linear algebra
- graph theory
- combinatorics
- logic
- abstract algebra (very cool, and useful in a surprising number of ways)
- multi-variable calculus
- numerical analysis (I found it boring, unlike everything else on this list, but it can end up being useful)
It's likely that you will have to take courses in subjects such as differential equations (either for your school's requirements, or as prerequisites for some of the above classes), but I don't think they're particularly useful to most people in CS.-- Tim Buchheim
I worked freelance for hotels.com and some other big name firms. I am a highschool dropout. The CS grads I worked with were good, but not great. Other than one ex army CS grad I found the inability in my peers to aproach a problem from a new angle to be across the board. Something this new generation seems to be forgetting is that once upoun a time someone that knew ass from a $ prompt and didn't go to school got more credit than ninnies who excel at theory but cant code to save there own life. If you learn deep magic on your own without having it spoon fed to you then in my experience you are someone who really knows what they are doing. Often excelling at real world problem solving above and beyond hothouse flower programmers. Thats the difference between a person that can write a few cotton candy language database connections and someone that writes drivers on the bare metal. You either LUST after computers they consume your life. If you dont live sleep and breathe them for a few years then you can't achieve truly wizardlly status. You cant impart love with a university course. As to math being important to programming, if you cant see that a universe based purely on numbers requires you to be able to manipulate them in order to be really good at what you do, then you have no business in a cs course at all. I went from programming for a living to building harleys and hotrods / programming for fun but I spend just as much time in front of the keyboard now as I did then. A real geek just cant give it up. Sorry for any spelling errors etc. for some reason this thread irritated me and I just had to spout off.
Panel F, Relay #70
If you get deeply into the science of Computer Science, you can certainly get into some math. But, it is important to note that practically no one gets employed as a computer scientist (except for people who stay in academe and study and teach Computer Science).
Most people going into CS expect to get jobs as systems developers of some sort. 'Code monkeys' might be the bottom of the pack; frequently they are just trained tool-users who write snippets of code behind buttons.
But to be a great developer is to be a master of a craft, not a scientist. This particular craft is mental - it is, as you imply, a matter of critical thinking and problem solving. It is being able to look at the world in different ways and being able to see how to express an aspect of the world using the tools of your craft. It is a craft with many principles and design patterns and ways of looking at the things.
To be a great developer requires talent. Picking candidates that are strong on math may be a useful way of identifying people with the talent. (This approach screws people like me, however; I believe that I have a great deal of talent in the craft, but my brain crapped-out after basic calculus.)
The vast majority of developers require no more than:
- basic algebra
- basic trig
- basic statistics
Some people need basic geometry.Sure, if you are getting into signal processing or astrophysics or a variety of other areas, you need lots of math. But that isn't where most people are going. If you are, and you are into math, great; otherwise, don't sweat it.
You don't write good SQL because you are good at math (as others have apparently suggested); you write good SQL because
Nothing beats talent plus experience.
"When the going gets weird, the weird turn pro" -- HST
"A college calculus teacher will be used to working with struggling students because for many of them, that is the toughest class they will ever have to take. But high school calculus teachers will be more used to working with the top students in the school. If you aren't especially gifted in math, you may find that you don't get what you need from these teachers."
If you are not especially gifted in math, why not take calculus in high school anyway and then retake it in college?
Required reading for internet skeptics
From what this article suggests for a schedule. It really is stupid. It looks like you waste your time until Junior Year, and then you still waste most of your time. No wonder India programmers are eating American programmer's lunches, Calculus I & II,? Excuse me those are really basic courses. There is a lot more math out there. Also, the course outline that was suggested lacked three other major genre's of classes that any idiot should see is neccessary for a Computer Programming Job.
1) Algorithims: Lecture and Labs, Any idiot can pick up a programming book and learn if-then, switch, and then a couple of coding libraries. That stuff is stupid simple, like I learned that stuff by myself. What needs to be learned is Algorithims and their applications. State-Machine being the most simple of code organization and algorithims. If you don't come out of College being a walking library of effective algorithims, you just wasted four years. The real programming is in how you tackle problems with different code organizations and algorithims. I am going to venture to say is that the reason behind the failure of so many computer game companies attempting to build a game engine is those guys have no idea how to apply algorithims, much more get a bunch of the neccessary algorithims in games to work together. Algorithims should be taught from second semester freshman year in lectures and labs. You just cannot be an effective programmer unless you know that stuff.
2) Memory Management- With the advent of garbage collectors Memory Management is less worried about. However, If you aren't going to program Java or C# you are going to need to program your own memory management. Again, an knowledge of algorithims would be nice, especially in this sub-topic. A programmer needs to create a logical and well thought out way of managing memory in every piece of non-C#/Java code they write. Memory Management is essential to Embedded and EEPROM programming because they can't afford the overhead of garbage collection. AS a CS you don't want these doors closed off to you because embedded's are usually the ones that have to destroy all their software and build a platform from dirt and sweat again. Also, Companies need embedded programmers for everything these days from Microwaves to ovens , to Cars, you name it.
3) Debugging- There have to be more techniques out there than printing strings onto a console. People need to be able to organize their code in such a way that debugging is relatively painless. This debugging should probably be the class you take Senior year that combines all the good Memory Management techniques, good well applied algorithims with a review of large project's code. Primarily Open Source Code (because you can actually look at the code) should be analyzed be these students. Students should poke at all the big Open Source codebases for theil applications of the algorithims that they had been learning the past four years. Their senior project, a project that lasts all Senior Year, should be the application of this debugging class and the computer algorithims, and students should prove their handle on debugging techniques learned in this course in their programming additions to the Open Source Projects.
A Person might argue that most algorithims are only used in one area of programming. However, since Computer Science is not an end all and only a tool, Computer Scientists should be very knowledgeable about the algorithims used in, say calculations of quantum physics. The fact is that those algorithims can very possibly be effectively applied to other areas. Computer Scientists need to be very familiar with almost all areas of science because they really are usually the employees of people with well defined needs in a very vertical market. Those slaves need to be very flexible and knowledgable otherwise they might not be able to adapt to the needs of their employer.
My alma mater is kind of notorious for being very theoretical in CS, but lately has succumbed to the pressure to be more practical. The curriculum requires Formal Languages and Automata, a 400-level CS course. Discrete Math from the math department covered most of the logic, and if you didn't learn it there you learned it in the required EE 201: Digital Electronics and its lab. Data Structures and Algorithms is another required course, and depending on the professor you either learn it right or you don't. I knew it already, so my professor didn't hurt me, but the guy they had teaching it my last year in school used about a 1200-page textbook, which is a good thing. :) You also have to take Datacomm, which requires you to know all about NRZ, Manchester, et al. right up through how TCP works and has evolved.
Another required course is Programming Languages, which didn't go into enough depth but still required you to write functional programs (in Lisp), logical programs (in Prolog), and concurrent programs (in your choice of languages; I used C++ to save time).
Will you use most of these skills daily in a programming job? Not consciously, but they pervade your thoughts and you write better-informed code as a result.
In my current project, I've spent the last two months wishing I could remember more of my calculus courses. I never would've thought trying to determine the most effective way to feed farmed fish would be so complicated, and require so much math. I've gone through about half a dozen scratch plans trying to figure formulas and the like out.
On a personal note, I've worked on my own projects that I had to finally take to a former math prof. I simply couldn't figure out how to solve a particular problem. But in this case, I'm probably the exception, not the rule.
If you're just making buttons pretty, you don't need the math. But once you get into the guts of an engine,whether it be graphics or something more specialized (like feeding fish) there's going to be some math in there, somewhere.
I have a BS and MS in computer science and worked for many years in the industry before becoming a doctor and founding Linux Medical News.
I SUCKED at math, working like a dog for C grades in calculus. My miserable performance was highlighted by a D grade in Differential Equations that I worked very hard for. This did not keep me from making straight A's in my programming classes. There is the phenomenon of mathematica 'late bloomers' and I understood it better when I hit 25-27 years old. However, I've never come close to being good or even mediocre at it.
In 20 years, I have yet to do an integral since those awful days and I have worked for IBM as a NASA contractor, the now defunct Compaq and briefly had my own software company. I am now working as a researcher in the highly technical field of functional MRI. I still suck at math. I was regarded by my peers as a good software engineer. Even though I no longer program professionally, I still have a good intuition for software problems and can write quickies without difficulty. I now use a sliver of my ability to make sophisticated spreadsheet models for successful investing. A beautiful benefit indeed.
Do not let lack of math ability deter you from an interesting field that will help you anywhere you go!
-- IV
http://www.LinuxMedNews.com Revolutionizing Medical Education and Practice.
How much math you need, and what math you need, depends on what sort of code you're doing.
I use arithmetic almost constantly (incrementing loops, avoiding redundant counters). Boolean logic (x&&b)==(!(!x||!b)) is rather common. Basic probability (p(a) > p(b)+p(c)) is required for optimization. I find myself doing proofs in my head for all the code I write to convince myself the code works. Usually really simple proofs, like TRUE works and FALSE works which implies that all cases work. One recent bug involved a count of changes that couldn't exceed 256, yet every increment had to allow a matching decrement. Tricky tricky!
On the other hand, if you ever see a calculator on my desk, you can tell I'm goofing off. (There's a calculator on my desk right now.) That usually requires combinatorics, exponentials, bell curves. Even when goofing off I've very rarely needed calculus.
I think you'll find that anyone who's too sloppy with spelling, syntax, or grammar (except intentionally) will be a pretty piss-poor programmer. Computers sometimes like to crash if you do as little wrong as misspell a variable name (much less misspecify an entire interface). If you can't even get the loose standards of human language right, what chance do you have with a computer?
(Very carefully proofread text...aaaaand submit!)
"A great democracy must be progressive or it will soon cease to be a great democracy." --Theodore Roosevelt
"For the Snark was a Boojum, you see." -From the Hunting of the Snark: An Agony in Eight Fits, by Lewis Carroll
Computer Science is 90% math at the graduate level. Don't skip out on linear algebra if you want to do 3D graphics and pay very close attention to anything involving matrices and vectors.
the real reason math is important for computer science is that fundamentally, science is a branch of human endeavor involved with forming mental models of some system and then exposing that model to Reality to see what jives and what doesn't. with computers, Reality is a bit difficult to find sometimes, but certainly if you go the way of the programmer, the programs you write are codification of your model and the input they handle can be considered the Reality in question.
anyway, everyone who constructs models learns an affinity for the "trueness" of the model (if the model is very true, it jives decently w/ Reality w/o need of hand-waving or too many kludges). math is important for judging trueness of the model, and for extrapolating not only simple truth from the perceived world, but the Ability to Perceive Truth.
many people read orwell's "2 plus 2 makes 5". it's not necessary to study math to appreciate the many levels of this falsehood, but studying math (and henceforth going into computer science) makes it easier to realize even more levels. fiction is a model. of what? society is a model. of what? control / cruelty / repressed-love / tipping-point torture / lies and truths; all are models. of what? all the above, varying over time, are models as well.
in the end, the scientist seeks to understand and change the mental models to be more true. but each scientist is part of the Reality, in Reality. math is essential to bootstrapping the nimble mind.
In 1974, Ted Nelson had some thoughts to share on this very topic in his revolutionary book Computer Lib. As the "crackpot, visionary, gadfly" he calls himself he stated that "Universities require higher math (usually calculus and at minimum linear algebra) before allowing students to program a computer. This is preposterous! This is akin to requiring a PHD in mechanics in order to drive a car down the road! Grade school kids can - and do - learn how to program computers with no math background at all!"
This is a paraphrase, because unfortunately I don't have my copy in front of me at the moment. But I believe I got it pretty close. While I agree with Ted on the whole, I also concede that it entirely depends on what you want to do with your programming projects.
If it's got anything at all to do with breaking apart, twiddling or mangling things like sound and video and many applications of graphics then yes higher math will be a requirement. It will also be useful in helping one think logically enough to handle programmatic tasks more easily.
That being said, there are still many many programmatic tasks you can accomplish...to make your life easier because someone else hasn't in the area you're programming in, or just to learn the internals - the process! - of programming: Ted was dead on (as he was about a lot of things!). No math will be required for a great many tasks!
Quod scripsi, scripsi.
Theory CS theory consists of a wide range of problems: some very heavily mathematical (Does P = NP?) to the not so mathematical (eg. Theory of Distributed Systems). Although the latter is not "mathematical" in the traditional sense, it still requires strong mathematical reasoning abilities. In any case, needless to say, studying CS theory requires a good foundation in mathematics.
Graphics This one has already been described by other people. No chance in hell you're going to write a kick-ass 3d engine without knowing a lot of linear algebra (i.e. math).
Artificial Intelligence Machine Learning (Neural Nets, Support Vector machines, etc) is all hardcore statistics. You need to have a good knowledge of linear algebra and multivariate calculus to even begin to comprehend this field. At the other end of the spectrum within the AI field is Knowledge Representation; this type of AI is more logic based, and again requires good mathematical reasoning abilities.
Operating Systems Here's a field for which you may argue a minimal amount of math is required. Of all the subdisciplines within CS, this one probably does require the least math. However, that doesn't mean you'll get away without a math background. A lot of research done in this field involves understanding/presenting quantitative results. So you do need some basic knowledge of statistics. Besides that, a lot of OS research also involves proving systems correct; this is very heavily logic based stuff, and again an ability to reason about problems abstractly (mathematically) is extremely useful.
Numerical Analysis Math, math, math, and more math.
Software Engineering Proving systems correct and defining systems using logic -- very mathematical stuff. If on the other hand you get into the more wishy-washy side of SE then you may be able to avoid math.
Anyways, there's probably some sub disciples I missed, but you should get the idea. Math is required in almost all aspects of CS. The only reason it isn't required in the RealWorld(tm) is because most of the stuff done there is grunt work that involves nothing more than reinventing the wheel.
So, if you are really interested in CS, then do it right -- take as much math as you can. If, on the other hand, you are just interested in hacking, then don't go into CS. CS != hacking degree.
Many of the previous posters have cited the importance of math in areas like graphics, databases, etc. I heartily agree. Allow me to cite another example: computational neuroscience.
So I'm in general incredibly interested in various combinations of brain and CS studies, so last year I audited a course on computational neuroscience. This was a course which dealt with understanding neural systems from a computational perspective.
Unfortunately, my math skills are somewhat sub-par for a CS major. I somehow managed to get a 5 on the AP Calc exam, but forgot everything afterwards. This ended up hurting me significantly in the course. Although I could understand the neuroscience concepts, whenever we started with analysis my head started swimming. Modeling things like ion channels require some pretty hardcore understanding of differential equations, which I understood next to nothing about. I learned a bunch of neat facts, but without a strong mathematical background, I wasn't able to fully comprehend what was going on.
There are many other examples of my poor math knowledge causing me pain. As it stands, I'm going to be joining a PhD program to study neuro/CS stuff in the fall. Since I'm going to need to have a good grasp of things like differential equations, I'm going to be spending a lot of quality time with calculus books this summer. Being in a position like this sucks -- I really recommend learning math, regardless of what you want to do. It's amazing how often math comes up, and how much the symbolic processing skills math teaches you helps in other areas.