Sveriges mest populära poddar

Functional Design in Clojure

Ep 093: Waffle Cakes

14 min • 5 oktober 2023

Each week, we discuss a different topic about Clojure and functional programming.

If you have a question or topic you'd like us to discuss, tweet @clojuredesign, send an email to [email protected], or join the #clojuredesign-podcast channel on the Clojurians Slack.

This week, the topic is: "effective composition." We search for that sweet spot between full-featured mixes and simple ingredients when crafting your software recipes.

Our discussion includes:

  • What makes code "composable"? What makes it "not composable"?
  • What baking has in common with software design.
  • What baking does not have in common with software design.
  • Are you using ingredients or a box mix?
  • How to know when you need to split something apart.
  • When is a part too big? When is a part too small?
  • What is too flexible?
  • The principle of orthogonality.
  • Decomposing without the smell.

Selected quotes:

  • "This is a Clojure podcast. We have to have a definition every once in a while."
  • "When you try to take code that someone has made and combine it with other things, how much resistance, how much difficulty, do you begin to encounter?"
  • "A cake is a composition of smaller things."
  • "You're still composing a cake. You're just composing it out of bigger things."
  • "Let's compose dinner together."
  • "You might be fighting against some of the ingredients, because you have a whole lot of stuff that's been premixed that comes along for the ride."
  • "What if you want waffles?"
  • "Everything is made of atoms! If I could assemble atoms, I have ultimate flexibility!"
  • "If it's narrowly focused, it's hard for it to get in the way of other things."
  • "You're making well-suited things, that have small scopes of responsibility, so that you can weave them together appropriately for your domain."
  • "Who owns the recipe?"
  • "Ah yes, you are the cause and the solution of the problem!"
  • "Are you able to write a new recipe and reuse all the ingredients?"

Links:

Förekommer på
00:00 -00:00