Category Theory for Programmers - by Bartosz Milewski

imho, this is the best source of knowledge. His book is amazing.


TL;DR (WWW Q&A)

Who is Category Theory?

“Category Theory is to Programming what Chemistry is to Baking… Whether or not you know about monoids doesn’t change the fact that they are in your code”

Why Category Theory?

One of the important advantages of having a mathematical model for programming is that it’s possible to perform formal proofs of corectness of software. This might not seem so important when you’re writing consumer software, but there are areas of programming where the price of failure may be exorbitant, or where human life is at stake. But even when writing web applications for the health system, you may appreciate the thought that functions and algorithms from the Haskell standard library come with proofs of correctness.

Category theory is extreme in the sense that it actively discourages us from looking inside the objects. An object in category theory is an abstract nebulous entity. All you can ever know about it is how it relates to other object — how it connects with them using arrows

What is Category Theory?

  1. It becomes evident that different areas of math share common patterns/trends/structures.
  2. This becomes extraordinarily useful when you want to solve a problem in one realm (say, topology) but don’t have the right tools at your disposal. By transporting the problem to a different realm (say, algebra), you can see the problem in a different light and perhaps discover new tools, and the solution may become much easier.
  3. The bridges between realms are provided by category theory.

A category, then, is any collection of objects that can relate to each other via morphisms in sensible ways, like composition and associativity.

  • So the collection of sets with functions forms a category



🌱 Back to Garden

9 items under this folder.