Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Which Math For Programmers?

CmdrTaco posted more than 4 years ago | from the stats-kicked-my-balls dept.

Math 466

An anonymous reader writes "It is no news that the greatest computer scientists and programmers are/were mathematicians. As a kid 'hacking' if-else programs, I was not aware of the importance of math in programming, but few years later, when I read Engines of Logic by Martin Davis I started becoming increasingly more convinced of this. Unfortunately, math doesn't return my love, and prefers me to struggle with it. Now, as the end of the semester approaches, I am faced with a dilemma: What math subject to choose next? I have two choices: 'Discreet structures with graph theory' (discrete math; proofs, sets, algorithms and graphs) on one side, and 'Selected math chapters' (math analysis; vectors, euclidean space, differentials) on the other. I'm scared of the second one because it's said to be harder. But contrary to my own opinion, one assistant told me that it would be more useful for a programmer compared to the first subject. Then again, he's not a programmer. That's why I turn to you for help, fellow slashdotters — any advice?"

cancel ×

466 comments

Sorry! There are no comments related to the filter you selected.

Physicists? (5, Insightful)

jeffblevins (554702) | more than 4 years ago | (#30669802)

I don't disagree that mathematicians make great software engineers, but I think most of the great software engineers in the past were physicists and electrical engineers.

Re:Physicists? (1)

Zarrot (1149415) | more than 4 years ago | (#30670240)

We'll until the early to late 90's Computer Science/Computer Engineering really wasn't it's own field. It was generally a specialty of the EE curriculum.

The Second, If Not Both (5, Insightful)

eldavojohn (898314) | more than 4 years ago | (#30669812)

It is no news that the greatest computer scientists and programmers are/were mathematicians.

I caution you that there are many other science professions which require math to varying degrees. The above statement could also be true of phycisists, chemists and maybe even biologists. The vectors, proof and algorithms that math provides a foundation to (or is) can be compared to the statistics that a biologist relies on or more generally processing empirical data in any science. We teach our kids basic math so they understand home loans and taxation later in life. Similarly, your best x in any science related field will likely have strong math skills to take what gets thrown at them.

I have two choices: 'Discreet structures with graph theory' (discrete math; proofs, sets, algorithms and graphs) on one side, and 'Selected math chapters' (math analysis; vectors, euclidean space, differentials) on the other. I'm scared of the second one because it's said to be harder. But contrary to my own opinion, one assistant told me that it would be more useful for a programmer compared to the first subject. Then again, he's not a programmer.

But he's definitely correct. The second is going to give you practical skills in programming -- a wide array of practical skills. The first is most likely going to give you some automata theory for computers but unless you're going into theoretical research, the second is the obvious answer. Graphics and games are all vectors, the web is becoming even more so with new browser rendering technologies. Rendering is all euclidean space transposed onto a two dimensional plane (screen) using points (pixels). Differentials are huge in the vision and image processing world and again, in graphics. This is your obvious selection although I challenge you to take both. Also, look for courses on classes that blur the lines between stats/math and computer science. Like courses on error correcting codes or computer language design and theory.

I don't know about you but I would rather take a seriously difficult course and learn a lot with a grade of C+ than take a seriously easy course and learn little with a grade of A+.

Unfortunately, math doesn't return my love, and prefers me to struggle with it.

As a brief aside, it's entirely possible you simply were never exposed to fun math or been exposed to a really influential teacher. It will not give you the joy that primary school math league gave me nor will it be a perfect substitute but Martin Gardner [amazon.com] has some really fun math. While this won't get you excited about graph theory and linear equations, it might spark something in you to devour math regardless of how dry it is. Talking about quadratic sieves in regards to finding primes is really boring stuff when it's a paper full of symbols. But if you know what kind of power this holds in regards to cryptography, one can get really zealous about it. Remember to help your kids with this should you decide to procreate.

Also if you haven't read Godel, Escher, Bach [wikipedia.org] , it might be time. Copies of those sell for cheap used online.

Re:The Second, If Not Both (5, Insightful)

VAXcat (674775) | more than 4 years ago | (#30669970)

I took years and years of vector & euclidean math, differential euqations and the like. Mow after working as a programmer for a very long time, I've used data structures, graphs, algorithms and the like on a daily basis. I've used the other, "Buck Rogers" math...once. I realize this is anecdotal, but I can't see how most programmers would have more use for the advanced analysis style math over the discrete stuff. Gradients, divergences, curls, triple integrals and partial differential equations are a lot of fun, but they just don't come up that often unless you're a physicist or a games developer.

Re:The Second, If Not Both (1)

dintech (998802) | more than 4 years ago | (#30670258)

Or you plan to work in finance IT.

Re:The Second, If Not Both (2, Insightful)

ShatteredArm (1123533) | more than 4 years ago | (#30670474)

Even if you do work in finance IT, what are the chances that you get to actually develop new financial formulas on your own?

Re:The Second, If Not Both (5, Interesting)

DeadDecoy (877617) | more than 4 years ago | (#30670000)

As a programmer, I've found statistics to be another useful branch of mathematics. It can be more functional when collaborating with others to do number crunching and can having varying degrees of difficulty from drop-dead-easy to omgwtfbbq. Also, probability and statistics in general, are often incorporated in machine learning to make the computer handle non-deterministic problems; good for programming AIs and such. Personally, I always liked learning the 'harder' thing as that might expose my brain to concepts or ways of thinking that I wasn't already familiar with. But regardless, math isn't too bad if you take the time and effort to understand it.

Re:The Second, If Not Both (2, Insightful)

Cyberax (705495) | more than 4 years ago | (#30670028)

Don't forget numerical algorithms for calculus problems (integration, solving of differential equations, etc.). Their implementation them can give you a lot of practical skills.

Re:The Second, If Not Both (2, Informative)

erikscott (1360245) | more than 4 years ago | (#30670114)

A couple of thoughts -

The former will be really useful if you decide to work on database-related things. Not just "using SQL to get my work done" but actually crafting the internals of a database. Similarly useful for compilers - both of them have optimizers, and that's just one big graph traversal. Too big to do in a useful amount of time, so all kinds of heuristics are used for graph pruning. Go for it.

The latter is a good foundation for numerical analysis, a field occupied by a lot of engineers and fairly few CS type people. It's a nice differentiator (pardon the absurdly weak pun). You'd much, much rather try to find simulation work than, say, writing yet another inventory management application these days.

Re:The Second, If Not Both (5, Interesting)

rochberg (1444791) | more than 4 years ago | (#30670280)

[...] The second is going to give you practical skills in programming -- a wide array of practical skills. The first is most likely going to give you some automata theory for computers but unless you're going into theoretical research, the second is the obvious answer. Graphics and games are all vectors, the web is becoming even more so with new browser rendering technologies. Rendering is all euclidean space transposed onto a two dimensional plane (screen) using points (pixels). Differentials are huge in the vision and image processing world and again, in graphics. This is your obvious selection[...]

I couldn't disagree more. There is no "obvious selection," because the OP didn't mention what type of programming interests him. If you're going to specialize in graphics or scientific computing, yes, the analysis course would be helpful. However, I find that branch of mathematics completely useless for the programming work that I do.

In more systems-oriented programming (e.g., OS, compilers, networking, databases), a strong background in algorithms, data structures, and graph theory is absolutely essential. If you start moving into security and cryptography, you need to understand modern algreba topics like number theory and group theory; having a solid foundation in set theory is a prerequisite for any of those topics.

[...] although I challenge you to take both [emph. added]. Also, look for courses on classes that blur the lines between stats/math and computer science. Like courses on error correcting codes or computer language design and theory.

On this point, we agree.

Re:The Second, If Not Both (5, Insightful)

samkass (174571) | more than 4 years ago | (#30670284)

If you're going to choose and not do both, then it largely depends on what kind of "programming" you're going to do. Note that "Programming" is a very different profession from Computer Science or Software Engineering. If you're interested in 3D, games, physics, etc., you're going to need a solid foundation in linear algebra and calculus. If you're going to be dealing in large datasets, distributed systems, client-server communications, etc., then discrete math and set theory will probably be very useful. If you're going to go into AI, classifiers, robotics, etc., then you'll probably want both, plus statistics.

If you're just going to bang out code to someone else's careful spec, then you may not need all that much math.

Re:The Second, If Not Both (1, Insightful)

Anonymous Coward | more than 4 years ago | (#30670416)

I'm far more of a mathematician than a programmer, but it's worth pointing out the following. Even if you want to work in graphics or games and find yourself needing to know how to work with vector calculus in three dimensions, or use quaternions to represent rotations in 3-space, it might be very valuable for you to be comfortable with graph theory. If you glance at some books or papers by Knuth, Dijkstra, etc., you'll notice (perhaps surprisingly) that many of the more important algorithms *of practical use for programmers* were developed and implemented in the language of graph theory. This is not a coincidence: graph theory is simply a nice, loose, abstract language in which to phrase combinatorial (i.e., counting) problems. A computer, fundamentally, is not much more than a very good adding machine, and a lot of the art of programming is recognizing the combinatorial structure of the task you hope to accomplish, perhaps by abstracting it into a graph theory problem, and then solving the resulting combinatorial problem efficiently using an appropriate algorithm. This perspective, I think, argues in facor of the "Discrete math" class rather than the "Vector calculus" class.

The counterargument is that the harder class will certainly be better training at abstract thought and sound reasoning, both of fundamental importance in programming or any other quantitative science (or any other intellectual endeavor, for that matter, from art history to anthropology).

Take Both (2, Insightful)

Fantom42 (174630) | more than 4 years ago | (#30669830)

Take Both. Make time for it.

Re:Take Both (1)

Maxo-Texas (864189) | more than 4 years ago | (#30670014)

I had to take both for my degree.

The first helps with thinking certain ways. The second helps with technology of solutions.

Sort of like college vs trade school.

I ended up in business and the heavy math & physics were never used.

I did a lot of set theory type things for SQL.

These days, I'm a team supervisor and mainly use it for tasks similar to natural language processing with awk and perl for data analysis.

Study what you enjoy (4, Insightful)

Jah-Wren Ryel (80510) | more than 4 years ago | (#30669840)

Programming is a HUGE field. There is plenty of work that doesn't require significant math.
Go with what interests you and let the details work themselves out.

SECOND THAT (0)

Anonymous Coward | more than 4 years ago | (#30670050)

For example the latter course sounds like something if you're inclined to graphics programming, but might be largely useless with desktop applications. Graph theory on the otherhand is an important, but pretty specific field. I.e. I don't think I've ever had to implement a graph or A* after the college course.

What I would recommend is a (math) course in logic and complexity theory (i.e. understanding the difference of O(n log(n)) and O(n^2) and O(2^n)). Those are always relevant.

Re:Study what you enjoy (4, Insightful)

boner (27505) | more than 4 years ago | (#30670220)

I second that, study what you enjoy and see where your interest takes you. I struggled with statistics when I studied for my masters, but my current job is steep in statistics and I am much better at it. Funny how that goes.... It's a lot easier to learn a Math subject when there is a real need to understand it present, otherwise it can remain abstract and obtuse.

The other piece of advice: do your homework, everyday, and don't give up. Seriously, I was a B+ student until my math teacher started checking my homework - I told him that there were other students more deserving of his attention. Within a few weeks I was an A-student...

As for making a choice, I would do both, but take the easier one first.

Re:Study what you enjoy (5, Informative)

Carewolf (581105) | more than 4 years ago | (#30670244)

True not all fields require math, but just to answer the question. Yes, choose what you like:

If you want to do algorithms and language theory, you need discrete math, graph theory, etc.
If you want to do graphics and signal processing, you need calculus (also called math analysis), geometry and differential.
If you want to do human computer interface, you don't need math (or a brain).

If you want to kick ass, you need all the introductory math you put your hands on (advanced university level math is too theoretical though and only useful for quantum physics and math majors).

Re:Study what you enjoy (0)

Anonymous Coward | more than 4 years ago | (#30670250)

I have to strongly second the parents recommendation to go with what interests you. The hardest course I ever took was a CS course recommended by everyone else as an easy option - the combination of a change of a lecturer and the fact that I wasn't interested were fatal. I also did several supposedly hard maths courses without the prerequisites because I was seriously interested and studied up on the background at the same time - I ended up with a PhD in that field.

As far as the two subjects go, I think I would find the discreet structures most useful to the programming that I do, but then I don't have a lot of interest in graphics. I also think that either course would be good for developing the kind of thinking that I find quite useful for programming.

Don't ask universities (1)

VGPowerlord (621254) | more than 4 years ago | (#30669844)

If you ask a university's Comp Sci. program, they'll most likely say either suggest some combination of 4-5 Calculus classes (Calculus I-IV and Multi-variable Calculus).

My pick (0)

Anonymous Coward | more than 4 years ago | (#30669864)

As a MS in programming (BS too) and a video game software engineer I recommend the Discrete Structures and Graph Theory (was also one of my favorite undergrad classes)

That depends on you... (5, Interesting)

geminidomino (614729) | more than 4 years ago | (#30669876)

If you're just worried about the programming (coding and maybe some design) side of things, then the math you need is going to be the math that applies to what you're coding (calculus for physics engines, algebra for accounting packages, statistics for reporting ,etc...).

On the other hand, if you think it will benefit you to know more about what underlies the code (it does me, but we may think in different ways), then I would say absolutely that you should take the Discrete. Computer Science is 95% applied Discrete Mathematics. Computer Science is also a lot of theory which, truth be told, tends to be very specialized in usage to developers unless they're going to the very low levels. After taking DM for my degree, I found that my code has improved, but I also admit that it is anecdotal.

If the economy has taught me (3, Insightful)

BigSlowTarget (325940) | more than 4 years ago | (#30669882)

anything its to take business math. It has to take some amazing math to turn - X billion in profits into +xx million in bonuses.

Discrete structures (2, Informative)

MxTxL (307166) | more than 4 years ago | (#30669884)

This is the fundamental math for computer science. The other is useful for other subjects, some of which will need software... but if you want powerful fundamentals, it's in discrete structures.

Re:Discrete structures (2, Interesting)

woboyle (1044168) | more than 4 years ago | (#30670132)

I would tend to agree that discrete structures is most useful for general purpose programming. However, if you plan on getting into the lucrative field of high-preformance investment programming (financial derivitives, real-time trading algorithms, etc) then the second would be a good choice. So, take the first one first, and if you can, take the second one later. Both will stand you in good stead.

FWIW, I used to write risk-analysis software for the options trading industry. We used a lot of calculus and differential equations in computing the theoretical pricing and risk factors of derivatives. However, before that I did about 20 years developing real-time manufacturing systems software and knowledge of discrete structures, formal logic, and proofs (to detect race conditions in complex systems) was most useful there.

Look into my eyes and it's easy to see (0)

Anonymous Coward | more than 4 years ago | (#30669890)

One and one make two, two and one make three

Be a Man, Take Both (1)

Skewray (896393) | more than 4 years ago | (#30669892)

Or be a woman and take take both; whichever suits you.

Re:Be a Man, Take Both (0)

Anonymous Coward | more than 4 years ago | (#30670126)

or take take take both

Discreet! (0)

Anonymous Coward | more than 4 years ago | (#30669896)

This Discreet structures with graph theory. Unless you know you will be programming math applications, get the discreet structure knowledge. You will use it forever. Forever.

- AZ

set theory (0)

Anonymous Coward | more than 4 years ago | (#30669906)

I've taken 5 semesters of calculus, and the most useful math I've ever learned for programming is set theory. Tremendously useful in the database world, it'll make CJ Date's "Introduction" make much more sense.

Take the More Difficult One (0)

Anonymous Coward | more than 4 years ago | (#30669908)

you will learn more.

Discreet? (0, Offtopic)

ari_j (90255) | more than 4 years ago | (#30669910)

Is the one class actually called Discreet structures with graph theory as you put in quotes? If so, then it's got my vote as having the best name.

Seriously, I only clicked on this story to make the joke that you should take "the discreet math classes" because that way the ladies won't have to know, but then I read the rest of the summary and you did most of the heavy lifting on the joke for me. Thanks!

Re:Discreet? (0, Offtopic)

camperdave (969942) | more than 4 years ago | (#30670234)

Seriously, I only clicked on this story to make the joke that you should take "the discreet math classes" because that way the ladies won't have to know, but then I read the rest of the summary and you did most of the heavy lifting on the joke for me. Thanks!

In other words, "Sigh! So much for my +5 Funny"

Discrete Structures for sure.... (1)

ibm1130 (123012) | more than 4 years ago | (#30669918)

You can never have too much math so you should, if possible, take both. Having said that the option that maps most directly onto your space is the "Discrete Structures" course.

Set Theory (2, Insightful)

hightower_40 (1167627) | more than 4 years ago | (#30669924)

I believe that my courses on Set Theory (aside from the obvious basic maths like Calculus and Differential Equations) have been the most useful to me as a programmer. It looks like 'Discrete Structures with Graph Theory' may be the way to go, but I recommend taking as much math as you can. Like an earlier comment stated, "Make time for it".

Anonymous Coward (0)

Anonymous Coward | more than 4 years ago | (#30669930)

Discrete structures. Its more useful on a day-to-day basis than the other class.

one million seconds (0)

Anonymous Coward | more than 4 years ago | (#30669936)

sometimes also called "about eleven and a half days"

I was a math major, work as software engineer now (5, Informative)

jockeys (753885) | more than 4 years ago | (#30669938)

and pretty much the only math I use on a daily basis (when writing code and designing software) is the discrete math. (I did take both classes when I was in school, and lots more besides) so, in my experience the first course would be much more useful.

Re:I was a math major, work as software engineer n (2, Insightful)

PmanAce (1679902) | more than 4 years ago | (#30670120)

Same as me, well almost. I was a math major and before that I was a computer science major, so I have both. Unless you are working on a latest game engine in a video game company, chances are you will be using set/group theory more from your first class. I speak of experience, I actually work in one of the top 3 video game companies in the world and yet I am using more "math" from the discrete branch than the calculus branch. But yea, do both as someone else said, I am glad I did.

Discrete Math, For Sure (1)

MarkPNeyer (729607) | more than 4 years ago | (#30669944)

The first course will be far more useful to you than the second course. You need a solid background in discrete math to prove algorithms are correct and to prove things about their running times. The second course would be more useful to someone who will need advanced math for modeling things. Even if you eventually go on to take the second course, the first will definitely prove useful to you.

Takje the algorithms course. (1)

argent (18001) | more than 4 years ago | (#30669954)

I would take the algorithms course first. I'd suggest taking both of them, since it sounds like you're not doing nearly enough math, but graphs and algorithms are central to so much computer science that it will definitely help to take that one first.

Set Theory / Boolean Logic (5, Insightful)

Gothmolly (148874) | more than 4 years ago | (#30669958)

Venn Diagrams. Intersection. Union. AND/OR/NAND/NOR

I constantly run into people screwing stuff up because they get lost in the logic of stuff like "if this is part of that group but not contained in this set".

If you select the non-euclidian option (2, Funny)

Rix (54095) | more than 4 years ago | (#30669966)

Don't rent the attic room in that really old house. No matter how cheap it is.

Re:If you select the non-euclidian option (0)

Anonymous Coward | more than 4 years ago | (#30670448)

Don't rent the attic room in that really old house. No matter how cheap it is.

Thanks for the advice Mr. Gilman.

Either or Both (1)

vitaflo (20507) | more than 4 years ago | (#30669972)

First, any math class can be useful to programmers. I went full double major CS and Mathematics and found all my classes useful. Set Theory perhaps is the most closely related to CS, but all of them can have value depending on what you get into after your studies. Also, whether one is "harder" should not make a difference. If anything it should make you want to take it more. Exercise your brain in all different ways, it will benefit you in the end regardless.

Take the easier course (3, Insightful)

Locke2005 (849178) | more than 4 years ago | (#30669974)

If you struggle with math, I would definitely take the discrete structures class, not the second class. 3D Vector Calculus (e.g. Maxwell's equations) was one of the toughest subjects I've ever taken, and guess what -- I've never used it since! Set theory, on the other hand, is used constantly in CS; in fact, boolean algebra is just a subset of set theory, and I believe Relational Databases are built on top of set theory.

Re:Take the easier course (0)

Anonymous Coward | more than 4 years ago | (#30670442)

Take the easier one and turn up to the harder one too, if in your real courses gets too hard then stop turning up to the harder one, if not take notes and learn the materials in your spare time. This will be almost as good as taking the course (hell if your university isn't strict you can turn up to everything except tutorials and even get your work marked), plus you can't fail it.

English first (0)

Anonymous Coward | more than 4 years ago | (#30669976)

If I were you, based on your submission, I'd work on my English first. All the math in the world won't make you a better programmer in the field if your written communication is that poor.

Discrete underpins everything. (0)

Anonymous Coward | more than 4 years ago | (#30669996)

Discrete math and graph theory underpin Computing Science (notice computing, not computer). This will give you the background for algorithm theory, computability and complexity, and automata modelling.

The vectors and differentials will be usefully applied to some specific solutions you develop, especially graphics, but discrete/graph math underpins development itself.

IMO (1)

scubamage (727538) | more than 4 years ago | (#30670006)

I'd go with algorithms and logic if you can only choose one of the two. While the other stuff is doubtlessly useful, nothing will serve you better in programming than a firm understanding of algorithms, and logic which can be used to know when to employ them and how to create them. Just my $0.02, YMMV.

Discrete FTW (1)

jdkramar (803337) | more than 4 years ago | (#30670010)

I am a CS student, and out of all 7 of my advanced math classes, the ONLY one I have ever found useful with programming is Discrete.

Discreet structures with graph theory (1)

dstrupl (588119) | more than 4 years ago | (#30670026)

is the one that you will find usefull for actual software development. The second one will just give you math "background" (which might not be that bad but probably not what you ask for).

embrace the pain (3, Informative)

bl8n8r (649187) | more than 4 years ago | (#30670036)

if you don't have a good understanding of algebra and geometry, computer graphics coding is going to suck for you. You will not only find the work daunting, but your coworkers will be very frustrated with the duct tape work-arounds you will need to employ in order to compensate. My advice would be to work your butt off to grok both classes. It will only make your quality of work life more enjoyable later on. Trust me, math hated me as much as I hated it and I've had to go back and do it over.

Take the First (1)

Mr. Sketch (111112) | more than 4 years ago | (#30670038)

The first set of topics will give you a solid foundation that you can apply to many areas of programming. I think Discreet Math, sets, algorithms, and graph theory can be used in a wide variety of fields to solve many types of problems.

The second set of topics will help you in some very specific programming tasks related primarily to games, AI, and graphics programming, which comprise a small fraction of total programming jobs. Also, you don't typically need to be intimately familiar with vectors and euclidean spaces, beyond what a simple google search will tell you about them, in order to use them effectively.

Re:Take the First (0)

Anonymous Coward | more than 4 years ago | (#30670342)

I agree 100%. Take any and all math you can get your hands on. Those things like geometry that are applicable to the real world in a very direct way are a great place to start. You will also need the highly conceptual side of math for the optimizations that will make your code efficient.

Carl (0)

Anonymous Coward | more than 4 years ago | (#30670040)

Take Discreet structures with graph theory. I was a CSCI major, and I think from a programming perspective, that class was one of the best math classes I have ever taken.e

Only need algebra for most grunt programming work (0)

Anonymous Coward | more than 4 years ago | (#30670052)

For most business related programming you really only need a good grasp of algebra and some set theory (for SQL), the basics covered in high school will suffice. If you want to get into some serious Wall Street level quant programmer jobs and bill more than $250/hr (yes, for real) then you need an advanced degree in Maths. Not sure what you need for 3D game programming. Bottom line however, if you just want to crank out business apps then algebra is all you really need.

both of those! (0)

Anonymous Coward | more than 4 years ago | (#30670062)

I do computational biology. Both of those would be useful.

take Discreet (4, Insightful)

trybywrench (584843) | more than 4 years ago | (#30670068)

Set theory and graph theory come in handing when programming.

Some variation of the "traveling salesman" problem, a graphing problem, shows up in every industry out there so it would be a good idea to be familiar with its nuances and the various approaches to getting it mostly right (i don't think it has been solved).

Set theory is a good place to start thinking about just about anything. You'll probably also cover combinatorics, formal logic, and predicate calculas along with set theory which are also great tools to have when programming.

I'd say it depends what you want to program (3, Informative)

sab39 (10510) | more than 4 years ago | (#30670086)

I'm not directly familiar with either course (and the one-word summaries are a bit limited for providing informed advice!) but it sounds to me like the first one would be generally useful and you should take it regardless of what programming you intend to do - it sounds like it covers sort of the "mathematical fundamentals of programming". The second sounds more like it's useful for certain *types* of programming - perhaps 3d or game programming. Unlikely to be terribly useful for writing database-backed web applications, for example.

Neither (1)

biggerboy (512438) | more than 4 years ago | (#30670094)

Take other classes, like Econ 101. Get a broad education, and with real life applicability.

Plus the chicks are hotter.

Discrete, NA, then PDE (5, Interesting)

Dr_Art (937436) | more than 4 years ago | (#30670102)

Take the Discrete Math stuff first since you are just beginning to learn Computer Science and it will fit better with those courses. You should then take Numerical Analysis to totally break your concepts that computers are precise. Finally, take the classical Calculus & Differential Equations track just so you can take Partial Differential Equations, at which point the math will start becoming useful for real world Engineering problems.

Depending on what kind of programmer (0)

Anonymous Coward | more than 4 years ago | (#30670118)

It all depends on what kind of programmer you wish to become. All coders require basic algebra... isolate variables, some basic math skills. Obviously, boolean math is important. Some very basic math functions understanding is also necessary.

Then, 3D requires proper matrix knowledge, financial requires solving knowledge, sounds and music requires linear algebra, and so on.

I cannot say one is better than the other, since I don't know what makes your heart beat and where you want to go later on. If you are unsure, I'd go with something that basically covers the widest range of topics, while not being an expert on any of these, you'll be able to pick up what you're missing as you go in your programming career.

For example, if you wish to do 3D, you'll do tesselation algorithms once and then you'll know how it works, but beforehand, you only need to know the technique exists. Then, if you are expected to better up what you did before, you'll be able to dwelve in arcane books and publications, and improve on the algorithm.

My $.02 - graph theory and discrete math! (3, Insightful)

david.emery (127135) | more than 4 years ago | (#30670124)

I'd strongly recommend going with choice #1. There's a huge amount of application of graph theory, etc. in both computer science and in practical programming.

My undergrad degree is in Math, and I have -never- used anything I learned in the classical mathematic topics past linear algebra. The courses in statistics and probability, and the 2 Operations Research courses (I was very lucky to get both of them) have been the really useful items. Unfortunately I was unable to take the graph theory course, but I bought the book anyway.

In conversations with my Alma Mater, they have substantially changed their curriculum, moving away from the classical analysis topics and more into discrete math.

Depends what programming you want to do (1)

dkleinsc (563838) | more than 4 years ago | (#30670130)

For most programming, discrete is very useful, as well as being one of the more fun math courses you can take. It definitely helps in understanding CS theory, and a lot of the more interesting CS problems out there are graph theory questions (e.g. vertex coloring). If you're looking at, say, attacking the whole P vs NP-complete question, that's the way to go.

However, if you're expecting to do game or scientific programming, then the vectors, calculus, and statistical work of the other course will probably serve you better.

The absolute last standard I'd use for picking courses is which one is easier/harder (which the assistant might also be doing, just pushing you in the other direction). It depends a lot on who's teaching what, for starters. Plus, in college, your goal should be to learn something, not just to take the "easy" classes and get out of there with a good GPA.

Agebra... (5, Interesting)

RingDev (879105) | more than 4 years ago | (#30670136)

Proofs, proofs, then more proofs.

Programming is all about isolating the smallest part of a problem and simplifying it out. Doing proofs is effectively the basis for programming.

Understanding trig and calc is handy for specific projects, but for every single program we write we have to be able to see the problem, to isolate components of the problem, and to simplify them.

-Rick

Discrete (1)

jacksinn (1136829) | more than 4 years ago | (#30670140)

I had to take a symbolic logic and set theory class in undergrad that had a book written by our professor. Though initially tough it has proved invaluable to my thinking patterns and knowledge of computer science.

Finite Mathematics FIRST (2, Insightful)

omb (759389) | more than 4 years ago | (#30670154)

Do the Algebra/Logic first, it is more directly applicable to computing and will allow you to understand undecidability (Goedel) computability (Turing) and of course graphs, groups and algebras. Also modern approaches to what people call Calculus, ie diferentialability etc are much more algebraic in the arena mathematicians call Analysis. Read Don Knuth's Fundamental Algorithms in parallel

Discrete math (1)

Dennis Sheil (1706056) | more than 4 years ago | (#30670158)

For my Computer Science degree, both of those courses were required.

If you are only going to take one, I would recommend discrete math. It is more programmer oriented - algorithms, solving problems with discrete math, doing proofs for equations and so on. This is the stuff that comes up in programming again and again and again.

As far as the other math subject you mention, differential calculus and so on, that also comes up in programming, and it is good thing to know it.

But if one or the other, discrete mathematics is more important to understand in order to do programming.

Graph Theory (1)

bstamour (1053588) | more than 4 years ago | (#30670162)

If I had to choose one of the two listed, I would go with the first. As a student currently finishing his CS Undergrad I can tell you that discrete maths like Combinatorics and Graph Theory will help you much more than Continuous maths like analysis and calculus. I'm not saying Calculus isn't important -- it is to an extent when you're working with the design and analysis of algorithms, but Graph Theory is something that you should not miss out on.
Graph Theory is used all over CS: it can be used to model network flow, it can be used in AI to represent search spaces, and don't forget that the majority of cool data structures fall directly from Graph Theory. If you're looking for more practical uses, think of the flow of a computer program. You can use vertices to represent states of your program such as assignments, branches, and so on. Connecting these states with edges determines the flow of your program.
Plus, overall Graph Theory is fun to do! The proofs are rigorous, but everything is very easy to visualize. If you're having trouble with a concept, in most cases it's easy to draw up a graph and see for yourself that some theorem holds. All in all, it's quite an experience, and as a Computer guy you'll definitely get more practical uses out of it.

What? Math for programmers? (1)

thered2001 (1257950) | more than 4 years ago | (#30670164)

I always thought it all boils down to simple arithmetic. Add, subtract, bit shifts...etc.

He's an idiot. (3, Interesting)

bluefoxlucid (723572) | more than 4 years ago | (#30670168)

Discrete maths are more useful because you can prove the operation of your program. The other crap is useful for you to write scientific applications, physics simulators, and clones of Quake-- in which case, you need to be able to understand your own complex logic flow to make sure your program is executing those complex mathematical computations correctly, on the correct data, with the correct output.

Take both (2, Insightful)

xZgf6xHx2uhoAj9D (1160707) | more than 4 years ago | (#30670172)

You could take an entire math degree and still not have enough math to be a decent computer scientist (being a programmer is another matter, I suppose). Discrete math (or at least I hope you meant to say "discrete". "Discreet" math would be much less useful) is extremely useful for all areas of computer science. Analysis is extremely useful for a lot of areas of computer science, but I don't think as comprehensively as discrete math.

Re:Take both (1)

xZgf6xHx2uhoAj9D (1160707) | more than 4 years ago | (#30670210)

To follow up on my own post, the big practical advantage to the first course is graph theory. Graph theory is a huge field and I have yet to come across any discipline of computer science that does not reduce to graph theory.

Take both now! It'll pay off. (0)

Anonymous Coward | more than 4 years ago | (#30670176)

Take both for sure!
The first will strengthen you comprehension of logical constructs and help facilitate those times when you must create an algorithm to solve a tough problem as well as making it easier to understand the working nature of algorithms you apply every day, like searches and sorts, and the second will allow you to open the wide world of graphics and 3D computer modeling. I took both and constantly find discrete math concepts help me to structure my design and logical flow as well as helping understand others work, when approached as a system of logical functions, and i find vector, matrix and spatial math is immensely valuable any time i design a simulation, usually motion, in 2D/3D and of course in any instance where i want create a graphical application in 3D.
And, really, you're better off suffering both now instead of finding yourself in your professional career and needing to teach yourself a complex subject - i wish i had studied higher level maths as i find i have to teach myself if i want to learn them now...and as we all know, that takes lots of self discipline and time, two things i don't always have extra of.

It's all about algorithms (2, Insightful)

Tharsis (7591) | more than 4 years ago | (#30670180)

Programming is about algorithms. Proving them, or better yet, deriving them (you may find deriving is a lot easier than proving, I did). Graphs may come into play, but that depends on your particular interest, they do give a great insight into complexity though. Knowledge of sets is extremely useful.
To me the first looks absolutely essential for a computer scientist. The second is nice if your interest lies in that direction, but it doesn't have anything to do with programming in general (it does seem essential for a mathematician though).

My advice: Learn Logic rather than math. It is far more useful.

Depends... (1)

Slash.Poop (1088395) | more than 4 years ago | (#30670182)

I know personally I am a JAVA programmer...JDBC, GUI, logic...and I SUCK at math. I never understood why everyone always told me I "you need math if you are going to program".

Well I am here to tell them "No you don't!"

My career is doing quite well and I have been able to program anything that has been put in front of me.

The class you want is called 'Numerical Analysis' (1)

shawnap (959909) | more than 4 years ago | (#30670186)

Start by not taking anything called 'Selected Math Chapters'.
Analysis, multivariate calc, and differential equations are fundamental subjects. If you want a background in math then you need more than just the first third of each.

Depends on the Problem (2, Interesting)

hardburn (141468) | more than 4 years ago | (#30670188)

It ultimately depends on the kinds of problems you're going to end up working on. Any sort of graphics programming is going to require a solid understanding of geometry. Designing games requires probability/statistics, where the actual math could often be understood by a bright junior high student, but gets combined in complicated ways.

Calculus is overrated for anyone not going into Physics or Engineering. I wish schools would put more emphasis on statistics instead, since that's useful for anyone who picks up a news report and sees that there's a 2% spread of support for a pair of political candidates.

More importantly than any of that, IMHO, is being able to see how the program fits together on an abstract level. This can be described as a form of math, but it's well outside of what most people think of as math. Which is fine, because what most people think of as math has nothing to do with what mathematicians do all day. Just the same, it's not necessarily anything that gets taught by formal math courses, either, at least not directly. Rather, more advanced math leads to better abstract thought in general. So just take more math, whatever it is, and you'll be indirectly learning how to be a good programmer.

Linear Algebra (1)

RockClimbingFool (692426) | more than 4 years ago | (#30670190)

Linear algebra is how every single difficult problem is ultimately solved on a computer.

Ordinary Differential Equations (ODEs), Partial Differential Equations (PDEs), Vector graphics manipulations, etc. are always reduced to a system of linear equations to produce an approximate solution.

Learn linear algebra first, how to program its solutions, then move on from there.

Graph Theory for non-programmer communication (1)

wagr (1070120) | more than 4 years ago | (#30670192)

I'm no longer working on engineering systems, I deal with more common users on business management software. I have to interact with clients and executives with no clue what a developer actually does.

Constantly, my thorough (that was a painful class) grounding in boolean logic helps me to write concise code.

Often, I use my discreet structures knowledge to split up a my work in to manageable chunks.

Sometimes, my understanding of graph theory to helps me explain concepts to non-programmers.

Rarely, I use concepts from vectors when designing code or describing a concept to another high-end programmer.

I haven't used any basic math above algebra (ex. trig or calculus) since 1990.

Depends what kind of programming interests you (0)

Anonymous Coward | more than 4 years ago | (#30670208)

'Discreet structures with graph theory' will be more helpful for most programming. The methods of reasoning you will be exposed to in discrete math will help you reason about programs, and make you a better programmer.

        If you plan to write software that requires simulating physical systems or 3D rendering, 'Selected math chapters' is definitely worth taking. However, if you can't take both, the discreet math class should take priority.

        I assume you are a college student. Do not be afraid to take classes that you think are too hard. If you have no hope of getting a good grade, consider auditing the class. You get two things out of collage:

1) An education.
2) A degree with a GPA.

When I was in school I feared hard classes because I would have a lower GPA. I knew the education was valuable. However, I thought that because the degree and GPA were measurable to employers, they were more important. This is true for your first job out of school, but becomes less important over time. Ten years out of school, an employer will care what you achieved at your last job more than your grades in school. You should try to get good grades, but you are hurting your education more than helping your GPA if you get good grades by avoiding hard, important classes.

Re:Depends what kind of programming interests you (1)

Nadaka (224565) | more than 4 years ago | (#30670360)

Discreet has more practical application to designing software and understanding compilers themselves. Practical applications of graph theory apply to the design of state machines and numerous other programming topics. However, if you have the time, do both. You can never have to many maths.

Pick the best professor - Choose linear algebra (1)

yoghurt (2090) | more than 4 years ago | (#30670222)

An engaging professor is worth a lot. A good professor can make a dull subject come alive. A boring one can do the opposite.

Also, there are many flavors of math so you might want to sample to see what suits you. I would suggest a course in "linear algebra". Linear algebra has very low prerequisites - basically arithmetic - there are no "limits" to be taken. It is very useful for almost everything technical and it offers exposure to theorem and proofs. Plus you can use Octave (or Matlab) to try out programming with vectors and matrices and get some hands-on experience with the concepts.

The only math you need is (1)

140Mandak262Jamuna (970587) | more than 4 years ago | (#30670266)

arithmatic. Billing rate times billed hours. Remember, if your job actually requires that high level of math, most likely the pay will be very poor. The real money is in writing SQL queries to data bases for finance software.

Basically the logic goes like this. Jobs requiring high level of math are managed by people with high level of math knowledge. They tend to be hard nosed and quite stringy with money and difficult to bullshit with and get a phat pay check. Financial managers, on the other hand, are often clueless and they overpay, they can be hoodwinked into believing the job is much harder than it really is.

If you don't take both, you suck. (0)

Anonymous Coward | more than 4 years ago | (#30670278)

Seriously, if you applied for a job but the interviewer told you some people said it was hard, would it stop you? My guess is that you would ask slashdot again. How about some background information about your interests? What kind of decent computer science program doesn't require both? My advice: Don't ever tell anyone that you had to ask slashdot to decide what classes to take!

Depends on what you like/want (1)

Zen-Mind (699854) | more than 4 years ago | (#30670300)

I'm a software engineer so I had both, plus some more, plus physics classes so I've been doing "math stuff" a lot. IMO, discrete mathematics is probably the best "generic" choice as it is mostly geared toward logic. However, if you want to do 3D work or work with algorithms, you should take "analysis" because the match concepts will be more advanced. In the end, I think the math class that was the most useful in every day work is neither, it's statistics, but that is another story :).

Take both, but graphing first. (0)

Anonymous Coward | more than 4 years ago | (#30670306)

As a former CS instructor, I'd take the graphing before the vectors. It has wider immediate application to your coursework. Then, I'd take the vector course - especially if you are interested in graphics or physics modeling.

As much as possible, but consider others (1)

FreelanceWizard (889712) | more than 4 years ago | (#30670316)

Optimally, you'll want to get as much math as you can, especially in the realm of proofs, number theory, and combinatorics. They're particularly useful because they directly map to computer science in computational complexity and computability. Knowledge of complexity and the ability to establish the best, average, and worst case performance of an algorithm is quite helpful in ensuring your programs run quickly -- especially if they have slow parts outside of your control (GC, I/O, etc.) or if you're working on large data sets where the difference between O(log n) and O(n log n) can be substantial. On that basis, I'd recommend taking discrete structures with graph theory. Personally, I don't see where the advantage of the selected math chapters course is for a software developer, unless you're planning on coding for domains such as engineering or quantitative finance; however, as I said, the more math you get, the easier certain topics will be for you (e.g., functional programming).

That said, you might also want to consider taking a course in computational linguistics if one's available; they're often offered out of your local psychology department. Computational linguistics deals with large to enormous data sets and will teach you how to work with techniques such as dynamic programming, caching, lambda expressions, tree traversal, and probabilistic models. It's a great fusion of math, linguistics, and computer science that I feel is an excellent capstone course. If you can't find such a course, I'd still take the general principle here and look for a course that will require you to integrate your computer science and programming experience with some other field. The more connections you can find between your pure computational knowledge and the real world, the better the developer you'll be.

Discrete Math (0)

Anonymous Coward | more than 4 years ago | (#30670336)

If you can only take one, definitely take Discrete Math.

It should not be an easy class if Math does not like you, but the algorithm and graphing portion are very large programming topics. Sets certainly are too, but proofs are more of an academic game.

The other stuff, vector algebra, etc, are useful topics, but not nearly as useful as understanding algorithms and graphing (if you understand graph theory, then it helps a great deal with understanding a lot of very important programming paradigms).

definitely discrete (1)

Surt (22457) | more than 4 years ago | (#30670348)

I use concepts from my discrete class on a daily basis, and have at my game software job, my enterprise software job, my cable tv software job, and my gps software job.

I've also taken the other kind of class, but I've never used:
math analysis; euclidean space, differentials in 15 years of work.

I have used vectors on occasion, but that is really not hard to pick up.

take discrete (0)

Anonymous Coward | more than 4 years ago | (#30670366)

While math certainly is not required for most programming jobs it certainly helps. I double majored in math and CS in college and the math always comes back in strange ways to help me solve problems. Also doing mathematics trains your mind for solving problems. Even if you don't use all of the stuff you learned directly the mathematical maturity you gained by dealing with all the abstractions will help you be a better problem solver.

I'm a math nerd so I would say take both classes if you can. If you had to choose one, discreet math and graph theory is defiantly more readily applicable to computer science. Many programming problems involve graphs somehow. Discrete math techniques commonly come up when analyzing algorithms.

LOGIC is needed. not mathematics per se. (1)

unity100 (970058) | more than 4 years ago | (#30670368)

programming is about logic. causes and effects. about interactions in between created, derived logic sets.

mathematics is a much more bigger procedural set which bases all its procedures and operations and practices on the framework of logic. its, therefore, a derived set.

what you need to know good is logic. if you are able to utilize logic good, you will be able to do good programming. being a mathematician would help only because you would sharpen your logic skills while working on mathematical problems. if you already have a good logic skill, or you have other ways to develop your logic skills, you dont need to take on mathematics.

after all, the basis of all thought is logic. the keenness about understanding base interactions and cause effect relationships in between concepts. anything else is derived.

Useful Math (1)

orclevegam (940336) | more than 4 years ago | (#30670378)

The problem with the relationship between math and programming is that math is of absolutely no use to a programmer, except when it is. That's a rather obtuse way of saying that all the math in the world won't make you a better programmer if you don't already have the foundations of programming, but if you've already mastered most facets of programming knowing more math will help you. Depending on exactly what you're doing, and with what languages you're doing it, you'll get more or less use out of different math fields and theories, but exactly what you'll find useful is going to vary wildly from project to project and language to language. Of course your basics like algebra will never steer you wrong, and to a lesser extent calculus can be useful. Beyond that a light sprinkling of statistics, basic boolean logic theory, and the odd bits and pieces from set theory are all you'll really need unless you're using something specific for the project at hand in which case you'll probably need to brush up on whatever it is anyway. Since your in school now you might as well expose yourself to as wide a range of maths as possible in case something should happen to prove useful down the line, but I wouldn't be too terribly worried about it if you struggle with anything specific as you probably won't need it anyway, and if you do you can worry about it then. The most important thing to take away from it all is a basic understanding of what's out there available to you so you know what to go looking for in the future.

Can slashdot get rid of "Ask Slashdot?" (1, Insightful)

Anonymous Coward | more than 4 years ago | (#30670382)

Or at least remove it from RSS? I swear, it feels like half the "news" that comes through the RSS are these banal, you should have asked them on a forum, questions. I pay attention to slashdot for the news, for the things that you see here first, not this banal "gee, I have a question that I really should have asked on a niche message board" chatter. At the very least, would it be possible to simply do an RSS feed WITHOUT the ask slashdot waste of time so that my RSS reader isn't constantly warning me of "news" that is simply a waste of time?

Check your curriculum (1)

Sheepless (783722) | more than 4 years ago | (#30670388)

I took both (2 semesters of discrete math, in fact; 3 semesters of traditional math). In my work, primarily in integration and web apps, I find the set theory and discrete math (logic) a lot more useful. However, if you do other things, you might find the "traditional" math more useful. But I wanted to share that in my own curriculum, I was required to take an Algorithms and Data Structures class that covered almost exactly the discrete math topics. I took them at the same time. The A&DS class was (in theory) more practical, but much of the theory was the same. Learning proofs will make your brain hurt (in the "no pain, no gain" sense), but I doubt you need both A&DS and discrete math unless, as others have pointed out, you plan to go for a PhD and go into research.

Know your Algebra (0)

Anonymous Coward | more than 4 years ago | (#30670392)

I am not a programmer by trade but have written lots of small programs over the years. I first majored in electrical engineering and later switched and graduated as a math major. One thing I know from experience, the study of math continually sharpens your analytical abilities.

I cannot speak to the latter course you mentioned, but the Discreet class that I took was one of my favorites because of it's practical application of logic to several different areas of Math.

I contend that the most important field of math for programmers is algebra. I worked in a computer lab while attending college and most of the questions arose out of a lack of understanding of algebra.

Another vote for Discrete (1)

SocialEngineer (673690) | more than 4 years ago | (#30670400)

The bulk of what you learn in that class you will end up using in some practical sense, especially algorithms, if you have no prior study of such. Plus, discrete math (to me) was a more enjoyable subject.

Practically speaking (1)

nodrogluap (165820) | more than 4 years ago | (#30670428)

Discrete if you plan on developing algorithms or data structures

Vectors etc. if you plan on doing 3D graphics or physical process simulations.

During my programming career, I have used every math and stats I've ever learned in a course. So like tohers say, take both. By the way, discrete was my worst mark, but also where I learned the most.

Take BOTH courses, in the order you listed them. (2, Insightful)

Slipped_Disk (532132) | more than 4 years ago | (#30670432)

You should probably take both of these courses: requirements aside, both are important for a truly solid CS education.

Take Discrete Structures first, especially since it has graph theory rolled into it. This will be more directly applicable to your CS coursework as discrete math and graph theory pop up EVERYWHERE, and when you get out into the real world you'll benefit from a solid understanding of these concepts.
Math Analysis will be useful too, as will the linear algebra components that seem to be buried in that class somewhere.

As others have said, make sure you get a good professor. Sit in on a lecture if they'll let you. A dull, droning, Ben Stein type teaching either of those courses will cure your insomnia, but your GPA will suffer.

Final word of wisdom: Do not take the advice of a random (non-CS) teaching assistant, "general" academic advisor, or (ESPECIALLY) Slashdot. They're idiots (even me). Talk to other students, professors in your department or your major advisor for course order recommendations.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>