3 ms·
Just another opinion on this: I don't think "Category Theory for Programmers" is that great from a pedagogical perspective. I get that its freely accessible, bu
by theoh 8y ago
Just another opinion on this: I don't think "Category Theory for Programmers" is that great from a pedagogical perspective. I get that its freely accessible, but like the "Haskell from First Principles" book, the quality of the exposition is a bit questionable.
Call me old-fashioned, but when it comes to learning math, I believe it pays to seek out people who really know how to teach the subject, rather than (what might uncharitably be described as) self-promoters churning out half-baked introductory materials. This goes for the "Catsters" video series as well. Everybody points to them as if they're brilliant, but compared to what standard? Sometimes it feels as if the people who blithely link to these resources are indifferent to whether the teaching is good or bad.
Even Mac Lane's book "Categories for the Working Mathematician" has been credibly criticised for being poorly written—but because it's so famous/prestigious it still gets loads of five-star reviews.
Personally, I'd recommend Categories and Computer Science by RFC Walters, or Steve Awodey's Category Theory for a more general overview.
(This might all sound peevish, but it feels like a real hazard of trying to learn difficult things from the web: the most conspicuous and superficially charismatic offerings/lecture notes/blogs don't always turn out to be reliable or well thought-out when it comes to an average person actually trying to learn the material.
Monads are a good example of this bad situation. A good way to learn about monads would be to have a few, shortish, interactive conversations with an expert. Ten thousand cute online monad analogy tutorials is the opposite of this: it's actively counterproductive because each new analogy just creates more vagueness and FUD.)
- elbear 8y agoIt would help readers if you pointed out specifically what you think is wrong with Category Theory for Programmers.
- theoh 8y agoBriefly: verboseness, self-indulgence, a scattershot approach. It really shows that the notes not the battle-tested product of several years of teaching a course to undergrads, like Walters or Awodey's books are. (Admittedly, Walters' book is a bit eccentric by current standards of what should be on the syllabus, but it is well written.)
- thewawy 8y agoIf you want to learn the math approach, what’s the best source you found that assumes the least knowledge?
- theoh 8y agoEverybody is looking for something different. I like Awodey's book. See also: https://math.stackexchange.com/questions/370/good-books-and-lecture-notes-about-category-theory https://math.stackexchange.com/questions/370/good-books-and-... https://www.reddit.com/r/haskell/comments/1ht4mf/books_on_category_theory_for_beginners/ https://www.reddit.com/r/haskell/comments/1ht4mf/books_on_ca...
- burakemir 8y agoI also found Awodey's category theory more helpful than Milewski's ramblings (though I appreciate his effort). Maybe it's because I find "applications in theory" worth learning. If I may try to point out what's missing: it is the motivation which seems to get lost for lack of examples. Here's a theory, called category theory, and many of us believe it can inform their designs, providing a perspective on compositionality, and a higher kind of equational/algebraic reasoning. Where are the ideas and examples that will actually help us inform or designs and achieve a higher degree of compositionality? Where is our chance to apply algebraic reasoning to the programs we write? So I will provide a lot of C++ examples. Granted, you’ll have to overcome some ugly syntax, the patterns might not stand out from the background of verbosity, and you might be forced to do some copy and paste in lieu of higher abstraction, but that’s just the lot of a C++ programmer. Maybe this would work, but we don't actually see it in Bartosz's posts. As a different example, take Wadler's papers on comprehensions and monads (rendered as Kleisli categories): the motivation is very clear, we'd like to express certain programs/queries within a functional programming language, and all examples contribute to an understanding. What should an experience programmer learn? One suitable answer seems to be the connection of lambda calculus with products and CCCs. That, though, would also need motivation for "functional programming", referential transparency. An alternative answer could be to point out the connection between topos theory and logic (or query languages). It almost seems that when flipping to Haskell examples, Bartosz is making a leap that let's him ignore the motivation: anybody who is writing code in Haskell won't need to be convinced of referential transparency. There is simply a forest of "patterns" and category theory seems to be a systematic path through it. Maybe potential applications in physics provide a similar motivation for physicists. ... but if you don't bring the motivation yourself, you're not going to get it from reading the posts.
- elbear 8y agoThank you for the detailed comment. It was exactly what I was looking for. And I agree with you. I find it frustrating and inefficient if I'm just presented with the theory without any applications. I also believe that to really understand and get an intuition for a concept, you need to see it applied, preferably in different contexts.
- rocqua 8y agoI get the feeling there are two very different paths towards an understanding of category theory. Moreover, I feel these paths either don't quite converge or only converge very slowly. The roads are: * Through experience as a type-system in e.g. Haskell * Through experience using this in pure mathematics From my experience, it seems that trying to swap between the two paths at the start is reaaally confusing. You need to stick to one path until it makes sense. Then perhaps later, you can get back to the other path. The point where "it makes sense" is when you get out of the toy-examples and manage to put it to actual use. My hypothesis is that: because the first actual usage examples are so different between the two paths, switching only confuses you. Obviously, this doesn't mean sticking to a single source. When you get stuck on one source an alternative explanation is great. It just needs to stay within the same path.
- coding123 8y agoI definitely think you're on to something. I think there are two types of math people among programmers: * Math heads that make their way into the CS world, and for loops were harder to understand in the beginning, but Set algebra makes sense. * Programmers by trade that have had to deal with the math side of things that probably learned for loops at age 10, and seeing sigma and epsilon symbols drives them totally nuts. I'm in the second group and I definitely say I live off content created by people that came into it the same way. Shorter answer: there are Java people and there are Python people.
- galfarragem 8y ago> for loops were harder to understand in the beginning Hits home. Haskell is difficult but solid, mainstream languages are easy but based on arbitrary foundations.
- Koshkin 8y agoI agree... Also, thing is, Category Theory is so abstract that no amount of tutoring may be enough for a person to feel really at home with it. As with other abstract branches of mathematics, the only way to really understand the value and the meaning of what the theory is all about is through months and months of hard personal mental effort and training.
- bojo 8y agoI’ve been slowly reading through Steve Awodey's Category Theory, but as someone with not much math background it’s a bit dense. He does have some nice lectures online which help, but I’m not sure how far my understanding would have stretched without reading Bartosz first. To be fair, I’ve come to CT through Haskell development, which Bartosz caters heavily towards. While it is absolutely not necessary for the daily aspect of my job, it really helps drive home the underlying mechanics of the language. That all said, now it’s brought me in a roundabout manner to wanting to learn more advanced math, although while I am grasping CT I can’t understand what people are talking about when they compare it to pure mathematical concepts (Sets, Groups, Rings, etc), which tends to be frustrating. I am attempting to find a path to understanding all of this without having to grab another 4 year degree.