
Category Theory for Programmers (2014) - pkd
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
======
mybrid
This article reminds me of a couple of things.

1\. Wasn't Feynman the one who was promoting replacing classical mechanics
with relativity for freshman physics? How has that turned out?

2\. Fuzzy logic makes a similar argument. Bart Kowasaki down in San Diego I
believed proved mathematically that fuzzy logic equates Calculus and Nyquist
equations. I'm probably not getting that quite right. But, Fuzzy Logic was
called the "cocaine of math" and yet the Japanese have done quite well in
using fuzzy math in software and manufacturing. The arguments put forth here
about why every developer should learn category theory smack of the same
arguments that have been made about Fuzzy logic and why fuzzy math should be
taught in elementary school. I personally like and use fuzzy logic for
programming but wide spread adoption of fuzzy logic never took hold. From what
I've read of Category Theory, Fuzzy Logic seems to have a better argument as a
programming shift because Fuzzy is a lot less abstract. Just start with a
bunch of if statements that approximate the math.

~~~
theoh
Fuzzy logic is good for fuzzy things. Dealing with nature, in the widest sense
of the term.

Category theory is good for making extremely watertight conceptual arguments
for discrete properties being preserved under transformations: it's "general
abstract nonsense", yes (a famous characterization of the subject) but it
really does elucidate the underlying structures in common across a lot of
different mathematical settings.

If there's something wrong with the computational flavour of category theory,
it's probably that it lacks fuzziness and is too much part of the
linguistic/logical picture of the world. Giuseppe Longo, a category theorist,
has a paper about this:
[http://www.di.ens.fr/users/longo/files/PhilosophyAndCognitio...](http://www.di.ens.fr/users/longo/files/PhilosophyAndCognition/CritiqCompReason-
engl.pdf)

~~~
mybrid
Thanks! for the paper reference!

------
mrkgnao
It might be interesting to see what mathematicians-in-the-wild think about
_higher_ category theory, which is viewed in a somewhat similar way by people
who don't work in certain fields.[0]

[http://mathoverflow.net/questions/169187/what-non-
categorica...](http://mathoverflow.net/questions/169187/what-non-categorical-
applications-are-there-of-homotopical-algebra)

I suspect the reasons are broadly analogous. To paraphrase a quote of
Atiyah's, the usefulness of theory is that once a field is complex enough, a
little bit of it can serve to provide "organizing principles" (quoting Qiaochu
Yuan from the MO post above) that help both learners (who can exploit
similarities in different fields so that unfamilar things feel less alien) and
experts (for whom many things are made easier, or even possible, by working at
higher levels of abstraction[1]).

Knowledge just keeps piling up, and abstraction is one way of increasing the
"density" of information one takes in so that one doesn't have to spend one's
whole life trying to learn enough to work -- or, in the researcher's case,
getting to the frontiers of current knowledge.

[0]: Roughly, my understanding of it is that it's what happens when you don't
require properties like associativity, but say that (ab)c should be
"deformable" into a(bc) in some way. Complications arise, interesting stuff
happens. The usual.

[1]: Akin to the birds of Freeman Dyson's "birds and frogs".

[http://www.math.columbia.edu/~woit/wordpress/?p=1506](http://www.math.columbia.edu/~woit/wordpress/?p=1506)

------
socmag
My manager dropped a bomb on me about 20 years ago as a young engineer and had
me be a liaison with some of the people doing research on the Pi calculus.

Still somewhat shaken to this day by that very first meeting, it really didn't
go that well.

I really don't grok the math behind it and it is very nice to see this pop up,
and Bartosz definitely knows his stuff. I'll give it another whirl. Hats off
to him for trying to make it approachable.

Also Brian Beckman and others have often had interesting things to say in
these areas.

[http://rebcabin.github.io/blog/2013/03/17/category-theory-
re...](http://rebcabin.github.io/blog/2013/03/17/category-theory-reveals-
value-of-autoiconicity/)

These days I understand the formal math behind it even less than I used to,
which is to say abysmally; however it did teach me some things about how to
think about composition that have subconsciously been influential I think over
the years.

Nice post.

------
danidiaz
The accompanying YouTube playing list is good as well:
[https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbm...](https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbmEnaH_LTkxLI7FMa2HsnawM_)
[https://www.youtube.com/watch?v=3XTQSx1A3x8&list=PLbgaMIhjbm...](https://www.youtube.com/watch?v=3XTQSx1A3x8&list=PLbgaMIhjbmElia1eCEZNvsVscFef9m0dm)

------
moondistance
If you have FP experience and are interested in practical applications of
category theory, I encourage you to reach out:
[https://news.ycombinator.com/item?id=14025110](https://news.ycombinator.com/item?id=14025110)
\- we're hiring mathematicians and computer scientists.

~~~
hherman2
Hi. I'm a junior in college studying Math + CS and with Haskell experience.
Are you looking for interns?

~~~
moondistance
Not this summer, but thanks for checking!

------
imode
if you squint, it all looks like state machines!

~~~
ghostc0der
State machines aren't even Turing complete. Even if they where, that doesn't
mean we should be using them to program Von Neumann machines. Building levels
of abstraction just helps you get more work done. Otherwise you might as well
go back working in a tarpit
([https://en.wikipedia.org/wiki/Turing_tarpit](https://en.wikipedia.org/wiki/Turing_tarpit)).

------
semigroup
What research is being done in functional programming/category theory in the
academic world? This interest me quite a bit.

~~~
hackermailman
Categories of cubicle sets/Cubical Type Theory
[http://dlicata.web.wesleyan.edu/pubs.html](http://dlicata.web.wesleyan.edu/pubs.html)

------
ruleabidinguser
Can anyone point to any concrete benefits theyve gained from learning Category
Theory? I've used Haskell and I see _some_ value from that (mostly in getting
more comfortable with functions and typings I suppose), but not sure if I
should spend any time on Category Theory.

~~~
hath995
The way I see it is, just as in Object Oriented design patterns, category
theory are the design patterns of functional programming. It just so happens
that the mathematicians got there first and gave everything greek names.

~~~
hath995
I recall this guys blog, he seems a bit boastful, but it seems like a decent
response to this question.

[http://logicaltypes.blogspot.com/2015/08/pure-functional-
pro...](http://logicaltypes.blogspot.com/2015/08/pure-functional-programming-
claims-irl.html)

~~~
fapjacks
Jeez. Whatever he's got to say, I couldn't see past the mountainous ego to get
to it.

