Live data from Hacker News

Ask HN: Which areas of math are practical to programming/algorithms and why?

news.ycombinator.com

81–90 of 101 posts

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#81
Type theory. The Curry-Howard-Lambek correspondence shows that type theory, logic, and category theory are equivalent. Even ideas such as set theory can be grounded in type theory (due to the univalence axiom), as type theory can be used as a foundation (via homotopy type theory) for all of mathematics.

There are lots of practical uses. For example, the billion dollar mistake [1] is painfully obvious when viewed through the lens of type theory.

Software such as Coq can be used to write verified (provably correct) software and can be used by mathematicians for proving theorems.

[1] http://lambda-the-ultimate.org/node/3186

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#82
The book "Concrete Math" (https://en.wikipedia.org/wiki/Concrete_Mathematics) was written as a book-sized expansion of the Mathematical Preliminaries chapter of TAOCP ... so if you want to have a base of knowledge to help you analyze algorithms, it would appear this is a good place to start. I'm working my way through it now.

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#84

Lambda Calculus since it's a computer science field of study that makes math, in my opinion, useful for most situations in our field. Math isn't majorly needed and you can learn what you need on the fly. For instance, if you want to get into game development you need to understand some fairly complex math concepts but nothing is stopping you from attacking the problem and either a) working around it with your underst…

>Math isn't majorly needed and you can learn what you need on the fly. I really, really hope that whatever you are doing does not involve cryptography.

Cryptography isn't a computer science field. It is an extension of math. It's the exception to the rule, not the rule itself. Cryptography as a field of study has existed long, long before computer science was a twinkle in anyone's eyes. Modern day cryptography only centers around computer science in the practice of implementation.

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#85

Lambda Calculus since it's a computer science field of study that makes math, in my opinion, useful for most situations in our field. Math isn't majorly needed and you can learn what you need on the fly. For instance, if you want to get into game development you need to understand some fairly complex math concepts but nothing is stopping you from attacking the problem and either a) working around it with your underst…

Have you tried interviewing at game development companies? Many will test the hell out of your 3D math concepts and will reject you if you don't already know it well. They don't accept that you can just 'learn it on the fly'. Honestly I'm not sure if I'm be able to handle a modern graphics programming jobs unless I studied and practiced constantly for at least six months straight. And I've worked on a bunch of 2D gam…

What I said was "Math isn't majorly needed and you can learn what you need on the fly."

You said "Have you tried interviewing at game development companies"

These are two separate things. It's like saying "Most people can learn how to fill out their tax forms on the fly. You don't need anything special you can just read up what to do when it comes time to." and then you coming back and asking "have you ever applied for a job at H&R Block? You need to be well versed in the tax system to be a full time tax filer"

This is not at all what I was referring to.

The question at hand was "Which areas of math are practical to programming/algorithms and why?" Would you say that game development is the representation of the entire programming field? No it's a small portion of our profession. If you want to do that professionally round the clock then you need to prepare for what you will be doing in that field but that doesn't mean that if you want to get into programming or algorithmic thinking that you should learn game development. That's just one small element.

> Honestly I'm not sure if I'm be able to handle a modern graphics programming jobs unless I studied and practiced constantly for at least six months straight

What you have to ask yourself is what is it that I'm practicing for this job

You didn't learn the maths first and said "you know game development looks good let me go there" and sit down and start to learn how to program and think algorithmicly. You sat down and said "I need to learn everything that directly applies to this field" which in most cases (for rendering) is vectors, frustum view angles, Eular and maybe Polar coordinates, an understanding of how to use a quaternion, what a matrix is. The remaining, and much more important part in this equation, is understanding how to interface with OGL/DX/Vulkan. This is what a graphics person does best, not math.

It boils down to what our field is: understanding, in great depth, the systems of computation and how to interface with them in a structured, maintainable, terse, and fast manor. Math is a cart and programming pulls it to the goal post.

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#87
post #54
post #27

This seems like a good read on the topic: http://steve-yegge.blogspot.cz/2006/03/math-for-programmers.... Disclaimer: I know nothing about math but have been researching it recently as I want to go to university next year to study CS so I have about 8 months to 'learn' math (45 year old street programmer here :). I would appreciate any feedback on if this post has any merit, and will be following this thread as it's…

First I would recommend Cal Newport's blog about using time wisely. http://calnewport.com/blog/2008/11/25/case-study-how-i-got-t... Plenty more great info in the archive: http://calnewport.com/blog/archive/ Obviously the best way would be to go through your school's course syllabus for whatever classes you want to take and look at the material you will be doing, but these are good for a general preparedness: Axler -…

Thanks for the info. Do you think I will be able to use the Elements of Mathematics to kind of build a "Tech Tree" of math? One of the hardest things for me to find so far is what should be my order of acquisition for math. I did find this:

http://forums.xkcd.com/download/file.php?id=29015&sid=060c11...

But I have no others to go on to compare.

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#88
post #66

Earlier quoted context omitted.

Literally. An abstract category is an abstract abstraction. That's the realm of metaphysics. Ayn Rand was a student of the classic Greek philosophy, nothing wrong with her.

Let's look at Wikipedia's definition. > Metaphysics is a branch of philosophy concerned with explaining the fundamental nature of being and the world that encompasses it. Metaphysics attempts to answer two basic questions in the broadest possible terms: > Ultimately, what is there? What is it like? Does category theory have anything to do with that? No.

> > Ultimately, what is there? What is it like?

> Does category theory have anything to do with that? No.

I could argue that category theory is claiming to answer those questions for mathematics. (So is the axiomatization based on set theory.)

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#89
> Which areas of math are practical to programming/algorithms and why?

The basics: + - x /

Generally speaking, any vector or array can be thought of as a matrix (not that it is important).

Some problems and domains involved many operations on [multi dimensional] matrices. Where some math knowledge is advised.

Then there is "graph" both theory and practice. It's usually classified as math but has little to do with mathematics. I'd rather consider that as a unique separate domain with many practical and theoretical applications in other fields.

Forget about "crypto". Nothing of that is needed for programming. You'll use some algorithms but you'll never have to write or invent them.

In a theoretical sense. "Functional [programming]" is a branch of mathematics.

----

Overall. Math is seriously overrated and has nothing to do with programming.

If you're into programming. Maths are simply not required to be a programmer. Don't worry about that.

There are some domains (maps=graph, 2D/3D=geometry, variousstuff=matrices) in where programming regularly require some maths. The maths part is always a very specific subset that can usually be learnt alone.

If you're into abstract mathematics. There are some theoretical stuff that can be worked on which are very far from practical programming.

Re: Ask HN: Which areas of math are practical to programming/algorithms and why?

#90
Programming is pretty broad, as others have observed - in part of my world, scene reconstruction for machine vision tends to drag in tensor calculus, but the average enterprise developer is safe with the basics - also, good libraries mean you have the ability to use functions and processes you need, as opposed to getting recurrent nightmares about numerical stability when you have to code the realization of a complex process yourself
Post reply on HN