Slashdot Mirror


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."

32 of 1,203 comments (clear)

  1. Certain types of programming... by tcopeland · · Score: 5, Informative

    ...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.

    1. Re:Certain types of programming... by XMyth · · Score: 5, Insightful

      However, writing a web front-end to a database (which is what a *LOT* of people end up doing for years and years) requires practically NO math 90% of the time. Of course, it't that 10% that will get you.

    2. Re:Certain types of programming... by Anonymous Coward · · Score: 5, Insightful

      If that's what you want to do, don't waste your time in college, because they won't teach you that. Connecting a webserver to a database isn't science, is it? But if you wonder how complex SQL queries can be simplified and executed with the least amount of resources, then CS is for you, and there will be math.

    3. Re:Certain types of programming... by (trb001) · · Score: 5, Insightful

      Amen. Don't think programming takes too much math? Try writing a game, any game. I was writing up a Rogue clone and got around to path finding. The number of algorithms to use are just sick, and they're all math intensive. Not so much algebra/trig stuff, but the spatial relations stuff is all math based.

      Other programming...calculating and distributing load, memory management, all math based. If you ever write anything with sound or electricity (lots of embedded stuff), it's all math based.

      Many CS majors will enter the work force only to do data moving programming (ie, take form input, store, retrieve, repeat). However, even those sytems have to have somebody load balancing them which gets into timing and...well, we all know how it goes. Math isn't just a filler class in a CS majors curriculum.

      --trb

    4. Re:Certain types of programming... by the+chao+goes+mu · · Score: 5, Interesting

      I recall trying to tell a coworker his logic wouldn't work because he wasn't following deMorgan's law (the !(x|y) result he wanted was written as !(x&y), not as (!x & !y)). I spent over an hour trying to convince him. He ignored it, said "perl logic doesn't work that way", and, then about two days later, came to ask how to fix it when it kept failing. So, it seems you can try to do it without understanding math/logic, but you may run into a few problems.

      --
      Boys from the City. Not yet caught by the Whirlwind of Progress. Feed soda pop to the thirsty pigs.
    5. Re:Certain types of programming... by Anonymous Coward · · Score: 5, Insightful

      This isn't about ego. There's simply no point in choosing CS if you shy away from math and won't be working in a field where CS skills are required. You wouldn't enjoy it and consequently wouldn't allow yourself to apply CS methods. There's nothing wrong with connecting databases to webservers. People want that done. It's just not computer science.

    6. Re:Certain types of programming... by mrtrumbe · · Score: 5, Insightful
      And I will stay the hell away from any employer with that attitude. Why do you want the programmer who will be hooking up that webserver to that database to know math well and to be a good problem solver?

      -Because that person might be writing your SQL queries too.

      -Because elegant and reusable code usually comes from the minds of people interested in solving problems.

      -Because that person might be able to understand the problem domain better than some I-don't-give-a-shit-about-anything-other-than-code programmer.

      -Because that person might work in other areas of development eventually. Did you hire the person for ONLY their database-to-webserver knowledge? Was that shortsighted? Maybe you'd rather have a well-rounded and generally smart person to solve those new problems.

      We have a very rigorous hiring program at the firm I work for. We look for intelligent people with a wide base of skills who we think can easily adapt to new problems and environments. We DON'T look for specific knowledge in anything but our most senior positions. We have had wild success in finding very talented people because we are not looking for a person with skill A. How long will skill A be relevant for anyway? Will the person with skill A be able to do good work if we try to teach him skill B later? That seems pretty important to me.

      So the question is really: what are the most valuable qualities that a new hire can have? If your firm thinks that 3+ years of java experience is the most important quality a new hire can have, then I really don't want to work for them. I have over 3 years of java experience, but I in no way consider that my most valuable quality as an employee.

      Taft

    7. Re:Certain types of programming... by Phenris+Wolfe · · Score: 5, Interesting

      I actually swapped from CS to CIS because of Discrete Math II. The teacher made the class way too hard and didn't do a good job of explaining how all that stuff fit together. Interestingly enough, out of 4 CS/CIS majors that graduated together, I'm the only one doing actual work with computers (web development). I also failed graphics programming because of the math. That's bothered me ever since, and I've worked hard to improve my skills in that area. I think the real problem with learning math in the CS curriculum isn't the math, it's the math class. The class generally tends to be geared toward math majors, not people that are going to use math in computing.

    8. Re:Certain types of programming... by Laxitive · · Score: 5, Informative

      Bullshit. He is as cool as he thinks he is.

      Knowing good math.. makes you a better programmer. I would go as far as to say that computer science _is_ math. Knowing how to hook up a DB to a web front-end is not computer-science. It's a trade skill, like plumbing.

      The difference between some web-scripting guy, and a guy who knows CS, is like difference between an automechanic and an automotive engineer. The engineer might not be able to fix your engine, but he understands the workings of it much better than your average mechanic.

      From my perspective, being some random code-monkey is not too different from working at McDonalds. Pay might be better, but the work is still shit. Having a solid CS grounding lets you work in places and on problems that are actually _interesting_ and challenging. It allows you to actually contribute something new to the body of knowledge associated with computation.. or apply it well to some novel field.

      I can pick up and learn a new language or API given a few months. It would take years of focused study for a random PHP programmer to acquire the knowledge I have.

      Not to say that I'm special or anything.. but I've spent 5 years working my ass off to get myself to a proficient level in this area of study.. and most people who want to reach that same level will also have to spend several years doing it. It's just a question of wether you decide to do it early in your life (university), later in your life, or not at all.

      But it's definitely worth it.

      -Laxitive

    9. Re:Certain types of programming... by Anonymous Coward · · Score: 5, Interesting

      This isn't about ego. There's simply no point in choosing CS if you shy away from math and won't be working in a field where CS skills are required. You wouldn't enjoy it and consequently wouldn't allow yourself to apply CS methods. There's nothing wrong with connecting databases to webservers. People want that done. It's just not computer science.

      See, and that is the problem. Most jobs today in proramming require a BS in CS. Yet the majority of jobs I see have requirments like:

      Backend developer -Must have BS in Computer Science -Must have 3-5 years Java experence -Must have experence in Oracle, SQL server, etc -Must be able to write SQL code for enterpise applications.

      You don't need uber math skills to write good SQL or Java code for a database application. I found after college that while my math and writing skills had improved since high school, my database knowledge was lacking so I went to a technical school. There really should be some sort of IT degree that has a focus on practical knowledge rather than mathmatics. You will use high level mathmatics if you are working on video games, or CAD applications. But most programmers end up writing database interface tools.

      I'd like to see some type of IT degree that taught programming, networking, and troubleshooting. I'd rather hire a programmer that had a strong foundation in networking concepts than one who aced calc 3.

      Hell, they should also stress English judging by many of the programmers I've met.

    10. Re:Certain types of programming... by Chibi · · Score: 5, Insightful
      And you will learn it, and employers will not give a shit, because they just want to connect a webserver to a database, which is not science...


      I agree with you, but only to a point. In most cases, your employers will just care that it's done on time and under budget. But what happens when system performance is not acceptable? That's when you've got to figure some things out. Look for performance bottlenecks, etc. Times like this are when a math background (and I consider algorithms to be math) will be a life-saver.

      Just looking at my co-workers, there are some who have strong math backgrounds. There are others with pretty minimal backgrounds, and it really shows in their code and problem-solving abilities. And guess who my boss has more faith in?

      As a side note, I'm not saying that any of this requires formal education. You can learn a lot of this stuff on your own, if need be. It's just that if you've been to school, there's a hope you had to get through these classes and at least some of it stuck.

      --
      If all you have are silver bullets, everything looks like a werewolf.
    11. Re:Certain types of programming... by Coryoth · · Score: 5, Insightful

      And you will learn it, and employers will not give a shit, because they just want to connect a webserver to a database, which is not science, and when you realize that your ego about your science knowledge has prevented you from finding a job anywhere but McDonald's, you will realize the error of your ways, and you will want to connect a webserver to a database.

      On the other hand, when your job of just connecting a server to a database gets outsourced to monkeys in the congo, the person who learned the math and the science will be getting a serious software engineering and design job.

      Jedidiah.

    12. Re:Certain types of programming... by Gilk180 · · Score: 5, Interesting

      I spent a summer doing just that. I was working with a group who had almost zero programming experience and just a little database experience. We made things work, but it took 3 quad-P3 servers to run the database (running about 80% capacity 24/8).

      Since we were in the R&D wing, we threw the whole thing over to the operations people about the time I headed back to school.

      The next semester in school I had a databases class. I was baffled by the lack of understanding we had of even basic database design.

      Later I found out that a single operations guy did a complete rewrite of our code in about a week. He had all that useless math background and database experience. His version ran on a single server and was usually at only 50% load.

      There are reasons to hire well trained and experienced programmers even for tasks that seem simple.

    13. Re:Certain types of programming... by gtall · · Score: 5, Interesting

      What a load of fetid dingo kidneys. Does Newton's calculus or quantum mechanics ring a bell? Tell us how you want to be connecting webservers to a database for the rest of your life because you were too narrow minded to learn anything else. Math opens up the whole world of technology and science to you, you might find that refreshing after coming home from being told that a software program is going to be connecting that webserver to the database from now on.

      And if you do not develop the joy of learning while you are in school, most reputable employers will figure that out before you even get finished with interview...they won't be happy you do not wish to learn.

      By not getting a well rounded education, your brain as a muscle, will get soft. If you ever find a niche, you will be fed and cared for as a mushroom.

      And you might find that the world is a bigger place than what someone will pay you for. Math and science education is central any country's future. You should want to learn it for that reason alone.

      Companies run by math and science illiterates are an abomination, and they are no fun to work for either.

    14. Re:Certain types of programming... by Godeke · · Score: 5, Insightful

      Here here and amen! When looking for programmers, I don't care as much about your specific experience as your ability to think. Early on in hiring, I thought experience in a space was the critical element (after all, it was an *easy* assement to make). After several programmers who had to be given specs more detailed than the code, I realized I was wasting a lot of energy because I was trying to work with coders, not programmers. I now make a clear distinction between those who can follow a crystal clear spec, but can't think independently (coders) vs those who can follow a typical rapidly changing spec (programmers) and those who can create a spec to solve a problem (analyst). I have nearly zero use for coders - they cost more to feed specs then the output is worth.

      Anyone who thinks programming is "wiring front ends to databases" is probably a coder. Yes, there is quite a bit of that kind of work in the business space, but a programmer will not wire your database to a GUI: they will come up with tools to do so more effectively. Similarly, anyone who thinks "skill X" is the be all and end all of programming is probably a coder. (I once interviewed a guy who was pretty good with Oracle. Commanded a six figure income. When he found out that the offered project used SQL server 2000, he mocked our company, to our face and to the niche community we work for. In a bit of "the best revenge is success", he solicited *us* for work after the dot com crash. Seems he was out of work for over a year due to his disdain for anything but his tiny niche skill, and our project was looking pretty good.

      --
      Sig under construction since 1998.
    15. Re:Certain types of programming... by ari_j · · Score: 5, Insightful

      You don't even have to do 3D graphics to get into this stuff. I wrote a space simulation engine for PennMUSH and stopped at no lengths on some things...it only updates once per second, but I want to detect collisions accurately. Calculus saved the day. I wanted to turn in a spherical configuration space (where most people doing this use a cylindrical one) - take the cross product of where you are and where you want to be, and rotate yourself the amount you want to turn around said cross product. This is probably close to 100 lines of code, just to turn a ship.

      Any programming at all involves math. The better you are at math, the better a programmer you will be. If you are not good with math, you will not be a good programmer. HTML and what most people do with PHP et al. is not programming - it is markup.

      My CS degree required that I take Calculus I & II, discrete math, a statistics course (I took the harder of the two accepted for this, a 400-level math), and a math elective or two. I took a graduate-level cryptology special topics class for one of the electives - it was three CS students and about 6 math graduate students. At the end of the semester, the professor wrote a list of 3-digit numbers, most of them on the range [400,599], and said "This is a list of math courses we've covered at least half of in this class. Take them if you want to know more." There were about a dozen numbers on the list. My other elective was Calculus III, which I took concurrently with Crypto, across the hall, from the same professor. That was a challenge, as he made it extra hard on me in both classes (both because I'm good but also because I'm a smartass). He threatened to encrypt my Calc final. ;-D

      At the very least, a programmer should have discrete math, multi-dimensional Calculus including working with series and sequences, number theory, linear algebra, and diff-eq (I regret not finding time for the last two).

      Like I said - your abilities as a programmer are directly proportional to your abilities as a mathemetician. There's not a science you can study properly without using math.

  2. A Warning by ziondreams · · Score: 5, Interesting

    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
    1. Re:A Warning by hJordanH · · Score: 5, Interesting

      I could not agree more. I attend the University of Texas in Austin (which has a pretty good rating for CS, good enough for Dijkstra to teach there until his passing two years ago) and one of my professors last semester, while ranting about over seas outsourcing, spent twenty minutes lecturing us about how lucky we are to attend a school that focuses more on theory than application. I am a senior, graduating this upcoming Christmas, and the great majority of my completed courses have had almost no practical use to me for coding. On the other hand, they have taught me to think about and logically break down problems, understand how programs actually interacts with the computer, and the theories on which computation is founded. A techincal school or small college CS program would teach me the complete opposite of what I have learned. My professor believes that the ability to think, not just to program, is what will keep our asses fed in the upcoming years, instead of some family in Banglapore Tipikaka ( - does not exist, but you get the picture).

  3. HS math question. by grub · · Score: 5, Interesting


    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,
  4. Nail on the Head by millahtime · · Score: 5, Informative

    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.

    1. Re:Nail on the Head by AKAImBatman · · Score: 5, Interesting

      Let me second this. A good software engineer still needs to know the math behind what he's doing. Intuition can go a long ways, but sometimes intuition is wrong. And sometimes there just isn't a good way to develop something without invoking a few formulas. (Anyone who's developed a file system, say "Aye"!) The bright side is that most engineering work doesn't really require anything more complex than high school math. (Assuming that they're still *teaching* high school math. Grrr...)

      My best suggestion would be to shy away from any school that skips over the theory and math behind computational sciences. I myself ended up skipping the degree all together and picked up the various textbooks and papers necessary to educate myself in the field. That's not the path for everyone (especially if you're not very self-motivated), but for me it was better than trying to sort through which school was teaching the real thing and which one was dumbing it down to improve attendance.

  5. Computer Science != Programming by Anonymous Coward · · Score: 5, Insightful

    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.

    1. Re:Computer Science != Programming by Gumshoe · · Score: 5, Insightful
      Dijkstra summed that sentiment up best:

      "Computer Science is no more about computers than astronomy is about telescopes."
    2. Re:Computer Science != Programming by UTPinky · · Score: 5, Interesting

      THANK YOU for saying this! I got into a huge debate one time w/ a classmate because he was complaining about how Automata Theory (Language Theory) should not be a Comp Sci class. I was dumbfounded... This was perhaps the "truest" computer science class that was required for a degree at UT Austin... and in my opinion perhaps the most interesting class at that.

      --
      I'm only paranoid because everyone is against me...
    3. Re:Computer Science != Programming by wwest4 · · Score: 5, Insightful

      I have to call bullshit on this knee-jerk arrogance.

      MANY CS majors become coders, and it is a perfectly acceptable outlet for the skills, knowledge and wisdom gleaned from a good CS degree program.

      Just because some people are fortunate enough to be able to pursue a career in academe or in bleeding edge R&D or other theoretical pursuits, does not mean that good programming is not applied computer science.

      If anyone believes otherwise, have another gander at the standard courses in a modern CS degree at any reputable university. You'll find tons of software design theory that can be DIRECTLY applied to writing software.

  6. Why is maths useful for computer scientists? by sweet+cunny+muffin · · Score: 5, Insightful

    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.

  7. Double Major by ePhil_One · · Score: 5, Insightful
    I double majored in Math/Comp Sci. I took a lot of logic courses, Diff. Eq., etc. The benefit is really understanding how all the numbers work so you can find intelligent methods of calculating things, instead of simply brute forcing your way through it all.

    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.
  8. Re:oh good lord yes by ponxx · · Score: 5, Insightful

    > we have to know math because the math majors cant program, usually

    Conversely this is the very reason why physicists and mathematicians have good job opportunities in IT, consulting or banking. In many cases it's easier to teach a physicist programming (or economics) than to teach a programmer the relevant understanding of mathematics.

    Of course it depends on what you're progrogramming and of course a programmer who is good at the kind of maths required for the job will have the edge anyway...

  9. Speaking as a Math and Comp Sci double major by nebaz · · Score: 5, Insightful

    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
  10. Re:Here it comes ... by haystor · · Score: 5, Interesting

    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
  11. Coding IS math. by Tim · · Score: 5, Insightful

    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?
  12. If you can't stand the math, get out of CS. by Dr.+Mu · · Score: 5, Insightful
    If you haven't got an aptitude for and a love of mathematics, I would urge you stay out of computer science. You won't succeed. The same talents and interests that bear on math also come into play in CS. They're hopelessly intertwined. Math is the foundation for computing, and the more you take, the better.

    As a minimum, I would suggest:

    1. Algebra, Analytic Geometry, & Trigonometry. Know this stuff cold. After 30 years in computing, I still use it every day.
    2. Logic. Ditto.
    3. Calculus up to, but not necessarily including Differential Equations.
    Very helpful at times:
    1. Linear Algebra
    2. Probability & Statistics
    3. Numerical Analysis
    4. Automata Theory (offered in CS departments)
    And if you're really into it:
    1. Number Theory
    2. 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!