Live data from Hacker News

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

news.ycombinator.com

141–150 of 165 posts

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

#142

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.

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

#143

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, th…

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?

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

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

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

#145
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!

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

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

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

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

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

#149

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, th…

> Programming isn't analogous to math

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

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

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

Post reply on HN