27. CUPID: A Software Love Story with Dan North

Retro Time // A Software Podcast - A podcast by Derek Seibert & Jeremy Miller

Categories:

You probably know Dan North as the father of Behavior Driven Development. But if you aren’t following twitter too closely, you may not know that Dan created quite a stir with his rebuttal of the SOLID principles back in 2017. Since then, he’s thought about a different approach using a similarly clever acronym, CUPID. We were fortunate enough to get a sneak peek into CUPID and discuss some of the ideas with Dan.Dan has spent a lot of time looking not just at his own code, but other people’s code too. One thing he’s noticed is that the best code is the code that is a joy to look at and work with. The best code takes other developers into account when writing their code. They design it so that it’s easy to follow and logical to work on. Dan’s CUPID consists of five properties of software that make software joyful to work with. CUPID stands for Composable, UNIX Philosophy, Predictable, Idiomatic, and Domain-based. Composable: Can I use this software with other software? Does my code play well with other developer’s code? Does my code require dependencies that might break another developer’s code?UNIX Philosophy: Each thing should do one thing well. But don’t over-engineer it and do that one thing too much. Know when to stop.Predictable: Our code should be predictable in what it does and how it does it. The chances are good that someone else will need to look at your code one day. Keep in mind we’re writing software for other people to come back and read later. Your code should be predictable, readable, and organized in a way that makes reading your code completely obvious.Idiomatic: Familiar tools are easier to use. How does the rest of the team do it? Does it make sense to challenge these standards? Were decisions made for a reason? Before we have opinions on changing what is there, we need to find out why the team does something the way they do. As Sam Newman says “it’s better to have things be consistently wrong than inconsistently anything.”Domain Based: Domain is about language– design or written language. The code itself is domain-based, meaning we use the terms that relate to the domain of the app. Make the domain language ubiquitous in the codebase. Additionally, we should structure the code by domain. Keep the code organized so that it makes sense based on what the app does. Topics• 03:25 – Dan is triggered• 08:22 – Hello CUPID• 12:37 – Centered vs bounded communities• 16:39 – Composable• 20:49 – UNIX philosophy• 24:34 – Predictable• 29:53 – Idiomatic• 35:43 – Domain Based• 49:33 – It’s everyone’s responsibilityHelpful Links• Dan North & Associates• The CUPID Back Story• The SOLID principles• Why Every Element of SOLID is WrongAbout Dan NorthDan is the originator of Behaviour-Driven Development, an agile approach to software development that encourages teams to deliver the software that matters by emphasising the interactions between stakeholders. He also proposed Deliberate Discovery, which challenges assumptions around software planning and estimation.

Visit the podcast's native language site