Live data from Hacker News

Poll: What level of math is programming roughly analogous to?

news.ycombinator.com

11–20 of 165 posts

Re: Poll: What level of math is programming roughly analogous to?

#12
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.

Re: Poll: What level of math is programming roughly analogous to?

#13
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.

Re: Poll: What level of math is programming roughly analogous to?

#14
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.

Re: Poll: What level of math is programming roughly analogous to?

#15
post #3

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

Re: Poll: What level of math is programming roughly analogous to?

#16
post #5

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.

Re: Poll: What level of math is programming roughly analogous to?

#17
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

Re: Poll: What level of math is programming roughly analogous to?

#18
post #3

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.

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?

Re: Poll: What level of math is programming roughly analogous to?

#19
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.

Re: Poll: What level of math is programming roughly analogous to?

#20
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.

Post reply on HN