Breaking down

I just came across this talk on category theory by Eugenia Cheng. I thought the whole thing was pretty great, but I particulary liked this impromptu remark about the nature of mathematics:

A lot of maths is about how we can take individual objects and build them into new ones that are a bit more interesting. The converse of that is that if we can then understand big ones, relative to small ones, and break them down into small ones, then we don’t have to do as much work. Because then all we have to do is understand some small objects and building processes. And then we can understand anything. That’s how all of maths works. That’s why we like understanding prime factorisation, so that we can just understand prime numbers and then build them into big numbers. And why we like breaking topological spaces into small pieces and then building them all up out of circles and disks. And why we like expressing all groups as fundamental finite ones and then seeing how we can build everything else with that. It’s so that we don’t ever have to deal with complicated things. We can just think about simple ones and building processes.

It reminds me of what Rich Hickey said about design:

So what do I mean when I say good design? I think one of the most interesting things about design is that, you know, people think it’s generating this intricate plan. But designing is not that. Designing is fundamentally about taking things apart. It’s about taking things apart in such a way that they can be put back together. If that makes sense. So separating things into things that can be composed. That’s what design is. Right? If you just make this intricate thing, you really haven’t designed in a way that needs to support the things that designs need to support. Like change. Every component of a design should be kind of about one or very few things. That’s sort of the nature of it, breaking things down until they are nearly atomic. And only then do you take those things that you have broken apart and compose them to solve the problem you set out to solve. But the first job is to take things apart in such a way that you can do that. And a good design process is iterative. This isn’t a grand plan you do once and then you go and finish.

Perhaps software design isn’t as far from category theory as Hickey seems to think!

Breaking down

2 thoughts on “Breaking down

  1. That’s right, I think with the difference between engineering and mathematics being captured in this phrase of Hickey’s “…breaking things down until they are nearly atomic.” Engineering always can (and must) decide when to stop breaking things down. In mathematics, you go down to the very bottom. If you don’t, you have no foundation for building back up.

    In engineering, there’s a trade off — the more you break things down, the more composability and flexibility you have, however, it also implies more effort to assemble and understand. The trade-off balances the needs for near term correctness and future flexibility with your ability to deliver in a timely manner and find individuals who can maintain at the given levels of abstraction.

    I’ve found it doesn’t take too many plies of deconstruction before the abstractions become pretty meaningless and cumbersome for humans to understand. Each ply also delivers diminishing benefit on a practical, engineering front.

    Do you see a similar trade-off or is it always worth chasing things to the very bottom for engineering?

    Thanks for the post!

  2. Interesting, yes! I think we do choose to stop breaking things down at some point because it ceases to be useful. It’s kind of the dual to Cheng’s comments about when to stop abstracting out. I guess there are diminishing returns in both directions!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s