# Programming ability and Math ability

**URL:** <https://boards.straightdope.com/t/programming-ability-and-math-ability/674845>\
**Category:** In My Humble Opinion\
**Created:** [November 26, 2013, 6:13pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845 "2013-11-26T18:13:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [November 26, 2013, 6:13pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/1 "2013-11-26T18:13:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Terr](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@Terr](https://boards.straightdope.com/u/Terr)\
**Post date:** [November 26, 2013, 6:20pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/2 "2013-11-26T18:20:46Z")

</div>

> [@Frylock](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Shagnasty](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Shagnasty](https://boards.straightdope.com/u/Shagnasty)\
**Post date:** [November 26, 2013, 6:23pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/3 "2013-11-26T18:23:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [November 26, 2013, 6:25pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/4 "2013-11-26T18:25:40Z")

</div>

> [@Shagnasty](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [November 26, 2013, 6:26pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/5 "2013-11-26T18:26:20Z")

</div>

> [@Frylock](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Blaster\_Master](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Blaster\_Master](https://boards.straightdope.com/u/Blaster_Master)\
**Post date:** [November 26, 2013, 6:42pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/6 "2013-11-26T18:42:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ed](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@ed](https://boards.straightdope.com/u/ed)\
**Post date:** [November 26, 2013, 6:43pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/7 "2013-11-26T18:43:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 26, 2013, 6:45pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/8 "2013-11-26T18:45:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gagundathar](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@Gagundathar](https://boards.straightdope.com/u/Gagundathar)\
**Post date:** [November 26, 2013, 6:50pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/9 "2013-11-26T18:50:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ZipperJJ](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zipperjj/32/211_2.png) [@ZipperJJ](https://boards.straightdope.com/u/ZipperJJ)\
**Post date:** [November 26, 2013, 7:19pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/10 "2013-11-26T19:19:42Z")

</div>

> [@Gagundathar](#):
>
> 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! 🙂

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.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [November 26, 2013, 7:39pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/11 "2013-11-26T19:39:00Z")

</div>

> [@Thudlow\_Boink](#):
>
> 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.).

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.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [November 26, 2013, 7:41pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/12 "2013-11-26T19:41:26Z")

</div>

> [@Gagundathar](#):
>
> 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’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. 😉

---

<div class="post-metadata">

**Author:** ![kushiel](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@kushiel](https://boards.straightdope.com/u/kushiel)\
**Post date:** [November 26, 2013, 7:55pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/13 "2013-11-26T19:55:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [November 26, 2013, 8:21pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/14 "2013-11-26T20:21:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [November 26, 2013, 8:28pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/15 "2013-11-26T20:28:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JerrySTL](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@JerrySTL](https://boards.straightdope.com/u/JerrySTL)\
**Post date:** [November 26, 2013, 8:31pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/16 "2013-11-26T20:31:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zweisamkeit](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zweisamkeit/32/4360_2.png) [@zweisamkeit](https://boards.straightdope.com/u/zweisamkeit)\
**Post date:** [November 26, 2013, 8:32pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/17 "2013-11-26T20:32:34Z")

</div>

> [@Frylock](#):
>
> 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.

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](http://www.cnn.com/TECH/computing/9807/31/musicians.idg/)

> [@](#):
>
> It seems that musical aptitude is one of the strongest predictors of success in a technical position. “The highest scores on the admissions test and best performers have been people with a background in music,” says Terry Skwarek, director of the Institute for Professional Development in the School of Computer Science, Telecommunications and Information Systems at DePaul University in Chicago.
> 
> …
> 
> Some say the real correlation has less to do with discrete aptitudes than with **the way technical people think: They favor spatial/temporal reasoning, or the ability to visualize.** …
> 
> The ability to do spatial/temporal reasoning is important in a lot of areas, says Gordon L. Shaw, professor emeritus of physics at the University of California at Irvine and co-discoverer of the “Mozart Effect,” which demonstrates that exposure to classical music enhances reasoning ability.
> 
> **“It makes sense that if you’re good at one of these higher brain functions that involve the spatial/temporal aspect, you’re going to be good at the others,” Shaw says. “To construct a good program, you want to be able to see the consequences in your head, not just do line by line of the code. You have to be able to totally visualize it.”**

---

<div class="post-metadata">

**Author:** ![Kenm](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@Kenm](https://boards.straightdope.com/u/Kenm)\
**Post date:** [November 26, 2013, 8:46pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/18 "2013-11-26T20:46:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jasg](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jasg](https://boards.straightdope.com/u/jasg)\
**Post date:** [November 26, 2013, 8:53pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/19 "2013-11-26T20:53:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chrisk](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisk](https://boards.straightdope.com/u/chrisk)\
**Post date:** [November 26, 2013, 9:25pm UTC](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845/20 "2013-11-26T21:25:55Z")

</div>

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.

🙂

[Next page](https://boards.straightdope.com/t/programming-ability-and-math-ability/674845.md?page=2)
