Hacker News new | ask | show | jobs
by l__l 1184 days ago
So I come at this from a mathematical background --- graduate student in categorical algebra --- but I've done a couple years of SWE work, so I'm not unsympathetic to this point of view. The way I see it, when you want to reason about things like data processing (which is what a massive chunk of writing software is, moving data from form A to form B), category theory provides what is in some sense the "correct" language/framework in which to think. It's not just an abstraction circle-jerk, it's a genuinely useful perspective, particularly for guiding your mind to spot non-obvious connections between pieces of code.

The problem as I view it is that CT is first and foremost a discipline of maths. It was developed to help mathematicians, is very sophisticated, and very specialised; learning CT for SWE is taking a sledgehammer to a nut. I can't honestly recommend it as a field of study to someone who isn't interested in the problems it was developed to solve. If you don't have a solid grounding in set theory, logic, algebra, topology, etc., it's a very tough field to motivate. The vast majority of CT is of little to no relevance for SWE work. Adjunctions, for example, are absolutely fundamental to all of maths, but in truth are not really relevant for SWEs. As a result, you see people trying to teach concepts like monads without reference to them; this is slightly insane from where I'm standing...

Your question about whether there are things CT does that other branches didn't already do; one of the fundamental utilities of CT in pure mathematics is "making trivial things trivially trivial". That is to say, it makes it very clear which parts of your problem are local to your specific situation, and which are purely "structural" from the categorical constraints. The SWE analogy would be separating business logic from other layers. So at least for mathematicians, it absolutely does have novel utility, and has drawn links between a huge number of disparate studies that were not well-understood previously.

So if you _do_ care about posets and groups and cohomology theories, CT will genuinely open your eyes, and (albeit, this coming from someone with less working experience than yourself) it could give you a deeper, or at least different understanding of the code you're writing. Otherwise, I'm not sure it's worth putting yourself through it, tbqh.

(If you do decide to give it another go, please use a better resource than the linked post; after a quick scan it looks pretty weak)

2 comments

I think this is a good perspective - it follows the general approach in software engineering that if you're going to introduce something with a massively different approach, learning curve, and cost of adoption, it needs to come with the associated real-world benefits.

For most software stuff it would be very hard the benefit of introducing this stuff vs. what the standard paradigms that everyone already knows

Agree. If you care about abstract mathematics that is useful for developing practical software then don’t waste your time with CT.