Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Poll: What level of math is programming roughly analogous to?
233 points by shawndumas on Jan 9, 2014 | hide | past | favorite | 158 comments
My son is writing moble apps using Objective-C and is around 11. My question is if arithmetic is 1 and advanced calculus is 10 at about what cognitive level is bog standard, journeymen, CRUD programming in Objective-C?

(Please remember that voting does not up vote the poll.)

Algebra
612 points
Discrete mathematics
359 points
Algebra 2
151 points
Arithmetic
129 points
Calculus
74 points
Trigonometry
46 points
Pre Algebra
42 points
Geometry
38 points
Pre Calculus
37 points
Geometry 2
14 points
Advanced Calculus
13 points


Programming isn't analogous to math, programming is a communication language with really strict rules that uses math of all stages. Different tasks involve different math. I'll give some common examples for laymen, but they may seem obvious in hindsight:

Programming a very rudimentary "snake" computer game is [using] using Algebra. If your son (or anyone) understands variables, assignment and adding them together, they fundamentally understand Algebra.

Programming a the general parts of a diagramming library or a game with some physics is [using] Geometry and Trig.

Programming complex features of a diagramming library involve discrete math and graph theory.

Programming diagramming layouts can involve Masters level math understanding. (Sometimes, even when the algorithm is well known, it can take months to understand and implement, like planarity testing and embedding before 2004[1])

So it's roughly analogous to the difficulty and specificity of the task, which varies wildly.

~~~

[1] in 2004 there was a fast and "easier" to understand planarity testing and embedding algorithm, I suggest you skim it for an idea of the kind of math programmers can get into: http://jgaa.info/accepted/2004/BoyerMyrvold2004.8.3.pdf


Mathematics is also a "communication language with really strict rules".

In one sense, programming often uses math. And math often uses programming. But, in a deeper sense, programming is math and math is programming. They're just different views on the same underlying ideas. They're different fields of study mainly because the priorities are so different.

Of course, this doesn't mean it makes sense to map Objective-C programming onto some "level" of math. For one, the whole math scale is completely arbitrary--who is to say that abstract algebra is more advanced than calculus? They're orthogonal. Moreover, Objective-C is in a part of programming which has really, really different priorities from normal mathematics. I still maintain that they're fundamentally related, but you're doing such different things that there's very little practical overlap. Certainly not enough to translate to some common sub-field of mathematics, much less one taught to high-schoolers!


Mathematics can easily be applied to anything from cooking to theoretical physics. That doesn't make any of these things math or the other way around. You can use math to solve a programming problem (perhaps to a greater extent than in cooking) and you can express many of the problems in mathematical terms, but in the end math is an abstract tool and programming is not.


No, the relationship between programming and mathematics is much deeper than that. In particular, it's not a relationship to the sort of mathematics you are thinking of--not the sort that you would use to solve a concrete problem or apply to physics or cooking.

Rather, the relationship is between what a program is and the very foundations of mathematics--formal logic. In particular, a programming language is a formal system exactly the same way a logic is a formal system. A mathematical proof is really the same sort of object as a computer program. It just turns out that the goals behind the two are different, so the rules of the formal system (either a logic or a programming language) behave very differently. But, at a high level, it's the same idea.

In fact, the way we ascribe semantics to programs and programming languages is analogous to how we can reason about proofs and logics. As a rough comparison, denotational semantics are like model theory and operational semantics are (sort of) like proof theory.

That said, for the most part, this relationship to mathematics is actually orthogonal to the sort of math you would use in writing a program. Linear algebra, geometry, group theory and so on are great for applications but not what I was talking about. Instead, the mathematics I was alluding to only comes out when you get sufficiently "meta" and start writing programs that operate on other programs--static analysis, verification and so on.

I'm not sure what you mean by "abstract tool", but programming is just as much an abstract tool as mathematics. The only difference is that we have some handy hardware for realizing the former.


This is philosophical mumbo-jumbo.

When people program, they (usually) don't do math. And that's it.

The fact that you can view a programming language as a formal system, and the fact that computer programs can be viewed as mathematical proofs of mostly totally uninteresting propositions, doesn't magically turn programmers into mathematicians, just as the fact that the brain can be viewed as a chemical and physical system doesn't turn every thought into a chemical experiment, and each thinking person into a chemist.

Saying otherwise is just an abuse of language.


It depends on what you mean by "do math". Both a proof and a program are just syntactic manipulations following a particular set of rules. The exact rules differ, but the underlying system doesn't.

Proving something in a low-level way--just following inference rules--and executing a program are basically the same things. This is abundantly clear if you formally study operational semantics, but even people who haven't still think operationally. Of course, nobody thinks purely operationally, but then again, practising mathematicians also rely on some poorly defined "intuition".

I never claimed this makes programmers mathematicians. It doesn't. Both fiddle around with formal systems, but the goals and the actual practice differ enough to make the two fairly distinct. But they're still related and we still use the same tools to analyze both: automated theorem provers, type theory, Curry-Howard...

The fact that I can bring advancements from formal logic to bear on analyzing programming languages and the fact that I can bring advancements from programming languages to analyze proofs means this is no mere "philosophical mumbo-jumbo". This includes all sorts of things you probably think completely removed from mathematics, like verifying properties of drivers or automated debugging.

Not only is it a deep relationship to think about, it's one we regularly exploit. Even if most programmers do not acknowledge it, it exists. Really, you're saying more about the state of programmers' education than anything else.

Besides, you never really made much of a point. You made a statement and a poor analogy in its support and accused me of "abuse of language", but never said anything substantial.


If the question of the poll was "My son eats carrots, what level of piano-playing does it equal to?", would you then say that eating carrots and playing the piano are fundamentally the same, because they are both reducible to physical laws and are just manifestation of different kinds of brain activity?

We all get it, and we all agree - programs can be viewed as a subset of mathematics. Every CS undergrad knows this. It is conceptually misguided to view this piece of information as revealing anything deep about what programmers do, just as it is conceptually misguided to view our ability to reduce both fishing and singing to brain activity (or to reduce everything to the laws of physics) as saying anything deep about what fishermen do. It doesn't became any less misguided simply because examples exist where math can be directly applied to programming, and vice versa.

It is philosophical mumbo-jumbo because you are taking two activities with clearly distinct meaning in everyday language, and instead of simply acknowledging that we can invent a new meaning for them under which they are the same, you instead convince yourself that this new invented meaning is the only fundamentally correct one (or somehow "deeper"), and that it also has the power to show that the 'everyday' meaning is wrong. But you are not showing anything about things we already know - you are simply presenting new, different ways of looking at them, that bear little relevance to the question at hand (A circle is topologically equivalent to a square. Does it mean that our 'old' preconceptions of difference between circles and squares are now wrong?).

The activity of doing mathematics, as those words are used in everyday language, is different from the activity of programming, even if in some senses (perhaps in more than one) they can be viewed as the same. The activity of running is different from the activity of fishing, even though they can be reduced to similar building blocks.

I do not object to the mathematical connections you present, I object to the philosophical interpretation you give to them.


Quick comment: I think people are emphasizing too much the 'logic' of mathematics, over its content. Mathematics is NOT about rigorous thinking and logical patterns (unless of course you study logic). It is much freer, pattern-based, and intuitionistic than that. It just so happens that rigorous/logical argumentation is the best way to communicate mathematics.

In this sense, programming is much more algorithmic, and hence I would argue, not particularly like math (the content) at all.


> When people program, they (usually) don't do math. And that's it.

I disagree. Whenever you implement an algorithm, you build a proof of correctness in your mind. If you reasoned about your program and are convinced that it handles all corner cases properly, then it would only be a formality to write this proof down. If you can't easily do that, then you can't possibly be certain that your program has no bugs.

In practice, you don't bother with this kind of thing unless you are writing extremely complex algorithms, of course, but that doesn't change the underlying principle.


