Live data from Hacker News

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

news.ycombinator.com

91–100 of 101 posts

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

#91

Earlier quoted context omitted.

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

Getting crypto right is not only about having a strong encryption algorithm. I'd say that what makes crypto hard is that it requires a lot of knowledge on both math and computers, but it might be considered a not-only CS field as the math requirement is higher than usual on CS.

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

#92
post #66

Earlier quoted context omitted.

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.)

Maybe some mathematicians think like that, but many don't.

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

#93

The CS departments in universities around the world have worked out good answers for this. Their thinking is summarized in the curricula they outline: which math courses they require as core subjects in the undergraduate CS degree program.

False. Decisions like this can be made at a higher level than the department. The mandatory courses in my programme were applied univariate calculus and an introduction to statistical modelling (with examples drawn from biology), imposed by the faculty of science on all science majors - all the while the CS professors were screaming for an introduction to logic and discrete maths to be added to the curriculum.

Well, yes; you have to look at the set difference between the CS math courses, and the common ones that all science students have to take.

That said, nobody in a STEM field should go without knowing at least univariate calculus. Without calculus, you can have only a poor intuition for situation involving rates of change, or little deltas being applied in one place resulting in other little deltas elsewhere. It's also necessary for stats, because you're dealing with oh, integrals such as the area under sections of a probability density function.

Part of computer science is numerical analysis, too. Once upon a time, numerical analysis constituted the bulk of "computer science".

CS undergrads arguably need some exposure to numerical analysis, and in such a course, the knowledge from other math courses provides support.

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

#94

Earlier quoted context omitted.

Abstract algebra is certainly abstract, but it is far from "metaphysical bullshit". Abstract algebra is just the precise articulation of patterns that we see across different mathematical formalisms. Now, the fact that it is so abstract does mean that your average programmer won't use it on a day to day basis. I'm certainly not going to argue that it is the most important math to understand. However, we are finding t…

Oh, monads.. sooner or later they will be mentioned.) Actually it is a canonical example of abstraction for the sake of having an abstraction, which only increases confusion. Monads make no sense in a non-lazy language. http://karma-engineering.com/lab/wiki/Monads2

> Oh, monads.. sooner or later they will be mentioned.

Yep, monads :).

> Actually it is a canonical example of abstraction for the sake of having an abstraction, which only increases confusion.

I intentionally brought them up with a concrete, real-world example where they were useful.

> Monads make no sense in a non-lazy language.

A more accurate statement might be "monads make no sense in a non-lazy evaluation context". There are plenty of cases when working in an otherwise strict language you will compose a series of computations over a lazy data-source. For example: you want to process a potentially large series of rows coming from a database without blowing through RAM.

You can solve this problem on an ad-hoc basis, but as far as I understand it, the folks working on LINQ wanted to develop a declarative, readable, sql-like syntax for creating/composing such computations in a way that would work generically across data-sources. The question is, what is the pattern of operations and constraints that is common to all of the disparate data-sources that can be used in this way? The monadic functions + monadic laws is a precise (if arcane) description of those operations and constraints.

Using monads is not the only way to structure computation in the context of lazy evaluation, but it is one that is relatively well understood and worked well with the goal of being "sql-like" because SQL queries can be modeled as monadic computations.

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

#95
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…

I am a self-taught programmer in my 30s (with an undergrad degree in humanities) now back in school. One of the main reasons I decided to return to school rather than continuing to program on the job was that I wanted to improve my math skills.

When you say you know nothing about math, does that mean you have no Calculus? That was where I was starting. To prepare for Calculus, get solid in algebra and trig. Then do single-variable Calculus (Calc 1 & 2). My recommendation would be to do linear algebra before multivariate calculus. You can do Calc 2 and Linear Algebra at the same time.

If you have no Physics experience you might also consider studying it. Physics helps you learn by applying math concepts. Also, I think it is very good for teaching you to problem solve as an engineer.

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

#96
post #63

Earlier quoted context omitted.

Haha! How is category theory "metaphysical"? Your value judgments in this case actually seem dogmatic and nonsensical... which makes sense if it's derived from Ayn Rand.

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.

I have a great deal of respect for Rand and her ideas, despite not agreeing with them.

However, her status as an intellectual heir of Aristotle is highly debatable. She's as much a disciple of Nietzsche as anyone.

Meanwhile, metaphysics is a subject that stems directly from Greek philosophy: specifically the subjects addressed in Aristotle's work Metaphysics (literally "the book that came after Physics"). Spinoza's theory of monism is itself a metaphysical theory in this sense.

Perhaps by metaphysics, you mean to certain metaphysical theories, such as the Idealism of the 18th century?

edit: missing punctuation

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

#97

Earlier quoted context omitted.

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.

Getting crypto right is not only about having a strong encryption algorithm. I'd say that what makes crypto hard is that it requires a lot of knowledge on both math and computers, but it might be considered a not-only CS field as the math requirement is higher than usual on CS.

As I said, crypto is not CS but CS can be used to implement cryptography.

Crypto is no more CS then it is EE. You can implement cryptographic elements in hardware but you don't see the math people setting up shop in the EE labs at a college so I don't know why you see them setting up shop in computer labs.

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

#98
post #87
post #54

Earlier quoted context omitted.

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.

This is a common complaint with a simple solution.

Just look at the curricula for various undergrad math programs at some number of decent universities. They have a set of required courses and the course descriptions usually list the prerequisites, and sometimes this is even accompanied with a diagram of the DAG as a flowchart.

For any given course, there's usually a canonical text or set of roughly equivalent in quality texts.

You can do the same thing for basically any area of study that can be found as an undergrad major at most universities.

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

#100

I want to stress before answering that everything you learn is useful if your mind is limber and willing to make connections. Some of the most valuable lessons in programming I learned from editing a philosophy journal in graduate school. I'll answer in terms of mathematical areas/concepts I've found immediately applicable in my programming career (format: what | why): linear algebra | graphics, scientific computatio…

>I cannot count the number of times someone I work with has expressed something that required one elegant logical operation in a horribly convoluted way.

Would be great if you can write/blog about it or just provide some examples here...

Post reply on HN