Do computer programmers need to be good at math?

Sounds like my 30 years as a software developer. I barely remember trig and calculus is long gone…

I trained as a biologist (college, grad school) and as a linguist (Army) and found that a logical approach to problem solving was much the same in Biology and Computer Science and learning one additional language opened the door to learning many.

This thread reminded me of a nightmare in my Data Structures class. We had to learn and use reverse polish notation. Including a project.

RPN kicked my ass. The only CS test & project that I flunked in school. I just couldn’t understand that mess. I had never owned or used a RPN calculator. You couldn’t pay me enough money to use a RPN calculator.

We also had to use Octal, Hex and Binary math in CS various classes.

It’s time to stop thinking of “programmer” as a single monolithic field. Asking “Do computer programmers need to be good at math?” is like asking “Do office workers need to be good at math?”. The answer to both is “depends on what, specifically you’re doing”.

I do a lot of programming that requires quite high-level math to do properly, and work with programmers who require even higher levels. Does a SQL developer require that level of math? Probably not.

My weakest math ability is logic. I completed all the high level Math courses in high school, so I guess that would put me in the above average math abilities. But the reason I never went into programming is because I’m weak weak weak at logic and analysis. I can plug numbers into a formula like a boss, but trying to problem solve to get from problem -> broken down into steps -> code breaks my brain. I do what I call programming-lite: HTML and CSS. It’s funny, I’ll do some HTML and then need to write some Javascript for a feature and the thought process is completely different. I can look at a design and know exactly what I need to do in HTML/CSS, but my mind will grind to a halt upon needing to write a simple PHP script.

Math as a whole isn’t needed for programming, but there are certain ideas most prevalent in math that programmers need to know.

Exactly. My research involves a fair amount of programming, and being able to use the right algorithms for the task is absolutely essential. But there’s no way in hell that a web developer will need the same skills.

Certain fields of computer science that are rather specialized, but still quite important, such as AI, cryptography, and information retrieval, require a good deal of higher level math. A strong background in one of those types of subjects is very important for getting in to some of the most coveted software engineering jobs - Google, Facebook, etc.

Unless you write device drivers or board support packages.

SQL developers definitely need to understand discrete math. Yeah, anyone can learn to

SELECT
CrapId, CrapDescription
FROM
Crap
WHERE
Crappiness > 5

but doing complex joins and subqueries requires a set theory aware mind. I’ve never been a full time DB developer, but I’ve written, debugged, and enhanced my share of SQL queries and a mathematically aware mind is definitely required. You may not ever need that calculus, but it dern well gave you some discipline.

also consult the tooltip.

Not true.

You have to think about what computers can do at different levels. A big part of programming is thinking at multiple layers and determining what layer is responsible for what. For example, I do a lot of development in the .NET Framework. This framework has an API that permits me to access many databases with only a few lines of code, and me passing in information about what database to connect to, what login credentials to present, and what query to run (in SQL). I can say that the computer knows how to execute a SQL query against a database. But underneath, there are multiple layers of abstraction that build on each other.

While it’s very much true that you can’t generalize, the programmers I know (who pretty much all went to Illinois) are all very good at math. One double majored. He only need to add like 3 classes to the CS curriculum to also get a BA in math. So while it might not be essential in all cases, some people at a good CS school think it’s important enough.

Hell, most of the programmers I know can’t even spell. Or type.

A PHB is a pointy-haired boss. Dilbert’s clueless boss, modeled after a million of the real life versions.

As for Wolfram (you were wondering why I kept more of the quote in, didn’t you?), I read his “New Kind of Math” book and it was awful. The guy kept making unbelievable blunders in describing key concepts in Computer Science. (He couldn’t even write coherently on P vs. NP.) He has a huge sense of himself that is not all that justified based on his own crappy writings. So, no. He is not a superprogrammer. Not even close.

Plus, it’s a huge book with very little real content. His code is probably the same. A thousand lines of code that someone else could do in 200.