Algorithms researchers may be employing the mathematics of computing depending upon the particular subject and scope of study. That body of non-CS academics (mathematicians, physical scientists, and engineers) who use mathematics daily as a primary component of their research are doing math when they write programs--but not necessarily the mathematics of computing.

Almost everybody else who writes programs isn't thinking in terms of mathematics, be it of computing or any other thing. Asking "what level of mathematics is this equivalent to" is therefore kind of a nonsense question--it has no real answer, because it implies there's a legitimate comparison to be made when there isn't.


If you don't usually bother with this kind of thing, it means that you don't usually do this kind of math when you program.


I would like to jump in here and agree you. You can program some really cool stuff with a very minimal knowledge of math.

Anything beyond understanding some basic Algebra and Geometry concepts isn't required in order to program.

Most of the stuff (at least that I have run into) is just organizing data into a visual (like a report or graph) that will allow someone to make informed decisions. This only requires basic math (averages, percentages). If you can filter data, perform basic math functions on that data, spit it back out onto a report or graph then you can program for the majority of business needs.

The only time advance mathematics would be needed is if you are coding for scientists/mathematicians that want to apply advanced math to their data.


I'm not sure there is such a difference between mathematics and an "algorithm". Time can be factored out of a process. A process can be represented as a sequence of objects. Take a function taking some arguments, one can describe this function in it's entirety by describing each sequence of objects generated by each possible input. Then if one wants to recreate the operation of the function one simply looks up the appropriate sequence of objects. A function then becomes a mathematical object in the abstract. In the same way some mathematical object can be described as the result of some process. Take the definition of the natural numbers, an object 0 is defined and a successor to this object to the next object is defined. This operation defined recursively sets up the whole natural numbers. The description of the natural numbers is the result of the evaluation of this function recursively applied, or the infinite application of this function. Since the study of mathematics is the study of these abstract objects and these objects encapsulate those objects which we can produce in the physical world through some process, mathematics by definition is a study of programming. Whether the mathematics explored by mainstream mathematics is the same mathematics explored by the code monkey is perhaps relevant. But the duality exists. In essence a study of physical reality is the study of those mathematical objects which can be constructed by the processes extant in that reality. So analysis of anything is mathematics, it just may not be the kind of mathematics we usually associate with the word.


If a process can be represented as such and such, and then this in turn can be represented as something else, and then eventually after this possibly-long chain of transformations we reach something mathematical, then it is that something which is mathematical, and not what we started with.

This is like saying: "There isn't such a difference between neurology and physics. A brain can be viewed as a collection of cells, which in turn can be viewed as a collection of organic molecules, which in turn can be viewed as a collection of particles, and physics studies particles. So neurology = physics. Q.E.D"

But what is missing here is the realization that it is exactly our decision not to view the brain as a collection of particles which gives neurology it's meaning. The decision to view something as something else is not trivial. When you choose to view X as Y, it is no longer X you are talking about.

You wrote: "...it just may not be the kind of mathematics we usually associate with the word."

But it is precisely what we "usually associate with the word" which gives meaning to words. If in this "usual" meaning it is wrong to say that mathematics is the study of algorithms, then mathematics isn't the study of algorithms.

When we want to create new precise definitions to old words, what we are trying to do is to formulate a description that fits as best as possible our everyday use of this word. If we ended up with a definition of math that says "the analysis of everything is math", the only logical conclusion is that we did a pretty bad job.


    > I'm not sure there is such a difference between mathematics and an "algorithm"
Well, then we fundamentally disagree. An algorithm isn't math. Arguing about an algorithm mathematically, or even analyzing it at all as an algorithm might be related to mathematics, but the algorithm itself isn't.


I have an MSc in mathematics and a strong interest in this area. I would be happy if you were to show me that I am wrong


This has nothing to do with mathematics or with your MSc, this is a a philosophical discussion about the meaning of words.


Is there anything concrete you can say in response to my argument, or is this it?



I'm sure that if you meant to argue with anything I said, you'd make a greater effort than posting a link to a book you enjoyed. But just in case: I believe that mathematics is able to describe very fundamental concepts of our universe. That doesn't mean that everything in the world _is_ mathematics, for the same reasons that the fact that you can describe many things in spoken words don't make them spoken words.


I think one major difference is that programming languages are mostly imperative while mathematical statements are more declarative. When you're solving a mathematical equation, you are typically given a statement which you need to transform into another form. How you do that is less important than proving that the alternate form is valid given the equation. You declare the problem and the solution you want to solve for first, and there may be multiple ways to get there, you just need to show a valid way.


"Programming isn't analogous to math"

I think it's analogous to math in the sense that a programming language is a formal system, just like any logical system. The syntax is defined by formal rules, it semantics if not defined formally is strictly defined by the compiler implementation or hardware.

Actually, the link between programming and proving as been characterized by the "curry-howard isomorphism" that says that a program is a proof of his type. In that sense, programming = writing a proof.

For instance, in ML : the program "fun (x,y) -> x" is a proof of the proposition "A and B => A". This idea can be extended to more complex types/propositions (see the Coq proof assistant for instance).

That being said, writing programs usually require different set of skills than doing mathematics. The best programmers are not always the best mathematicians and conversely. To me difference shows especially for big complex software, rather than smart algorithms in programming contests for instance.


"If your son (or anyone) understands variables, assignment and adding them together, they fundamentally understand Algebra."

This seems like it should be so, but real world experience tells me it is not. Understanding how someone can understand one and not the other is beyond me, but its exceptionally common and a huge stumbling block for me to teach people programming.

The fact that we are usually writing relations in algebra, but instruction statements in programming is really quite significant, even if they look similar.


Thanks for that link. One thing caught my eye: the algorithm starts with a depth first walk of the graph. Reading that, I thought "that n must be the number of edges". However, theorem 1 in section 6 starts with "Given a graph G with n vertices" and the proof starts with "The depth first search [...] implemented with well-known linear time algorithms."

I don't know that well-known algorithm, and neither does Google, it seems. At least, I can't find it, and can't see how it would work. Now, section 5 has a procedure that requires <= 3n-5 edges for a graph with n vertices. Is that supposed to hold throughout? If so, what's that 3n-5 about? Are there well-known theorems or algorithms to disprove planar it's for such graphs?


Algebra, at least in the high-school algebra sense[1], is just really strict rules for communicating points on a (line, plane, etc). It is a bunch of operations for finding an equivalent way of stating the same thing, and some rules for reasoning about those points. For example, finding the roots of a function is nothing more than manipulating a statement until you find out where y = 0.

In a direct use way - any time you program with conditionals you are directly applying boolean algebra. There is no way around it - you have to understand how the basic rules of boolean algebra work. e.g. how does 'not' distribute, how do "AND" and "OR" work, etc. And it certainly helps with simplifying code if you can apply DeMorgan's law or distribute your conditions differently. There is a reason it's called refactoring code - it is just applying the algebra rules (usually the boolean ones) to program flow.

Similarly, but a bit more abstract, string primitive operations are an algebra for working with series of characters. They are equally strict, although not the exact same rules as those for points on a curve. For instance associativity doesn't apply to addition. Multiplication isn't defined for some languages, and there are different ways to define it for other languages (does it distribute, etc). This isn't even that abstract...

Given a string, solve for the character at position x. This is not really different than given a function, solve for the position at x.

Given a function, and value y, solve for x. Its the same as given string, find the indices for a character.

The operations are a bit different, but the reasoning between them is exactly the same: manipulate the givens with the rules that are defined. Use the rules to find properties of the target.

[1] there are other algebras - for example ring theory algebra. It has rules that are different (mostly generalizations of basic algebra rules, but that have weird and non-intuitive results if all you know is basic high-school algebra). This sentence from the wikipedia article explains it well:

"It follows that algebra, instead of being a true branch of mathematics, appears nowadays, to be a collection of branches sharing common methods."


To add:

