terriko: (Default)
[personal profile] terriko
I got a really interesting query today that boiled down to, "How much math do you need to write code?"

The short answer to this is, "Not that much" or perhaps "it depends on what you want the code to do." But here's part of what I actually wrote back:

---

To be honest, the level of math required to write code is pretty small. A grade school understanding is often sufficient; there's a reason we can teach 7 year olds to program! Modern programming languages are much less math-oriented: I once spent an afternoon teaching my then 11 year old sister and her friends how to write dynamic database-driven websites, and the only math they used was to add up the scores on the "what animal are you most like?" quizzes they wanted to write.

The math in computer science comes a lot later: for deeper analysis of algorithms and running time, we use algebra and mathematical proofs in an academic setting. But... to tell the truth, relatively few programmers need or use this kind of deeper understanding in their day-to-day jobs. And in my experience teaching students, many people find this stuff easier to learn by doing, so they only really begin to grasp it *after* they have gotten comfortable writing programs.

In short: you probably have all the math skills you need to write code, and if you decide you want to do more hardcore CS later, it'll be easier to learn the math along the way anyhow!

---

There's some nuance there that I didn't really tease out -- the deeper understanding of algorithms and program behaviour is what characterizes the real "science" out of computer science. And maybe the world would be a better place if more programmers did actually use deeper analysis in their day-to-day jobs. But you don't have to be an academic-style computer scientist to write code! Still, it's a very interesting question, given that historically programming actually did require a lot more math, and our perceptions and stereotypes haven't really kept up with the reality of the field.

Perhaps it's time for me to write another presentation? ;)

(For context: my old slideshow about women, computing and math got included in this TechCrunch post about Racism and Meritocracy, so I've been getting a lot of mail, including the one that spawned this post.)

Date: November 23rd, 2011 01:58 am (UTC)
From: [personal profile] gailcarmichael
That's pretty cool that you are getting emails because of that Tech Crunch post (or maybe overwhelming if you are busy? especially with that crappy break-in!). I recently got a "do you need math for CS" question on my blog, too. You can see what I answered here:

http://compscigail.blogspot.com/2011/11/event-idea-truth-about-women-in-science.html

I think I said more or less the same things, though the question was a bit different.

Date: November 23rd, 2011 11:54 am (UTC)
From: [personal profile] sfllaw
There’s definitely no need to know any math at all to be a junior or even intermediate level programmer. Writing code merely requires an informal understanding of boolean logic.

However, to become a proper software developer, knowing a little about each kind of math helps a lot. You have to know just enough math to be able to teach yourself enough to design, modify, and implement algorithms. These might not even be driven by software, the last time I used significant math was to figure out how to get people to pay for a piece of software. That required a bit of high-school statistics to figure out if our test results were significant.

Date: November 23rd, 2011 03:25 pm (UTC)
heliumbreath: (Default)
From: [personal profile] heliumbreath
A lot of application coding requires having one foot in Computer Science and the other foot in the relevant discipline: Physics and Engineering (on a foundation of Math) if you're doing something that runs embedded in a car or a rocket, literacy and language skills to do word processing or various textual analysis things, accounting if you're doing financial software, etc. Pure CS gets you operating systems, compilers, source code editors and tools, and all the stuff the Unix/Linux community seems to focus on.

Most of the math we use is Symbolic Logic and a few integers; outside of graphics or an application domain you're unlikely to touch a real number or trigonometry or other "real" math.

Date: November 23rd, 2011 03:50 pm (UTC)
From: [personal profile] delladea
I agree with [personal profile] heliumbreath's comment, and will add my own anecdata:

I started out wanting to be a game programmer, but I ended up getting my degree in generic applications development simply because I discovered I would likely have to move out of state (at the time) to get a job, and that wasn't something I wanted to do. Most of what I did at my previous job was billing software which required I knew very basic algebra for some things, but for most things simple math was enough. The most complicated thing I ever had to write was a mini file-based database system for a handheld solid state computer in C, from scratch. The extent of my math is college trig & algebra plus high-school pre-calculus, which was very helpful in making lookups efficient.

I'm wishing now I stuck with game programming just to get the math background, and I'm actually looking at taking additional math classes again to refresh my skills.

Date: November 24th, 2011 11:09 pm (UTC)
unregisteredpseudonymspls: (Default)
From: [personal profile] unregisteredpseudonymspls
I have strong feelings about this subject :) It's my belief that, in fact, most people *should* be taught to program, the way they learn about other basic subjects (in theory) in high school. Oh, we can't expect everyone to build a full-scale word processor, just like we don't expect everyone to be a molecular biology or a poet after taking high school bio or lit, but they should be aware that it is Not Magic.

Profile

terriko: (Default)
terriko

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 2nd, 2026 06:58 pm
Powered by Dreamwidth Studios