Very important reminder. What other people call superprogrammers are not usually in the class I call superprogrammers. The real ones are far, far less common than people think. So stats on how many other people think they are and how many I’ve seen are going to differ a lot.

The overwhelming majority of people I’ve met that others consider superprogrammers are just ordinary programmers with good PR.

The most useful classes I ever took in terms of my SQL development skills were not computer classes, but the metamathematics and advanced set theory courses I took in graduate school, long before I fell into the programmer career path. A deep understanding of set theory, combined with a basic introduction to SQL, is sufficient to easily write accurate and efficient complex queries.

I worked with computers for 47 years and only have high school math and no algebra and retired in 2002 as a Senior Systems Analyst and programmer. All of the programming I did was business programming and involved no advanced mathematics, and this is probably 70 or more percent of all programming done today; very few programmers write programming languages and operating systems. Business programmers are in great demand.

Certainly, scientific programming, statistics, engineering, etc. requires much more advanced math but I never got involved in anything like that.

Bob

I don’t think I am bad at math in concepts but I was scared enough of it to find a loophole in the college math requirement in college that was normally Calculus I at least but Pascal programming was allowed as a substitute. I don’t have any idea how I would have done in actual calculus because I still don’t know anything about it but I got the only A in the computer science substitute. I didn’t take any computer science classes after that and the only math classes I took were intro and advanced statistics (I did great in those though).

Here I am a senior consultant years later working as a systems analyst/developer for major consulting firm and I think I am pretty good at it. I can think like a computer which some people can never master and I understand relational databases intuitively which is a huge help in business systems. Besides understanding those things to make a living, most of my other talents are creative ones with a scientific but not necessarily mathematical twist.

I don’t think I have ever worked with anyone in business IT with an actual computer science degree or math degree (except one intern I had on rotation) and I am talking out of hundreds of people over the years. I have worked with a number of musicians and artists however plus many liberal arts types in general. A disproportionate amount of them have been of libertarian or bohemian philosophy for some reason. Advanced math doesn’t come up much in business IT.

Surprised nobody has mentioned the Curry-Howard correspondence yet. Every type system for a programming language corresponds to some logic (the logic will probably not be “natural”, and it may not have good metamathematical properties, but its still a logic, none-the-less). Further, if your programming language of choice has a sufficiently advanced type system, then constructive mathematics and programming essentially merge into the same thing. This is what happens when you add dependent types, the ability to form functions at the value and type level, and arbitrary rank polymorphism to a programming language.

I’m currently employed on a project constructing a C compiler in a dependently typed language. Naturally, because our language’s type system is an extension of the Calculus of Coinductive Constructions, a higher-order logic is embedded within the programming language, and we are able to prove that the compiler is bug free within the language. Functional programming languages with relatively weak (though “nice” in some hand-wavy sense) type systems, like Haskell and Microsoft’s F#, already exhibit some of this (i.e. “free theorems” derived from the Reynold’s abstraction theorem).

With this in mind, I’m always leery of programmers who claim that no mathematical skill is required for constructing robust software. The type system that we use is merely exposing the underlying complexity of the programming task at hand, signalling bugs and faults in our compiler’s design at “compile time” (or rather, “type checking time”). How is it, that by just changing programming language, constructing reliable software requires quite a bit of mathematical skill, yet in other languages it does not? I’m not sure I buy it.

Um, Captain Ridley’s Shooting Party, just what percentage of all programmers do you think have any concern with the material you list in your post?

In all my years of programming, I think the most complicated math I ever used was i++ (keep adding 1 to i in a loop.)

You have an irritating habit of skimming posts. If you’d read my post all the way through to the end instead of skimming it you’d have actually come to my point: the languages with (insane, for the average programmer) type systems that we program in are just bringing the mathematical structure of the underlying problem to the surface. As I said, how can it be that just by switching programming language constructing program X correctly requires quite a bit of mathematical sophistication, whereas constructing X in another language doesn’t? In the latter case, the mathematical structure of the underlying problem is just being hidden from the programmer, or the program itself is not being implemented correctly (riddled with bugs, etc.)