Programming a first person shooter requires linear algebra. Programming crypto-algorithms require discrete math.


> Programming isn't analogous to math

https://en.wikipedia.org/wiki/Curry-Howard_isomorphism


"uses math of all stages" - I don't think so! Source - post-doctorial mathematical researcher.


> If your son (or anyone) understands variables, assignment and adding them together, they fundamentally understand Algebra.

A more important part of algebra is symbol manipulation, and understanding why some manipulations are valid and others are invalid. That symbol manipulation is the core of grade-school (or trivial) algebra. Being able to 'see' how to solve a problem, and being able to abstract general rules to solve whole classes of problems, all flow from that.

Of course, there's a disconnect between using '=' to denote a state of being (the state of equality) and using '=' to denote an action (the action of assignment). As an example, 'x = x + 1' is either trivially nonsense or trivially valid. Haskell actually uses '=' in the mathematical sense, to denote a state of being, and SSA languages such as Erlang come pretty close to it, I think.


Disclosure: I am a mathematics teacher. (I teach prealgebra to elementary-age pupils.) I am NOT a programmer. But I think the correct answer to the question is "it depends." In other words, even though you have specified a level of programming, "bog standard, journeymen, CRUD programming in Objective-C," and even though you have laid out the usual progression through the usual school mathematics topics in the English-speaking world, you haven't given enough information to match the levels.

Some people program insightfully, or so I am told by people who program, and other people program nothing but kludges. Among mathematics learners, there are great variations in the levels of "profound understanding of fundamental mathematics" (PUFM) among people who are studying the "same" level of mathematics. It interested me that you mentioned neither number theory nor combinatorics among your list of secondary mathematics courses, because in some other countries, those courses would come well before calculus. In general, any reader of Hacker News could learn a lot about what is missing in the United States (or, more generally, in the English-speaking world) in elementary mathematics instruction by reading Knowing and Teaching Elementary Mathematics: Teachers' Understanding of Fundamental Mathematics in China and the United States by Liping Ma.[1] There is a lot to basic mathematics that is far from easy, if deep understanding is what you are looking for. In the countries that excel over the United States in mathematics instruction, proof is part of every mathematics course, not just part of geometry, for example.

[1] http://www.amazon.com/Knowing-Teaching-Elementary-Mathematic...


Under the new "Common Core" standards for mathematics in the US, there's a lot more emphasis on proof in elementary-school mathematics than there was before. The terminology is usually more along the lines of "explain your reasoning", but the process is definitely proof-oriented. (Whether teachers will be able to incorporate those standards into their teaching, and whether students can live up to them, remains to be seen.)

Disclosure: I'm a full-time tutor for third and fourth grade mathematics in the inner city through the Denver Math Fellows program ( http://www.teachindenver.com/teachindenver/denver-fellows-pr... ).


> In the countries that excel over the United States in mathematics instruction, proof is part of every mathematics course, not just part of geometry, for example.

Can you expand on that? What do students do in other mathematical areas if they don't do proofs? I did all of my studies in France and I don't how much of a difference there is (though all my friends who have studied both in the US and in France found the maths classes a lot easier in the US).


US math courses for high schoolers often goes along the following path: Algebra, Geometry, Algebra II (basic linear algebra, but often not discussed as such, and other concepts), Trigonometry, Precalculus (1/2 semester each of the last two) and then Calculus. Of course, that adds up to 5 years so unless a student took Algebra I in middle school (year 8) they won't complete the full sequence, leaving calculus for college (depending on major).

The structure of formal proofs is taught in geometry. That's pretty much the only course where students are expected to prove theorems about the subject via proofs. In most of the other courses students are taught the formulas and techniques, axioms and theorems, but then apply them, rather than attempt to develop or prove them themselves. They're also, typically, not shown a proof of the theorems they learn, they're just told to accept them.


> The structure of formal proofs is taught in geometry. That's pretty much the only course where students are expected to prove theorems about the subject via proofs. In most of the other courses students are taught the formulas and techniques, axioms and theorems, but then apply them, rather than attempt to develop or prove them themselves. They're also, typically, not shown a proof of the theorems they learn, they're just told to accept them.

Wow! I can't even imagine how that works. When I went to school (and that's in Europe, not Asia), the notions of theorem and proof were taught in the fifth year of school (out of 12 pre-college years -- 8 in elementary, 4 in high school). That was, indeed, as part of geometry. Starting from high school, however, pretty much no formula is given without prior demonstration. Subjects where they can't do that (like mechanics -- that's taught in Physics prior to pre-calculus and calculus) are a royal fuckup. You aren't usually expected to be able to reproduce the proofs for those formulae, but a) you're strongly encouraged to study them, because they help you with the exercises and b) it's usually implied that, if you can't remember the formula, but you can prove it, it's OK. For example, if you can't finish a problem in a test because you don't know the formula, but you obviously try to find it, the professor will sometimes give you full credit, depending on circumstances and following a short talk.

I didn't even like math back then, save for geometry, but I reckon this was the most important thing I learned there. Unless you're dumber than a toaster, you're typically able to apply what you learned to everyday phenomenae after ten years of school; the bonus you get is also being able to reason rigorously and correctly, which is an important takeaway no matter what path you choose to follow.


> being able to reason rigorously and correctly

At whatever level of Math (or any subject) you develop this skill, you are ready to be a programmer.


What do students do in other mathematical areas if they don't do proofs?

The book I already mentioned, Knowing and Teaching Elementary Mathematics, will give much of the sad story. A really sad description of how mathematics textbooks are written in the United States[1] and a contrasting description of what kinds of problems are found in Russian textbooks[2] fill in more details.

It was on my second stay overseas (1998-2001), that I became especially aware of differences in primary mathematics education. I discovered that the textbooks used in Singapore, Taiwan (and some neighboring countries) are far better designed than mathematics textbooks in the United States. (During that same stay in Taiwan, I had access to the samples United States textbooks in the storeroom of a school for expatriates, but they were never of any use to my family. I pored over those and was appalled at how poorly designed those textbooks were.) I discovered that the mathematics gap between the United States and the top countries of the world was, if anything, deeper and wider than the second-language gap.

Now I put instructional methodologies to the test by teaching supplemental mathematics courses to elementary-age pupils willing to take on a prealgebra-level course at that age. My pupils' families come from multiple countries in Asia, Europe, Africa, and the Caribbean Islands. (Oh, families from all over the United States also enroll in my classes. See my user profile for more specifics.) Simply by benefit of a better-designed set of instructional materials (formerly English translations of Russian textbooks, with reference to the Singapore textbooks, and now the Prealgebra textbook from the Art of Problem Solving),[3] the pupils in my classes can make big jumps in mathematics level (as verified by various standardized tests they take in their schools of regular enrollment, and by their participation in the AMC mathematics tests) and gains in confidence and delight in solving unfamiliar problems. More schools in the United States could do this, if only they would.

[1] http://open.salon.com/blog/annie_keeghan/2012/02/17/afraid_o...

[2] http://www.de.ufpe.br/~toom/travel/sweden05/WP-SWEDEN-NEW.pd...

[3] http://www.artofproblemsolving.com/Store/viewitem.php?item=p...


When I took a maths GCSE, (UK qual,) most of the work was memorising equations and using them. You didn't prove them or understand how they worked or anything. Like teaching someone to program by memorising the functions in the standard library.


> In the countries that excel over the United States in mathematics instruction, proof is part of every mathematics course, not just part of geometry, for example.

There's room to wonder about how much of a causative role this has, and how much it reflects consumer demand. When my sister started taking algebra, my parents asked me to help her, and I was careful to provide proofs of all the algebraic properties of exponents (e.g. x^m * x^n = x^{m+n}; x^0 = 1; like that). That's not usual in the US, and didn't feature in her textbooks or supplements, but I did it basically just because it was important to me.


I'm not sure I understand the question.

