in

Design Pressure: The Invisible Hand That Shapes Your Code

Design Pressure: The Invisible Hand That Shapes Your Code

16 May 2025

22 May 2025

Ever had this weird gut feeling that something is off in your code, but couldn’t put the finger on why? Are you starting your projects with the best intentions, following all best practices, and still feel like your architecture turns weird eventually?

So far, I’ve held it at PyCon US 2025 in Pittsburgh, USA.

Slides on SpeakerDeck.

Design Pressure: The Invisible Hand That Shapes Your Code(Sorry for the literal throat-cleaning in the video – I lost my voice the night
before and worked on fumes and Fisherman’s Friends.)

Additional materialSome of the material was referred to directly in the talk but landed on the cutting floor due to time constraints.

They all are highly recommended reading/watching for the topic of software design writ large, though.

ArticlesTypes of Coupling by Ben OrensteinAttractive nuisances in software design by Paul GanssleDesigning with types: Making illegal states unrepresentable by Scott WlaschinThe Vietnam of Computer Science by Ted Neward (spoiler: it’s ORMs)A summary by Jeff Atwood (Coding Horror)Many of the cited problems are solvable in modern ORMs, however the underlying tension of conflicting goals remains.Approximating Sum Types in Python with Pydantic by William WoodruffHow I Build by Adam MontgomeryDTOs & Mapping: The Good, the Bad, and the Excessive by Derek ComartinAn example of a conscious decision process on when to map data and reinforcing my point that it’s a trade-off.The Typestate Pattern in Rust
by Cliff L. BiffleThis is about Rust, but the concept applies the same to any other language.Writing Python like it’s Rust by Jakub BeránekSpeaking of Rust! There is a new style of Python that emerged over the past years and I’m all-in.What Color is Your Function? by Bob NystromThis article argues against async primitives in languages because it causes you to have two different types of functions that behave differently. I don’t fully agree, but I find it interesting to apply this logic to classes.

Arguably, ORM classes and, to a much lesser degree, Pydantic classes, behave very differently than regular classes. Especially, because setting attributes implies I/O which complicates reasoning.

In other words, you have to be aware what kind (color!) of class you’re dealing with when reading code.

Amundsen’s MaximRemember, when designing your Web API, your data model is not your object model is not your resource model is not your message model.

VideosIntegrated Tests Are A Scam by J.B. RainsbergerThe Deep Synergy Between Testability and Good Design by Michael FeathersSOLID Principles? Nope, just Coupling and Cohesion by Derek ComartinThe Rising Sea by Matthew DruryAdvent of CodeŁukasz Langa’s PyCon US 2022 KeynoteSimple Made Easy by Rich HickeyWatch it before you call anything “simple” ever again.Building Protocol Libraries The Right Way by Cory BenfieldIntroducing Sans I/O, which is a very related topic about writing I/O-agnostic network protocol libraries.Functional Core Imperative Shell by Gary BernhardtWhat Gary calls Core, is business logic.Moving IO to the Edges of Your App: Functional Core, Imperative Shell by Scott WlaschinBuilds on Gary’s talk by misspelling his name and giving more concrete examples.Domain Modeling Made Functional by Scott WlaschinAlso available as a book.BooksTidy First? by Kent BeckVery short and very good.Architecture Patterns With Python by Harry Percival and Bob GregoryI will recommend this book in every talk until I die.Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric EvansThis is a thicc, dense book that brings the whole domain modeling topic to its logical conclusion. It’s a great read for advanced developers, the DDD community feels sometimes a tad cultish, though.Colophon & creditsPostcard to IrelandTheodor FontaneScreenshot from 1923. Totally fair use; please don’t sue me.Get your Simpsons GIFs from Frinkiac“No Fate” GIF from
Giphy which they pirated from the best SciFi movie ever.Would you like me to give a talk at your conference or company?
Get in touch!

This post was made possible by the donations from people and corporations who appreciate my public work.

Want more content like this? Here’s my free, low-volume, non-creepy Hynek Did Something newsletter!
It allows me to share my content directly with you and add extra context:

Hynek SchlawackCode Bohemian in ❤️ with Python 🐍, Go 🐹, and DevOps 🔧.
Blogger 📝,
speaker 📢,
YouTuber 📺,
PSF fellow 🏆,
substance over flash 🧠.

Is my content helpful and/or enjoyable to you?
Please consider supporting me!
Every bit helps to motivate me in creating more.

What do you think?

Newbie

Written by Buzzapp Master

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

    Nigeria’s Kirikiri Prison Officers Move Convicted Inmate To Process Passport, Visa In Lagos

    Nigeria’s Kirikiri Prison Officers Move Convicted Inmate To Process Passport, Visa In Lagos

    ‘Strange metals’ point to a whole new way to understand electricity