Programming ability and Math ability

I would have assumed that someone who has trouble doing arithmetic and basic algebra will have a lot of trouble doing any sophisticated kind of coding.

Any reason I should not be assuming that?

I think the assumption is valid. In fact, I would have assumed that someone who has trouble doing arithmetic and basic algebra will have a lot of trouble in the vast majority of professions. From “cerebral” ones like programming to hands-on ones like plumbing, carpentry, carpet/flooring installation etc.

The inability to do basic arithmetic is a problem just because it suggests a general cognitive deficiency and that isn’t very compatible with anything but the most basic programming. However, there is no reason to assume that someone needs to know anything in particular about algebra (or trigonometry or calculus for that matter) to be a good programmer unless they writing some specialized software that requires that knowledge. That isn’t the case for the vast majority of programming, especially for business or personal programming. The ability to think logically in general and be very detail oriented where needed is essential but I don’t believe those necessarily correlate much with any type of higher math.

I guess it depends on what you mean by basic algebra. You don’t need to know algebra even at the level of a high school student that is currently taking it but some of the most basic concepts are still important.

I suspect Frylock wasn’t thinking of particular knowledge so much as skills or ways of thinking (logically, algorithmically; familiarity with the concept of a variable or a function, etc.).

Basic arithmetic and algebra, yes. Programming involves a lot of the same thinking skills that you learn in those topics; in particular you need to have a basic (though not sophisticated) understanding of variables and functions. And you need to know enough about algebra to be able to model problems in your programming language.

You don’t need any particular advanced mathematics knowledge beyond basic algebra to do 90% of programming, though. If you want to work in fancy algorithms or do a computer science degree, then you do.

Failing to understand basic arithmetic and algebra, programming will be very difficult or impossible. Failing to do some more advanced math like Calculus, much less of a problem. Good programming requires the ability to understand algorithms. Some of the most basic concepts in early math is learning and understanding important arithmetic algorithms like long division, or even just adding/multiplying multidigit numbers by doing one digit at a time. Similarly, concepts from algebra show up all the time. Knowing how to break down a problem into simpler forms is a big part of algebra, and it’s a big part of writing code. So really, I can’t see anyone getting much past Hello World without a solid grasp of at least algebra.

Beyond that, the applications become more specialized. There’s plenty of code that I’ve written that implement some pretty advanced mathematical concepts, like differential equations, but in the end that’s just not necessary for most cases, and even there, it was about understanding how to break that problem down into simpler ones. In the end, every algorithm has to get broken down to simple arthimetic steps that the processor is actually able to do. Other than that sort of stuff, the other major application of advanced math is in analyzing time and space complexity, and while that’s important in designing an efficient alogrithm, it isn’t strictly necessary to be able to code.

In fact, chances are a random programmer isn’t a computer scientist and is just implementing algorithms that are already designed and theoretically worked out, and they’re likely also working with libraries that provide implementations for some complex common tasks they might do. So, really, chances are your programmer probably can do okay without advanced math, but they still need both the actual arithmetic and algebraic ability and theoretical concepts.

It surely seems to be a bad sign, but I’m not sure I’d draw a straight-line requirement from “being good at arithmetic and algebra” to “being good at programming”.

That is - if you presented me with someone who struggled with arithmetic, and asked for a prediction of their programming ability, I’d probably agree the likelihood of them enjoying programming and being good at it would be low.

On the other hand, if you presented me with someone who struggled with arithmetic who claimed they were already a reasonably skilled programmer, I’m not sure I would disbelieve them (depending on the type of programming they do).

Math ability will certainly correlate with programming ability, but I see no reason to suppose that arithmetic ability would correlate with either.

freido has it spot on. In fact, although I have employed trigonometry at times, I have only had to use calculus 3 times in 30+ years. But, coding requires the ability to understand arithmetic operations and functions. The simple assignment operation x = x + 1 looks nonsensical to someone who has only taken algebra. It looks as if it should be an equation.

I believe that anyone who can balance their checkbook (can, not does) can also understand basic coding methods. However, there is MUCH more to designing a user experience than merely throwing numbers around. Coding is much more like writing a story than writing a set of equations.

I had to drop Algebra II because it was beyond me. But I grokked Algebra I all right. I didn’t go to school for computer science or programming, but I’ve done ok moving from a journalism major to my own company writing HTML, JavaScript, CSS, SQL, VB and C#. I also do all of the company’s books! :slight_smile:

Don’t trust me to program your machine or anything but I am pretty great at UI and implementation for the Web.

My best friend is pretty awesome at math, and he went in to CS. I’m sure he’s a more competent programmer than me. But his UI is awful.