Programming can be a mix of many things: reasoning about associations and state, designing processes or interfaces, or—most saliently—modeling a domain that may or may not mathematical in nature.

To compare a programming language/runtime with a US math curriculum makes about as much sense to me as asking for the Richter magnitude of a sledgehammer.


The poll didn't make sense to me either until I read what he was actually asking for:

>what cognitive level is bog standard, journeymen, CRUD programming in Objective-C?

He should probably have clarified it in the title


Programming can require many things, but the OP specifically asks about this:

> bog standard, journeymen, CRUD programming

What do you think are the cognitive demands of that task, however defined?


Then the answer is "it depends". You can program at a level with a cognitive demand on par with Algebra (however defined), and you can program at the level of Complex Analysis. There's no one-to-one map between the two.

Just like math, you can go as deep into a programming language or concept as your mind will carry you so there's no equivalence relation.


Yes, but I'm also skeptical of the idea that some math subjects are cognitively more intense than others.

The "cognitive load" or whatever is really just a function of how much you've practiced and internalized that area of math. Calculus builds on algebra, sure, but once you've internalized algebra you don't have to "think real hard about algebra" _while_ you "think real hard about calculus."

Running a 10k for the first time is not the same as running your first 5k twice.


As someone who studied math as an undergrad, I completely agree. As far as I can remember, Learning the Fundamental Theorem of Galois Theory was no more difficult to me than learning the Mean Value Theorem.

But I guess my point is that programming at an "Algebra" level means you have very little knowledge the language, while programming at a "Calculus" level means that you have much more knowledge.


Why even use the words "algebra" and "calculus", then? Why not use "8th grade" and "12th grade"?


It seems you only care about the perceived difficulty. I know everyone is proud of their children, but there is really no need to equate programming with any kind of math, let alone any "levels". Programming can and does stand on its own, you don't need to legitimize it through comparison with socially-accepted math skills.

The premise is flawed, in two ways.

First, programming is not math. It can be math-y, but that's not the same thing. Neither is programming any "level" of linguistics, even though it can be language-like at times. You can reason about certain aspects of programming by using math concepts, such as lambda calc, discrete logic, or Turing machines and similar constructs.

Second, and most importantly, math is not a valid measure of difficulty! Some people have an easy time with equations, but can't for the life of them figure out how loops work. With other people, it's the opposite. And it really is that trivial.


Mmm.

Could we say that programming is: part codified reasoning, part automation, part creative practice, part figuring out how computers and networks work, part figuring out how your toolkit works, part figuring out how the platform your coding against works?

I guess that it is only mathsy insofar as the problem domain is mathsy.

I see a whole wave of non-sciencey people learning how to code in the near future. These people are not very math-oriented.


We could try saying, "Hey, drawing analogies between reductionist descriptions aren't really useful unless you have a specific point you're trying to make."

Which, in the case of the OP, seems to be "My son is awesome."


I have seen it said that mathematicians break down into analyst types (calculus) and algebraist types (algebra). The difference in approach is usually described along the lines of "in analysis, you have an object under study and you want to describe how it behaves in some sort of limit condition. You have a mental model of the problem and you work to formalize what your intuition tells you" vs "in algebra, you have an object under study and a set of rules. You apply the rules in a mechanical manner until you produce an interesting-looking (or desired beforehand) result".

Under such a worldview, my personal view of the mental requirements of a simple CRUD type of task is that the ability to apply definite rules called for in the "algebraist" approach is closest (and extremely necessary). I've read many comments that beginning programmers can have a hard time understanding that the computer will do exactly what you tell it to do, and nothing else; applying algebraic rules is a very similar concept.

Geometry is an unpopular choice in your poll, but I think it has some of the same flavor of recognizing that "by labeling this complicated term 'x' and this other complicated term 'y', we can transform the current state of the problem into exactly the preconditions for theorem T" that I'm thinking of.

Anyway, overall I vote for algebra 1.


I always thought phrases like "algebra 2" were signs of somebody who doesn't know very much. Is there some intrinsic "twoness" of it? Does it mean anything that you have supposedly spent a year of it already, and now it is the second year? Would not the topics of the second year vary from school to school?

Similarly, "pre"-calculus. It came before calculus. Does that then include the ability to tie my shoes? I learned it before calculus.

When I took math classes in college it all made more sense. OK, you have course sequences, where you look at one thing one semester, another thing the next. But that was always a recommendation; you could take them out of their numbered order. And usually the title of the class was a topic, not just a number.


Agreed. Really, middle/high school level algebra ought to be called "simplifying equations" or "solving for a variable" because real math majors know that a college level algebra course is worlds apart and middle/high school teachers should be shot for letting their students think that they are competent at anything more complicated than balancing a checkbook. Similarly, pre-calc ought to be "concepts that we think you ought to be familiar with before you take calculus because you need to have a fundamental understanding of these concepts before you can do anything useful in math because, trust us on this, it will be nice to have these tricks in your toolbox of knowledge," but I suppose that is just too long so they kept it at pre-calculus.


You will (probably) never pull out pencil and paper and do arithmetic (simple, with fractions, averaging, etc.), simplify an algebraic expression, convert to standard form, factor a quadratic, solve a system of linear equations, calculate the area of a polygon, prove something about triangles, solve an inequality, divide polynomials, take the slope of a line, etc. This is what "math" consists of in K12 and very little of it is obviously linked to programming itself.

You don't need any of high school math unless your specific application requires it (i.e. graphics involves polygons, anything quantitative involves arithmetic and unit conversion, you may want to report percentages and averages at some point.)

Things I remember from K12 math classes that were useful for programming in general:

- What variables are

- What functions are

- You can compose functions (this was obvious because I had been programming for 5+ years before function composition was introduced)

- Very basic set theory (Python list comprehensions resemble set-builder notation)

- Introductory propositional logic (though I learned this in the context of programming 7 years before I was "ready" for it in math class)

Learning to prove things about triangles (geometry) exercises some of the same skills as programming, but I wouldn't say it teaches them. Certainly none of the theorems or facts have ever been useful, just the process of reasoning.


Python also supports set operations (union, intersect, difference, issubset, issuperset, etc.). So set theory will help in that regard, too.


True, but the operations you just listed are intuitive. It certainly doesn't take a math class or pencil-and-paper practice to know how to use them.


I have a slight problem with the question. Math is used when programming or creating models, but both are tools. I find it hard to compare the two in the way you're asking, so I think this poll is bogus. Programming requires abstract thinking as does math at the algebra level and beyond (more so at the calculus level and beyond). Other than asking what level of math is required to program X, it's hard to ask what cognitive level quantified by mathematical ability is required because cognitive levels both aren't easily quantifiable and also don't directly correlate with mathematical ability. There are lots of ways to do the same thing.

As for me, I have taken math to the level of Differential Equations and Linear Algebra.


What type of programming, what paradigm, at what scale, and dozens of other questions... I can think of numerous areas where each of these is not only "analogous", but directly used.

  - Want to even think of committing to scalaz/haskell? Category theory
  and lambda calculus.

  - Want to develop a physics engine for a modern 3d shooter?
  Geometry, trig, single/mutli-variable calc, algebra, and differential equations.

  - Want to do some NLP? Discrete math, automata theory,
  not to mention a strong background in linguistics.

  - Want to do some ML? Bayes statistics.

  - And so on..
I've always been amazed by how little is needed to squeak by in some scenarios and also how much is needed to do truly amazing things. The more you learn and push, the more you realize you don't know.

Edit: This was prior to OP clarification. :)


You can pick up all the Category theory (and Lambda Calculus) you need for Haskell from Haskell alone. (Of course, it doesn't hurt to know more. But it's not necessary for a newbie.)


Math doesn't come in levels. It only seems linear because it's taught that way. You can teach kids group theory before calculus without a hitch.


