Live data from Hacker News

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

news.ycombinator.com

61–70 of 101 posts

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

#61
post #29

Earlier quoted context omitted.

Not to start a math war, but why is set theory okay but category theory bullshit? While they're both useful, I think category theory encompasses a bit more than set theory and it's only a little more abstract. I also like the more functional approach that a lot of category theory requires you to take; if you're used to imperative programming it's a pretty different and useful way to think about things and it's great…

The difference between the set theory and category theory is the same as between the philosophy of Spinoza and Hegel. The first is grounded in reality, while the second one is an abstract metaphysics bullshit. Developing some abstract vocabulary to describe spherical horses in vacuum contribute nothing to programming, which is a discipline of describing and modeling some aspects and processes of reality. Knowing wher…

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 that there is uses for it. Not just in a "oh look, I can describe my code using abstract algebra, nifty" sort of way, but in a "knowing this was essential to finding the correct solution" sort of way.

For instance, the folks working on .NET's LINQ knew they were implementing monadic comprehensions; they just had the good taste to not use the word "monad".

Furthermore, it seems that having an understanding of abstract algebra is essential to making a distributed real-time analytics engine[0] [0]https://www.infoq.com/presentations/abstract-algebra-analyti...

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

#62

Earlier quoted context omitted.

The difference between the set theory and category theory is the same as between the philosophy of Spinoza and Hegel. The first is grounded in reality, while the second one is an abstract metaphysics bullshit. Developing some abstract vocabulary to describe spherical horses in vacuum contribute nothing to programming, which is a discipline of describing and modeling some aspects and processes of reality. Knowing wher…

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

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

#63
post #29

Earlier quoted context omitted.

Not to start a math war, but why is set theory okay but category theory bullshit? While they're both useful, I think category theory encompasses a bit more than set theory and it's only a little more abstract. I also like the more functional approach that a lot of category theory requires you to take; if you're used to imperative programming it's a pretty different and useful way to think about things and it's great…

The difference between the set theory and category theory is the same as between the philosophy of Spinoza and Hegel. The first is grounded in reality, while the second one is an abstract metaphysics bullshit. Developing some abstract vocabulary to describe spherical horses in vacuum contribute nothing to programming, which is a discipline of describing and modeling some aspects and processes of reality. Knowing wher…

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.

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

#64

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

That blog post is a mean-spirited rant and mostly lacking in substantial argument.

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

#65
post #63

Earlier quoted context omitted.

The difference between the set theory and category theory is the same as between the philosophy of Spinoza and Hegel. The first is grounded in reality, while the second one is an abstract metaphysics bullshit. Developing some abstract vocabulary to describe spherical horses in vacuum contribute nothing to programming, which is a discipline of describing and modeling some aspects and processes of reality. Knowing wher…

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.

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

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

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.

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

#67
post #50

Earlier quoted context omitted.

What did you learn from editing that journal?

Mostly that simplicity and clarity are hard to achieve but very worth it. Learning what it feels like to correct and simplify logic into something that is easy to read and easy to verify is experience that has transferred well. From my experience: Everything you publish in science/academia will be read by a wide, potentially hostile audience. It is very easy to be misinterpreted, and misinterpretation wastes a lot of…

The world would be a better place if everybody took the effort to make their point with precision, simplicity and clarity.

However the truth in many situations is that if person A spends an hour constructing a beautifully worded five-liner, and if person B spends the same time to produce several rambling pages, then person B's argument may well win out. Readers who have spent ten times as long wading through B's contribution are quite likely to have forgotten entirely about A's.

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

#69

I've been recently trying to make my way though Elements of Programming ( https://www.amazon.com/Elements-Programming-Alexander-Stepan... ) by Alexander Stepanov and Paul McJones and it makes me say abstract algebra. It's the first and only rigorous foundation of software engineering that I've seen. It basically maps abstract algebra to this somewhat simple subset of C++, introduces new algebraic objects (such as mem…

Favorite Stepanov quote below - apparently mixing mathematics and bad fish is quite potent:

Question: What is the origin of STL? Has STL been conceived to be what it is now, that is "the" C++ Standard Library, or does it come from some other project? Could you tell us a history of STL?

Answer: In 1976, still back in the USSR, I got a very serious case of food poisoning from eating raw fish. While in the hospital, in the state of delirium, I suddenly realized that the ability to add numbers in parallel depends on the fact that addition is associative. (So, putting it simply, STL is the result of a bacterial infection.) In other words, I realized that a parallel reduction algorithm is associated with a semigroup structure type.

The full interview can be found at:

http://www.stlport.org/resources/StepanovUSA.html

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

#70
post #40

Earlier quoted context omitted.

Could you perhaps be a little more specific? Sure, we use OR, AND, and even XOR to deal with conditionals that map to T and F, but this seems like kind of a surface level use of booleans. When do we invoke the algebraic properties of the structure when coding?

De Morgan's laws! I am sure people use it routinely to simplify complicated boolean expressions while writing code or mentally simplify complicated boolean expressions while reading code.

And then you can probably reduce it with a Karnaugh map. It's pretty neat.
Post reply on HN