It’s a little unusual–the person I’m talking about understands how to think algorithmically, but always forgets particular algorithms.

It’s dyscalculia that we’re dealing with here. It’s not a failure to understand quantity or formulas or things like that–it’s a cognitive memory problem (probably) which causes a person to fail to remember how to do things they perfectly well understood a couple of hours ago.

This makes it harder to address the question, I know. I probably should have mentioned it but it felt like TMI at the time.

But I would really expect someone with this problem to have a lot of trouble with coding. How could they remember how to write a FOR loop if they occasionally get mixed up with how to solve something like ax+b=c…

But I’m actually looking for good news here if there’s good news to be had.

One possible good angle on this–the person I’m referring to has serious numberphobia, above and beyond the problem I’ve described, and a lot of the problems we’ve encountered have been just as likely ascribeable to that phobia as to any cognitive difference… and seeing as how the person doesn’t seem to transfer this phobia to computer programming (they have in fact taken a course in HTML before at a community college, many years ago, and apparently did well) it could be that good things are possible if they do decide to try to learn programming.

I’m not a hundred percent sure what you meant the force of this to be for my question but fwiw it sounds encouraging. The person I’m talking about can balance a checkbook, (and in general, can think very logically), and is not at all interested in writing a set of equations but doing something more like writing a story. :wink:

I suck at logic and problem solving puzzles. Luckily, I realized how this correlates to programming before I graduated high school, so I didn’t try for a Comp Sci degree. I mean, I can plug numbers into a formula, but the kind of thinking needed to do Comp Sci is far beyond me. I shiver in fear at the thought of having to do a class on proofs. That’s why I did programming-lite - HTML/CSS/Javascript/frontend junk.

The one and only thing this person liked back in high school math classes was geometry–partially because of they could use visualization to think through problems, and partly because, specifically, of proofs. Proofs, they enjoyed a great deal.

I am starting to think coding might not be an implausible thing for them to pursue.

HTML and CSS have little to do with programming. They are much more like document formatting tags in the days before WYSIWYG - runoff. nroff, troff, etc.

There are relatively few equations in what I do. Mostly good programming involves mastering the flow of data. Everyone where I work is good at math. Very few have a clue about programming. The most useful thing I ever did to improve my programming skills was to teach a data structures class in grad school. Thinking about data structures deeply enough to be able to teach it makes you really good, and I’ve found that selecting the right data structures is vital in turning difficult problems into easy ones.

Aside from that, understanding logic is more important than just arithmetic also.

I took basic algebra and some statistics courses in college. Nothing more. In fact my BS is in Education. I can do a little programming and read code, but I gravitated towards becoming a database administrator. Not much need for advanced math as a DBA.

I agree (BSci in Computer Science, though I quit IT to go in a different career direction).

Most people assume that programming aptitude would be connected to mathematical skills. Interestingly, it’s actually musical aptitude that tends to predict success at programming. This is from a CNN article, but but I had professors who said the same thing. Why musicians may make the best tech workers

I’m dyscalculic, diagnosed far into adulthood when it was way too late to do much about it.

My expertise at coding sucks big time. It stops as soon as an Applescript needs parentheses (sometimes before). I have a secret conspiracy theory that Javascripts are Etruscan.

There are, however, degrees of dyscalculia. Be that as it may, if I discovered that a dyscalculic had written an app/computer code that I needed to depend upon — or even if I didn’t need to depend on — I’d trash it and/or demand my money back.

The guy who gave me my first job programming (trained as a biologist) would hire people on their ability with puzzles and whether or not they had learned a second language during their secondary or college education.

During interviews, he would start fiddling with a twisted loop puzzle or something similar. If you seemed intrigued, he would hand it to you and watch how you attacked the solution - while still answering questions.

He was quite successful at picking good entry level programmers.

Anecdote time about the one time I had to use a calculus concept (sort of) in my programming career.

The scope was to replace an older system for tracking sales of ATVs, RVs, boats, and similar entertainment vehicles. One major option included selling an insurance package for loss of income that would pay off the remaining balance. The insurance was a percentage of the total sale price, including the insurance.

The customer explained how it was very important that you calculated the percentage first based on only the other elements of the sale, then added in that value and recalculated the percentage, and so on, and you had to do it six times.

Me: “Oh, and so that way, you find the limit of the converging series.”

Customer didn’t know the concept of limits in math or how they applied to his business. I built that into the program anyway, re-running the numbers until the series diverged or the incremental change became less than a specific fraction of a cent. Customer never complained about that part.

:slight_smile: