Computer scientist (and ex university lecturer) masquerading as software engineer here.
As pointed out above, when most people say “Math” they are usually thinking calculus, linear algebra, and the like. But this is a very narrow view of mathematics. We used to teach a unit of mathematics to the undergraduates - discrete mathematics - that I would count as vital to anyone who aspired to be any use as a programmer. Other areas of mathematics that are used on an everyday basis by many many programmers include linear algebra for graphics, Fourier transforms, and basic statistics.
The nature of computer algorithms is purely mathematical. The ability to prove an algorithm works, and to derive its complexity and reason about its efficiency is crucial. As we move into the realm of multi-processors and distributed computing systems these skills become more and more important. Any fool can create a parallel algorithm that runs no faster on many processors than on one. It takes a lot of care to create one that is both faster and correct. The ability to debug such systems requires very clear analytic skills, and a depth of knowledge about the system.
Analytical skills are mandatory, and creative skills are very useful if you want to be anything more than a hack programmer implementing other people’s designs.
Software engineering is not the same thing as programming. It is mostly harder. It involves taking on the questions of delivering and maintaining a complete program artefact. The coding of the system is only a small fraction of the responsibility. It requires design, test, management, scheduling, risk analysis, documentation, and lots of process to make sure that things happen, and things don’t get missed. These skills are really neither math nor language. Some people are naturally more adept at fitting into this than others. As a rough rule, I would say that the really gifted programmers often don’t fit in so well. Although they probably need to more than they realise.
With the exception of logic, programmers use a modest amount of Math (mostly discrete Math but sometimes some Calc and such). Not nearly as much as a lot of disciplines, e.g., Engineers, Physicists, etc. And they don’t do much Math in the sense of what a Mathematician does.
So treating Computer Science as a branch of Mathematics is weird. If that were true, then all Sciences and Engineering would be branches of Mathematics.
But logic, that’s the king, queen and grand poobah rolled into one. Thinking logically about everything all the time is important.
So I’d say it’s a logically driven activity, and saying it’s a mathematically based one is ~correct but a bit misleading.
I can’t believe I’m about to say this but at least for me it’s more of a language based activity. Actually I find it to be more a “writing-art” than anything else. I mean the other posters have said it, most of the time the math isn’t that complex. Some algebra, some logic, pretty basic discrete math, and I hear if graphics are involved some linear algebra.
However I say it’s writing because once you get beyond the basics of getting it work most of the important stuff is how you lay it out. At least for me getting it to be “readable” is the hard part. That’s things like breaking concepts up into functions with reasonable names.(Which I guess is like an author breaking up parts of his books into paragraphs and chapters and naming them.) Of course commenting my code to a resonable degree which now that I think of it is kind of like putting in footnotes. (You’d be surprised how often I’ve seen a fellow coder/SE do some hack and then not explain what drove them to do the hack in the first place.) Of course like any good author you need to go back over what you’ve written and see if it still makes sense to you and if you could explain it in simpler terms.
Actually now that I think of it I hear that there’s one thing that good authors need to do that good SE’s absolutely need to do, research. I mean at least in my career I’ve seen SE’s basically re-invent the wheel which should set off warning bells.(I’ve seen people write their own quick sort function multiple times in the same app when the language actually had one built in. A lot of things are solved problems, you don’t need to create your own solution especially since it will probably suck.) I cringe when I realized the guy before me went on a non-stop code binge and didn’t research anything that would have for god sakes helped him. (“Oh I don’t have time for that” from that same guy who also went out of his way to defeat language features like type checking. :rolleyes: )
Anyway on a basic level it’s math but to do it well it’s more language.(Since in theory a big part of software engineering is feature enhancements and project maintenance. Just try to do that if the code is an utter mess.)
I think the real reason is that it is the ability to think things out logically and clearly is essential to both math and programming. So good programmers are likely to come from the subset of people who were “good at math”. But knowledge of calculus or even HS algebra is hardly ever used in programming. But here’s a good question for aspiring programmers: How many numbers are there in the range 10-100? It is amazing how many people think it is 90. And a source of many programming errors (the “off by one” bug).
Well, “Computer Science” is a pretty ill-defined discipline, which I think is the source of your confusion. You seem to be equating CS with programming, which I agree is several steps removed from mathematics. When I did my CS degree, the courses I took ranged from Real Time, which was a hard-core programming course with very little math, to Formal Languages and Parsing, which was just a subfield of set theory and had absolutely no programming whatsoever. It’s the latter kind of “Computer Science” that has lead CS to often be treated as a branch of Mathematics.
For me the language component appears to be 0% for the actual act of designing/creating software other than when required to interact with other people.
It’s all about modeling abstract ideas in the brain visually and creatively manipulating to solve problems. The program that gets typed in is a translation/projection of what’s in the head.
There are two types of English majors: One likes to write free verse about the experience of the soft rain. The other knows all the comma rules and can write a sonnet. The latter is also a logical thinker who can organize things and follow rules, and can be a darn good software writer. He or she can probably also understand user requirements, communicate them clearly to others, and create the appropriate documentation.
IMHO the reason math is used as an entry point for a lot of computer-related professions is that it absolutely requires logical thinking. However, many English majors are also excellent in this skill. It really is essential for effective writing.
Formal Methods provides a framework for software development that has a pure maths basis - using formal methods you can formally (mathematically) prove that a program is correct.
There are a number of programming languages that implement some aspects of Formal Methods - as these languages develop and implement more of the formal methodology, software reliability will improve, particularly for critical and embedded systems.
They didn’t teach it to you, but you can rest assured that real time programming uses a lot of math.
As for the OP, it generally doesn’t require much in the way of math skills to implement an algorithm that someone else came up with. It’s the guy who invents the algorithm in the first place that needs the math.
It’s also worth noting that even if writing programs doesn’t look mathy, it secretly is, and there are languages like Haskell and OCaml that don’t hide those details like most other languages do. There probably aren’t that many Haskell programmers without a strong math background.
And it’s not merely a single level of abstraction but often multiple levels are required. If you want to write a quick script to do something, that’s a single level and will be fairly straight forward. If you are designing a system, there will be multiple levels which will have to be perfectly integrated.
Even within some programming languages there can be multiple levels in the sense that there can be variables used to represent other variables (pointers).
So the real issue in programming, especially once you get to the professional level, is the overwhelming complexity of the systems you deal with. There are no concepts that are particularly difficult to understand. It is the practical application of those concepts to complex systems that is important.
Of course we have to stress the related issue to this which is maintainence/feature enhancement. (Which is one of those big issues in SE) But you’re familiar with this already but most of the stuff we work on are not one offs. IE somebody is going back there later either to fix bugs, fix things where the specs were wrong, or add new features that somebody in management just came up with. (We both know how much it sucks if the guy who first implemented it didn’t follow any SE standard and just threw together one huge hack.)
I think you are only somewhat correct. There are some algorithms (sorting, compression, cryptography, support vector machines, etc.) that have benefited greatly from math types.
But most good programmers create algorithms constantly to solve all kinds of different problems and they wouldn’t be stuck if someone hadn’t invented something for them already, they would logically solve the problem and come up with a reasonably efficient algorithm.
Take compression, for example, prior to any exposure to any methods for solving that problem, all of the good programmers I’ve known would have a reasonable working solution in no time.
First of all, there is significant difference between Programmers, System Analysts, Project Designers, Software Engineers, etc. And those terms are used quite loosely by employers.
In 40-some years experience in this field, i would say there are two main aptitudes needed.
First is a logical, cause-and-effect, detail-oriented frame of mind. This is needed both in doing programming, but even more in testing/debugging – which is wheere professionals spend the majority of their time.
Second is good communication skills. Because customers usually can’t clearly say what they want (often they don’t even know), and many fellow programmers aren’t that good at communication, either.
As you start in the industry, the first skill is most important. As you move up in role & responsibility, the second becomes most important.
Math is unimportant. Average programmers don’t do any math that can’t be done on a 4-function calculator. (Computer scientists dom however.) But people in the math field often seem to have the type of ordered, logical mind that does well in computer programming.
Except this is a contradiction in terms. It is entirely nonsensical, because that logical thought is what math is. It is the entirety of math; the rest is mere mechanical manipulation of symbols.
So programming is math. It’s just math approached from a different way than most people are accustomed to.
And here I thought math was the manipulation of meaningless symbols according to a ritualistic set of arcane rules without any apparent connection to anything that actually matters…
Yes, being a professor of Computer Science for decades would inherently lead me to be confused about the difference between the two.
I.e., you started with an incorrect assumption about me and then read something into my post that isn’t there.
Anyway …
Oh, right. Can’t believe I forgot that. Yeah, “abstraction” is another huge ability. You wouldn’t believe how many undergrad CS students I had that couldn’t think about a problem abstractly. A huge hindrance to their ability to program.
E.g., I had a student come by who got hired by a chemical processing company: refinery type plants and all that. He was interested in method for scheduling the movement of goo thru pipes. (The same pipes would be used for routing different goo thru the plant at different times.)
So I started talking about graphs with edge weights and all that and he kept stopping me. “No, there are no graphs. These are pipes.” Just impossible to pass on any information.
(Contrast that with another former student who went to work for a long distance phone company. His issue had to do with dynamically changing the billing to wholesale buyers on routes to load balance things. Graphs, edge weights, got really interested in it all. Took notes, got references, etc.)
Note that the demand for programmers is sufficiently high that even the worst students always seemed to get jobs. So the average quality and capabilities of programmers is not really what it should be.
Best description so far. Including the explanation what math essentially is.
While I will admit that there is a certain specific field of Math that is explored in-depth in Computer Science, understanding math behind, say, Shanon-Fano theorem is high math.
Also, mathematical basis for relational databases led me to Godel Theorem (which I still dont get but that’s another story).