Yeah, I was surprised by the framing of the question. Math is not a set of levels, it's a set of tools that are each useful in certain situations, many of which build upon each other. The branches of math that are most useful in programming are set theory, logic, linear algebra, and statistics, and most of them don't even appear in the U.S. high school math curriculum.

I still remember getting to college thinking I was hot shit because I learned calculus as a freshman in high school, and then realizing I had no clue how to construct a proof. Calculus is taught in schools because it's how you send rockets into space, and in many STEM professions it's a dead-end that isn't all that useful for the job.


Optimization is often useful as well. (E.g. lots of standard algorithms like, eg, for find the shortest path in a graph, can be expressed as linear optimization problems.)


That is a little bit of a stretch- I think it generally makes more sense to people to move from discrete to abstract. But I agree that it's much less linear than how its currently taught.


I think the way to answer this question is to imagine the universe of math students from age 8 to 21 and imagine which of them could learn 'bog standard journeyman CRUD programming' at the pace your son has.

I'm going to hazard a guess that you could teach it to most children his age although perhaps not as fast. I think the main obstacles being motivational and esoteric, not cognitive.

Not sure I like the structure of the poll choices either. Does anyone really think that trigonometry is at a higher cognitive level than the classes that are taken before it?


In a lot of way programming is at the level of the programmer. If your son likely to know that some problem he's solving is best accomplished implementation of Dijkstra's algorithm or that for some aspect of his program it might be sensible to use a bloom filter? No. But will this stop him from creating what he's trying to create? No.

Programming is a progression from being able to give logical directions and knowing some simple arithmetic and commands all the way to knowing all kind of obscure things from discrete mathematics and linear algebra, perhaps with some application of things from calculus, statistics, and trigonometry occasionally thrown in.

However, what will separate proper journeyman code from mush is design and organization, something which is not entirely in the realm of math. There's a reason that programmers talk a about design patterns and waste a lot of time naming things.

So in a sense the cognitive root and differentiator of journeyman code is more analogous to the root of an understanding of architecture and planning than math.

Keep in mind that many professionals (occasionally myself included) do not even write journeyman level code.


Precisely, a good programmer is more akin to a general organisations and marshalling code blocks then a mathematician calculating his way forward manually.

But i guess this is a difference between extraverted and introverted thinking.


I voted for discrete mathematics for two reasons:

(1) It has relatively few pre-requisites in comparison to advanced calculus (which I'm assuming means something like a first course in real analysis).

(2) It isn't rote. There's more creative thought involved in solving problems. Even high school calculus is often extremely rote. I think programming is rarely rote, even if it's just a CRUD app. You have to strategize about how to approach the overall architecture of the program and make predictions about how early design decisions will affect future extensibility and more.


It's listed as the most advanced course though. I pretty much would agree with you, but this poll is too illogical.


> It [discrete math] has relatively few pre-requisites in comparison to advanced calculus (which I'm assuming means something like a first course in real analysis).

My first course in real analysis didn't have much in the way of prerequisites at all. I loved it because everything was covered ground up (including concepts like "limit").


While that might technically be true on some level, ask yourself if the average student would do well if they started with Rudin's Principles of Mathematical Analysis in 11th or 12th grade having taken absolutely no calculus prior to it.

There's a reason most universities require students to have completed the entire calculus sequence and often even a special "introduction to proofs" class before exposing them to a book like Rudin's.


There are really two different ways in which programming and math match up.

At a basic level, programming and algebra have a few key things in common (variables most notably), and more generally you'll probably end up using math to solve some common problems that come up in programming; that won't really rise to the level of advanced mathematics, though, beyond roughly algebra plus linear algebra.

More importantly, though, math and programming are both heavily about learning, seeing, and applying patterns. Algebra, trigonometry, geometry, calculus, discrete math, and linear algebra all give you a toolbox of patterns to apply. Likewise, the more you learn about programming (or more generally CS), the more you have a toolbox of patterns to apply. Both heavily involve analytical reasoning and fast pattern matching against a vast set of possibilities. In other words, both of them bend your brain in many of the same ways, and they cross-train incredibly well.


I think programming actually requires linguistic skills. When you program you are actually writing in a language, and you have to respect it's syntax and structure.

Therefore I don't think it should be compared with math. Unless you are writing a program for a very specific scientific problem that requires the elaboration of a mathematical model.

Usually the computer does all the math, all you need to do is type the operations you need it to calculate.

I'm not saying they're completely unrelated, I just think linguistic skills are more relevant in most cases


This goes to the heart of the real issue. Programming is expression, more linguistic then maths. What would a lisp program with heavy macro usage map to? Or a newLisp program with fexprs? The programming concepts are abstractions and transformations more akin to how we change words meaning then how you calculate some lines.


It's not.

There are certain levels of math or logic needed for various programming tasks, but it is not 'analogous' to any level.

For example, function composition is very useful in programming and thus Algebra (or was it Algebra 2???) comes in handy for understanding that at a basic level.

However, if you're doing graphics programming, then you often need experience with geometry (composition of basic shapes to form more complicated shapes, linear algebra (matrix operations), and modern algebra (quaternions).


Despite what others are saying. This is a very good question. And extremely relevant.

The answer depends on how great you want to become. Take as much math as possible to find the best solutions. I come from a background of the hard sciences, I never took programming in college and I was able to pick it up quite easily because of my strong foundation in mathematics, analytics and logic.


I agree 100% it is relevant.

I would put it into these terms, however, for simplification.

Coding simple programs is probably analogous to algebra/functional logic.

Having a 3-D model of workflow process with escalation loaded into your mind when you're working on an architecture is more akin to calculus. Add User Experience and network requirements into the mix and the skill is more akin to writing an Overture and the Opera. At this point you have a different animal than described above.


I wrote a driving game in C about that age and the hardest thing to figure out was vectors and sin/cos-stuff (you have to separate speed and direction even in a simple driving game) so I guess the programming part is easier than that. Although it's just hard because I didn't know about those concepts at that time. And of course, the code was very simple.


I have always found geometry to be the most similar in terms of content. Geometry is where most people are introduced to proofs, which are similar in a lot of ways to programming. Also, you often need to know some amount of geometry in even CRUD apps to properly deal with interfaces, charts, etc.

That said, I spend 90% of my time writing geometric analysis libraries, so I am biased.


I like this analogy. When I hear someone compare programming to math I assume that they mean what I would mean if I were to say it. Specifically, their similarities lie in the realm of logic.

Some programming problems require specific areas of mathematics, some others, some none at all. All programming, as well as all real mathematics, require the ability to reason logically about a problem.

Based upon this understanding, I can't chose any of the poll options, but if I had to, I'd go with geometric proofs as well.


OP here: Wow! I did not expect such a response.

I want to offer a few clarifying points: We homeschool. My son likes math but does not like the 'busy work' associated. Mom was wondering if my son just didn't get long division, ratios, and fractions. I was thinking that if he can program js, awk, lua, and objective-c then he can do anything that arithmetic might demand of him.

In other words I intuited a character issue not a cognition issue and wanted other opinions.

Also, I really do understand that programming cannot strictly be equated with math. I purposefully used the word analogy because they are not 'fungible' things. In fact the term analogy connotes that I understand that there is a resemblance in some particulars between things that are otherwise unlike.

I posit that the resemblance is effort of cognition (though, of course, some might disagree that there is even that point of connection).

Another common misunderstanding was that I was asking how much math does my son need to know/learn to be a programmer (or otherwise). We will explore the very limits of his education (sane, practical, healthy limits); that's the whole point of us homeschooling him. Once he hits mom's limit in any given realm we will out source. I hope his current love of math/science/writing will know no parental impediment.


Can I offer this unsolicited advice?

Don't knock rote mathematics. 'Busy Work' in most other fields is called 'practice'. And like all things, practice is the key to improving a skill. Repetition, memorization and muscle memory are all key fundamentals.

If your son wants to be a quarterback, you practice throwing a football. Over and over again with slight variations to the angle, distance and speed. A meaningless procession of skill building that builds the muscle memory and "know how" required to be successful at the more complex task of managing a game and leading an offence, which is what a quarterback really does. You can't be good at throwing to a receiver on a button hook or on a screen play if you are still mastering how to manipulate the speed and position of the ball as it leaves your hand.

We would laugh in the face of anyone that suggests otherwise.

Your brain is no different. It needs practice in the basics before it can progress to more advanced topics. You need to spell before you can write a story, and you need to know addition and multiplication before you can perform calculus. The basics for math need to be implanted in your brain for immediate retrieval, so that your processing power can focus on the higher level task.

It's not enough just to know that "there" can be spelled three different ways. To be a good writer, you need to know instantly which one to use when, otherwise you just simply aren't very efficient. Likewise, a person needs to know instantly that 8 and 64 have a distinct factor/product relationship to be able to understand that a rectangular floor with an 8 foot length, 3 foot width and total area of 64 square feet cannot possibly exist and has been measured incorrectly before you proceed to buy all that carpet.

The most skilled in any field have the greatest mastery of the basics. Mathematics is no exception.


undoubtedly programming is more engaging to work on than solving arithmetic problems in long division.

there is relatively little utility in learning arithmetic by rote and its not surprising that your son doesn't want to do it. however, as I'm sure you know, rote arithmetic problems are present on state exams and your son will need to be able to do it in order for his home schooling (which is great, congratulations to you) to be officially recognized.

there's a certain point at which the learning process stops being about gaining knowledge and skills, and starts becoming more about learning how to conform to institutional requirements. this sucks. it sucks real bad. you already know this though, which is probably one of the reasons why you chose to home school. unfortunately sucking it up and learning how to play ball with the institutions of our society is actually a really important thing, painful and boring as it is. long division by rote is some kind of proxy for this. better get started with building up your son's tolerance for annoying shit.


Well said. Totally agree...


I wouldn't look it that way. Programming is an art which aims to solve any problem in any domain using logical reasoning and systematic application of solutions that requires to solve the problem. Or even build a whole new thing.

Given that, programming is everything and anything. Which is why a good programmer would always focus on the problem not the knowledge required to solve the problem. Because if you embark on tough project, find solutions is essentially like making a discovery.

In my opinion you shouldn't ever first learn books(apart from the very basic ones) and then go in search of problems. The right approach is to look for problems, and while solving them and you can learn the knowledge required to solve those problems as you go along.

Programming is analogous to nearly everything in math. Programming is only a tool, which you can use to solve various problems around yourself modeled in some mathematical form(In short everything).

Which is why programming is the most awesome profession ever. Because by nature it lets you probe and grok the nature, working and science behind everything. That is why programmers are so good at problem identification, solution design and problem solving in general.


As a game designer, i'd say Physics, algebra, geometry come in VERY handy. Now, i am not familiar with how these topics are taught in the US system, but assuming your options are a progression, i'd say pre-calculus should do it.

Similar to your son, I have been programming since an yearly age. We had Macromedia Flash back then, and over the course of my academic life, as i progressed in the Mathematics courses, my programming capabilities increased with leaps and bounds. For example, the movement in my games was usually similar to Pacman or bomberman. No arcs, or curved paths existed. As i learned about 2D motion, i started making Platformers. As i learned trigonometry, I started making games involving curved paths on a 2d plane. Even a realistic Car game. i remember coming home from high school the day they taught us about "Radians" and began usign the sin, cos, tan funtions of ActionScript (because the documentation said it used Radians and that never made sense to me before). It was that very year i programmed game AI that would chase the player in a realistic way.

So yeah, math helps


For Objective-C (or any objective language): geometry. Qualities of objects, and their role in relation to other objects are really all there is.

Also, memory, which is all we are manipulating at the end of the day, is linear; points on a line.


the time series for RANDOM ACCESS MEMORY is far from anything resembling linearity. Nor is a snapshot of it at any point in time usually.

RAM is equivalent of "tape" in a Turing machine. If its anything resembling linear for any amount of time, the machine would not be Turing complete ... and therefore a not very interesting programming language/model.


Ah, apparently I do not fully understand the hardware implementation.

Consistent, in software at least, is the concept of memory being linear; references using a start and end point, and points between.


If you voted you don't understand math or programming.

Programming is recipes for a computer to follow. In many cases there is Zero math involved. You can write plenty of Data Entry code and never use a single numeric function.

Conversely you could write a single line of code that required all the math skills of a Quantum Physics Doctorate.

Programming is not "math" it is recipe authoring. It is more analogous to home ec than Dif-e-q


> You can write plenty of Data Entry code and never use a single numeric function.

Numbers are not math.

(Anyway, I agree that the poll is strange.)


"God made the whole numbers; all else is the work of man." -- Leopold Kronecker


Now we know better: man made the integers, too.


... and yet the obvious answer to a poll like this lies on the bottom.

HN makes me sad these days


do they both involve cognition?


I made my first simple game app at 10 years old and I remember feeling that the concepts were fairly easy to grasp. Admittedly I was doing much simpler 80's BASIC programming, but I also didn't have the internet at my finger tips like your son has.

I don't remember feeling too challenged when I learned algebra. It wasn't until I got to trig and calculus that I really started having to stop and think hard.

As for my career, I've turned out to be an above average programmer but not superstar level. And I haven't lucked into any big dot-com jackpots, though I've tried.

So in my opinion, your son is probably smart and could do well, especially if he learns how to stay focused. But I don't think his programming at 11 is necessarily proof that he is a genius or anything like that.


You can get by with an "algebra" level understanding of programming.

However, concepts such as recursion, and other metaprogramming don't really make sense at that level.

You can make rote crud apps with an algebra level understanding of programming.


I understand recursion and metaprogramming, I'm pretty poor on algebra.

When it comes to deep level programming concepts, debugging complex apps - working on hard performance issues, I have no problem.


I think OP was using math as a scalar metaphor for programming.

In that vein, I'm not saying you need to literally know algebra, just that it's a parallel kind of progress.

The point being that if you know algebra well, you can do useful things with math. In a similar vein, if you know functions well, you can do useful things with programming.


Obviously it depends.

Creating a software solution (program or app, whichever is it called these days) goes beyond programming/coding it, and it often depends on the problem you're trying to solve aka the problem domain or simply domain. That's why creating an mobile app to track a list of things to do on a person's day requires a different process for creating it than creating a solution for an self flying aircraft, weapon, banking, or medical system.

So, I don't think programming in general is bound to any math level. Some systems may require some specific math in order to create an adequate solution for them.


Anecdotally, but it started programming games when I was 11, using gamemaker 4, and it's GML scripting language. I breezed through maths for the next couple of years, as I fundamentally understood primary/early-highschool algebra.

The problem arises, in that I adored maths, and had amazing teachers , and my father is an engineer and would sit me down every week and teach me more about maths, so how much can be attributed to programming, is hard to say. All I know is that variables introduced in the classroom made the class look at me funny when I pointed out how they worked when programming, in grade 6!


Since I'm not from the US and we don't have 'levels' of math where I live (you take math in high school and get some or all of the above combined), can someone explain to me what each level entails?

While I know the definitions of each term, I'm unclear on what exactly 'Pre Calculus' would be in this case. Also, is Trigonometry higher than Algebra or Algebra 2, if that question even makes much sense? Finally, what are the differences between Algebra and Algebra 2, and Geometry and Geometry 2?


My $0.02: programming doesn't slot into a tiered progression of mathematics education as usually presented in secondary and higher education. At various times, it'll utilize concepts from basic arithmetic, trig, algebra, discrete math and set logic, and even topology and linear algebra. Trying to peg it against a normal math pedagogy is going to be a recipe for frustration.

However, it can be a great motivator to learn new areas of mathematics.

Consider a simple game engine: writing a program that displays sprites on screen and moves them will build an understanding of basic coordinate systems. Collision detection requires slightly more advanced math in that coordinate space. Pathfinding (say, for enemies chasing the player) requires all that, plus basic trig, plus some understanding of randomness and probabilities.

Particle behavior (for weapons, jump physics, etc.) begs for calculus. Error-handling can be a great intro to the difference between total and partial functions, etc. etc.

This was a huge motivator for me in learning mathematics both during my time in school and beyond. Instilling a love of problem-solving through coding is a great way to put your kid on the route to continuous learning.


The question, "What level of math is programming roughly analogous to?" isn't necessarily answerable. However, you've provided context so if I can be allowed to rephrase the question as "What level of maths is required to create a standard CRUD platform (language not relevant)?", it would definitely be algebra.

Sure you might be able to do it with a knowledge of nothing more than basic arithmetic, but you're going to be able to understand and manipulate data more efficiently with a solid understanding of algebra.

That being said, Objective-C isn't the easiest language to pick up, especially as a first language. If your 11 year old starts to struggle, maybe point him at something like Python which has a shallow learning curve, great support (especially for beginners), and can do pretty much anything (ignoring the argument of whether it _should_ be used for things like drivers).

If your son chooses software engineering as a career. Advanced calculus may well be required. I've had to debug complex legacy code before that implemented computations rooted in calculus and without that knowledge, I wouldn't have been capable of succeeding.


Actually, I find that programming is more akin to Technical Writing (for example, instruction manuals for furniture assembly) than it is akin to mathematics.


At that level, I'd say literature is more important and more of an analogue than mathematics. If your programming can tell a good story and the user can interact to move the story line along - you're golden. But math can be very important/helpful and if he can comprehend Algebra, then he's got it 98% covered - at that level. End of the day, the more he knows the better off he'll be...

Just an opinion.


The mathematics that programming -- program verification -- requires is unlike traditional mathematics. All programmers do this; all programmers will go through a process to reason why his programs are correct. This process might be formal or informal, conscious or subconscious, through or incomplete. The most relevant branch of mathematics would be formal logics.


Isn't Logic a subject in maths? I upvoted Discrete Mathematics, because that's the area of maths programming is in, but at the same time I programming is infinitely more simple and intuitive (to me) than Discrete Mathematics is.

Anyway, we had two logic courses (Introduction to Logic and Advanced Logic) which also have close connections to programming.


roughly around algebra.

programming has an "advantage" over math in that you can just program something and see what happens and therefore gain an intuition and craft your way around things. mathematics is much more deprived in this respect, for a variety of reasons.

overall i would describe programming as a precise form of writing, whereas math is a very pure science


A kid programming an iPhone app could be programming at a high level and doing neat stuff, but you clearly indicated that he is doing plain vanilla programming, so I'm going with the Algebra level. That's not to say your son isn't advanced (making any kind of working app is far above the level of most 11 y/os), just that the actual math probably isn't complicated, it's the concentration and attention to detail and creativity and being able to work with APIs that he's really getting ahead in. I'll concede the point that certain projects require math skills in certain areas, and CompSci PhDs need to understand some obscure parts of the math world (lvl 20 if Calculus rates a 10), but making an icon move around a screen is more like writing a recipe on how to bake a cake than it is mathematics.


I use a bit of trig to do graphics programming but that's about as much Math as I've used when programming.


It seems to me that there are three different issues, and people are mostly only talking about one.

First, how much math does he have to know to be able to program problem X? Depends on what problem X is. This is true, but I don't think it's the question that is being asked.

Second, how much math does he have to know to be able to reason formally in the way that programming requires? That's being discussed, a little, and I think that's the question that was asked. (For what it's worth, my answer is algebra or geometry, at least for a beginning programmer.)

Third, how much math is needed in order to be able to handle the formal notation of something like Objective C? I don't think that's the question that was asked, but maybe it's a question that ought to be asked. (My answer to this one is probably geometry, maybe even trigonometry.)


The description is clear, but the title of the poll wasn't.

Note that if you're doing game development, a higher level of math will be required, than if you're writing a crud application that talks to an api; in the latter, understanding linguistics and a good common sense are more important.


Even with the clarification, I would still ahve to say a few things.

I would say that basic crud-level programming is equivalent at its base to pre-algebra but to get really good at it you have to focus on making it like geometry. Unfortunately too few programmers work on making the code well structured, maintainable, etc.

The second problem is that CRUD itself can mean all kinds of things. Again, at a basic level it is equivalent to pre-algebra, but to do the database side right, you have to appreciate and understand the stuff I learned in first year calculus. Much of this doesn't need to be taught there. But a strong, internalized understanding of terms like function, discrete function, etc are absolute prerequisites for db design.

My answer would probably be "all of the above."


I read the results on the survey that computer scientists should learn more of what math can offer them.

One premise of this survey is that math and cs are both "sequential" -- which is FALSE. And the survey assumes the Math and CS sequences can be placed in parallel. This is an artifact of the "grade" systems in school.

The two winners in the poll are "algebra" an HS subject and "discrete math" which is usually taught in college. And I am surprised to see how few people chose geometry :-(

In university, Engineering departments and physical sciences departments teach math to their own students in parallel with more abstract treatments in a math department.

I bought a copy of "Robot Vision" and it's basically multivariate calculus with awesome pictures!


Isn't that like saying "Is trig on the level of precalculus or algebra?" It depends on what you are doing. Plane trig and spherical trig are worlds apart.

I think that this says more about the level of programming that people are doing than how hard programming is.


Just yesterday I decided to begin reading a Calculus book (I never went to college). The very first thing covered was ƒ(x) which describes input being passed into a function. Needless to say, as a programmer I am very familiar with this concept.

So far, my vote is for Calculus.


In my high school, I remember being introduced to functions of that type in Algebra II and at the very latest trigonometry (sines and cosines).

While a knowledge of functions is vital to understanding Calculus (the fundamental theorem of calculus depends on them), it's only a small component of the bigger picture. Calculus is mainly about how functions change with respect to some other variable (time is common) and the inverse of that operation.


On your scale, I'd put programming somewhere around Aleph0.

Programming is completely equivalent to constructive Maths (see http://en.wikipedia.org/wiki/Constructivism_(mathematics) ). Constructive Maths is basically regular (classical) Maths, with the acknowlegement that the halting problem is undecidable. One major consequence of this is that we can't use the Law of the Excluded Middle (ie. "for all P, P or not P").

There's some really interesting research going on here that's far outstrips 'advanced calculus', for example take a look at Homotopy Type Theory.


I'd say that discrete mathematics does the best job of explaining and crossing over with Computer Science and programming. Not necessary to build a CRUD app, but perhaps necessary or at least very helpful for anything less trivial.


I think programming even a CRUD application is much more congnitively demanding than any math that your son is likely to be taught before university. This is because math in school is taught mostly in terms of procedures that can be blindly followed. On the other hand in writing even the simplest programs one must deal with freedom: there are many ways in which a program can be structured, and many paths its execution can follow, and you must develop your abstract thinking skills in order to see the consequences. It is only at the university level that you begin to see this kind of freedom in doing math.


Most programming languages were made by mathematicians, because of that you will see a lot of terms and concepts analogous to terms and concepts in advanced mathematics. Thus it can only help having more of a math education. Personally I think the vast majority people would be fine with Calculus 1, and Discrete Mathematics (which is a 200 level class in my uni while Calc 2 is 300 level). That's because Linear algebra and Multivariable Calculus are concepts that are only used by the smallest percentage of programmers and knowledge in such fields wont make you any more money in the job field.


Algebra: Functions, variables, and manipulation of basic data structures.

I learned programming before I learned how to manipulate variables in math, and my prior knowledge helped me figure out how to deal with most of algebra.


Elementary arithmetic, high-school english


This question should establish a separation between the content that mathematics teaches, and the cognitive abilities that develop as a result of learning mathematics.

Could an 11 year old dive into the CRUD with an 11 year old's mathematical knowledge? Absolutely. Will he/she have the ability to rough it through debugging challenging problems that may emerge without the years grit developed as a result of solving difficult calculus and linear algebra problems? Possibly. Perhaps not.

Either way, you sound like an awesome dad :) I say let him have at it!


The OP's question assumes that some topics are inherently more difficult to learn than others which isn't necessarily so. But in terms of the way knowledge is structured programming could be regarded as a practical application of computer science, which in turn may be regarded as the science of what can and can't be mathematically proved. When you check a mathematical proof a computation is being performed involving your brain and a piece of paper. And nowadays some proofs incorporate computer programs too.


Can I just say; Your son is 11 and is making mobile apps in Objective-C. WOW. Kudos to him. He's shipping! That's really amazing and something to be celebrated in and of itself.


I disagree that there are "levels" of math as your post seems to imply. Yes, it's true that certain subjects are typically taught in a certain order (in the US at least) but that doesn't really imply that calculus for example is "higher" or more demanding than algebra or discrete math. There is professional, expanding-the-limits-of-human-knowledge level research being done in Algebra and Geometry just as there is in Calculus. Calculus is not the endpoint of math.


Programming is just the implementation of an algorithm. An algorithm, per se, is meaningless outside of a particular domain.

For example, I have implemented standard signal processing and acoustig echo cancellation algorithms, in both C++ and Java. I happen to have a MS in EE and a BS in CpE. Now, take someone with a CS degree (not CpE.) They may be amazing programmers, but they will have a very tough time understanding the math behind these algorithms--It's all about the domain!


I noticed ODE's and PDE's are not on the list. I consider them a natural progression in mathematical understanding, perhaps following on from Advanced Calculus.


It would depend on what you're programming, IMO, but I don't think they're really analogous, and I majored in math and can program.


It depends what is being programmed.

Pre-Algebra / Discrete : Basic variable substitution and functions

Geometry : Drawing 3d figures and graphics

Calculus & Trigonometry : Physics engines


As a math major that now works in IT, this is the simplest and most accurate answer here.

That said, I would say the "ways of thinking" are very similar more than anything. It is similar to things like real/complex analysis in that sometimes you just need a clever solution, but it is similar to something like abstract algebra in that sometimes you just need to hold a lot of information in your head all at once as you go through a long chain of logic.


No. This is wrong.

The correct answer is abstract (modern) algebra.


Do you have a reason to believe this?


[x] Discrete Mathematics


Been programming 15 years professionally and I'm fairly poor at maths. My arithetic is not great, I know a little trigonometry.

Having said that I've made build 3D engine all the way up from rendering 2D triangles (had to watch quite a few videos to get the maths right).

This is definitely an apples to oranges comparison.


Having gone through Mechanical Engineering school and also developing software (coding C++ and others) for the past 12 years...I see programming as more assembling physical systems and getting them to interact much more than how well programming can be related to any particular mathematics.


Bog-standard CRUD? If we're just talking that, then I'd say it's symbol manipulation, potentially with some basic transformations thrown in. I'd put it on the level of algebra.

Depending on what he's actually doing with that data, though, the level may change. Got links?


OMG I can't believe people are actually attempting to answer this utterly nonsensical question.


On some level, programming and math are the same thing. Algebras are programming languages for exploring mathematical structures. They just execute in the head of mathematicians (or in their computerized tools).

Many mathy programming languages exist in different dimensions of mathiness. To name a few: Haskell and/or F#, Lisp (specifically Clojure, in my opinion), Julia, R, J, Forth and/or Factor, or PostScript (the language of many printers) Logo, Erlang, etc. All mathy in different ways.

Any one -- Python or Clojure for example give you different sets of rules that you can use to manipulate the symbols of their language the same way different fields of mathematics give you different rules for manipulating the symbols of their language.

In general the better you are at understanding one the better you are at understanding the other.

They often collide more directly. Linear algebra is helpful in machine learning. Geometry and trig are helpful for ray tracing. Geometry is helpful for understanding multidimensional arrays in programming languages. Social sites like Facebook use graph theoretical algorithms to manage and mine their data for big bucks. The mathematical forumla of Bayes theorem figures prominently in many machine learning applications but also rationality, artificial intelligence, statistics, etc. You get the idea.

Most programming languages have a built in notion of a set which is fundamentally identical to the mathemtical concept of a set with the further restriction that the only types of objects you can put in a set are values of that language's data types and you have to refer to the null set as something else like nil or null.

Unless you're using Haskell (one of the most mathy of programming languages, being based directly on the mathematical field of Category Theory and having it's own official category called "Hask") where you have to understand something like the Maybe monad or the Either Monad or the List monad (and why that's largely equivalent to either of the others) in order to even think of not having a value. Of course understanding all of that is easier if you happen to understand what the mathematical concept of monad is. Which you probably don't unless you are a Category Theorist (or recreational Haskell dabbler).

With a deeper understanding of math you can more easily grok the power, elgance, grace and healing powers of things like Haskell and Lisp.

You need at least some understanding of basic math concepts to understand things like algorithmic complexity (i.e. "Big O" notation, amortized analysis, etc). Without this level of understanding you're in for a bad time trying to write anything more than a trivial program operating on a trivial data set.

It goes on. There's a lot to learn. But that's a big part of what I love about computer science. I can consume as much of the literature and concepts and ideas out there as I can as fast as I can and I will never run out of new things to learn, and on top of that, there's an ever expanding frontier full of new discoveries to make.

Anyway, none of this directly addresses your actual question which unfortunately I have no frame of reference for, but it's what I would want to know if I had a son who was interested in programming. And something I wish I understood earlier in my journey as a programmer.

Edited to add: And if I did run out of math/comp sci stuff somehow, it all translates to physics, cosmology, etc! :)


Programming is a bad term here I think. Computer Science is (on some level) the extension of math to dynamic processes.

Overly simplified, math might give you a well defined value, but no way to actually calculate that value, that's where computer science come into play.


If that's your 1-10 scale I'd say:-

| bog standard, journeymen, CRUD programming in Objective-C | = 3

But programming and maths aren't analogous but they're also not completely orthogonal, so my answer would be in the complex plane somewhere around:-

2.98 + 1/3i

| 2.98 + 1/3i | =~ 3


What level of programming is "math" roughly analogous to?

Wait that makes absolutely zero sense!


Mathematical Logic


I'm bad at math, I have been a programmer for 25 years. Some types of programming are very math intensive. It really depends on what you're programming.

Programming itself isn't math intensive, though. Your application may be.


That's very US centric.


Hey dad, glad to hear that your 11 year old is interested in and able to do some programming. It's one of my favourite pastimes as well as my career. The poll is not meaningful, however.


Here is a visualization of the poll: http://hnlike.com/hncharts/chart/?id=7028714 .


In my opinion programming doesn't have very much to do with math, sure both are problem solving, but they aren't related at all. You can be good at one and suck at another.


after starting a discrete mathematics class, this is the closest to programming you will get. I think it also helps that symbolic logic serves a basis for computation.


"Discrete mathematics" is easier than "Advanced calculus" (presumably real analysis) so I'm not sure why it's at the end of the list.


I took up to Calculus II in college and have never ever ever ever used anything higher than basic arithmetic and a little basic algebra once in a while.


A slight simplification, but I think this question is like asking "What level of physics is playing basketball analagous to?"


Computational mathematics? That was the required course.

I work in sets and relations for the most part.


I would say: Lambda-Calculus


Geometry proofs


CRUD is not math.


Tax law.


Logic


I had to understand trigonometry to write a good motion function. So you have to have at least the understanding of trig to write that program. But having a language to abstract away the complexity meant I didn't have to know more than trig, which I would have had to if I wanted to write the program more effectively or in pure math.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: