Log in

goodpods headphones icon

To access all our features

Open the Goodpods app
Close icon
Dead Code - All Models Are Wrong (with James Gayfer)

All Models Are Wrong (with James Gayfer)

03/11/25 • 26 min

Dead Code

In this episode of Dead Code, Jared interviews James Gayfer about data modeling and the challenges of structuring databases effectively. James, who prefers raw SQL over ORMs, explains how many database models merely mirror table structures, leading to inefficient APIs and excessive data fetching. He discusses the concept of complete versus incomplete data models, emphasizing that completeness depends on an application’s needs at a given time. They explore trade-offs between overly simplistic models that require frequent queries and overly complex ones that attempt to replicate real-world relationships in unnecessary detail. James advocates for designing domain models thoughtfully, using patterns like repositories to maintain consistency while keeping data retrieval manageable. Ultimately, he encourages developers to embrace iteration, rethink their models as needed, and accept that all models are wrong, but some are useful.


Links:


James Gayfer’s Blog

James Gayfer’s Mastodon profile

SQLx library for Rust

Repository Pattern

Hanami Framework

Phoenix Framework

Ecto

Hotwire

All models are wrong, but some are useful


Dead Code Podcast Links:


Mastodon

X


Jared’s Links:


Mastodon

X

twitch.tv/jardonamron

Jared’s Newsletter & Website


Episode Transcript


Hosted on Acast. See acast.com/privacy for more information.

plus icon
bookmark

In this episode of Dead Code, Jared interviews James Gayfer about data modeling and the challenges of structuring databases effectively. James, who prefers raw SQL over ORMs, explains how many database models merely mirror table structures, leading to inefficient APIs and excessive data fetching. He discusses the concept of complete versus incomplete data models, emphasizing that completeness depends on an application’s needs at a given time. They explore trade-offs between overly simplistic models that require frequent queries and overly complex ones that attempt to replicate real-world relationships in unnecessary detail. James advocates for designing domain models thoughtfully, using patterns like repositories to maintain consistency while keeping data retrieval manageable. Ultimately, he encourages developers to embrace iteration, rethink their models as needed, and accept that all models are wrong, but some are useful.


Links:


James Gayfer’s Blog

James Gayfer’s Mastodon profile

SQLx library for Rust

Repository Pattern

Hanami Framework

Phoenix Framework

Ecto

Hotwire

All models are wrong, but some are useful


Dead Code Podcast Links:


Mastodon

X


Jared’s Links:


Mastodon

X

twitch.tv/jardonamron

Jared’s Newsletter & Website


Episode Transcript


Hosted on Acast. See acast.com/privacy for more information.

Previous Episode

undefined - Permadeath (with Roguelike Radio)

Permadeath (with Roguelike Radio)

In this episode of Dead Code, Jared explores the world of roguelike game development with guests Mark R. Johnson and Darren Grey from Roguelike Radio, discussing the history, appeal, and technical challenges of the genre. They dive into the upcoming Seven-Day Roguelike Challenge, where developers create a game in a week, emphasizing the importance of procedural generation, permadeath, and strategic mastery. The conversation covers how roguelikes have evolved from classic ASCII-based dungeon crawlers to modern iterations like FTL and The Binding of Isaac, attracting both players and programmers due to their complexity and emergent gameplay. Darren and Mark share advice for aspiring developers, urging them to keep their projects small and focused while embracing the creative possibilities of procedural content.


Links:


Seven-Day Roguelike Challenge (7DRL) on itch.io

Roguelike Radio Podcast

Roguelike Dev Community on Reddit

Roguelikes Community on Reddit

Mark R. Johnson’s Game (Ultima Ratio Regum)

Mark R. Johnson’s Twitter (X)

Mark R. Johnson’s Bluesky

Darren Grey’s Bluesky


Dead Code Podcast Links:


Mastodon

X


Jared’s Links:


Mastodon

X

twitch.tv/jardonamron

Jared’s Newsletter & Website


Episode Transcript


Hosted on Acast. See acast.com/privacy for more information.

Next Episode

undefined - Ordinary Corrupt Memory Love (with Jean Boussier (byroot))

Ordinary Corrupt Memory Love (with Jean Boussier (byroot))

In this episode of Dead Code, host Jared Norman speaks with Jean Boussier, a key contributor to the Ruby community and Shopify engineer, about the challenges of concurrency in Ruby, particularly the Global VM Lock (GVL). Jean explains that while the GVL was originally implemented to simplify Ruby’s design, it now limits parallel execution, sparking debate on whether it should be removed. He argues that many Ruby applications are more CPU-bound than previously thought and suggests improving Ruby’s thread scheduler as a more practical short-term solution rather than eliminating the GVL entirely. The discussion also explores Ractors, Ruby’s experimental approach to parallelism, which remains unstable and impractical for most applications. Jean envisions a future where Ractors become more viable, gradually leading to broader concurrency improvements. The episode wraps up with insights on profiling tools and the evolving landscape of Ruby performance optimization.


Links:


Jean Boussier’s Blog

Jean’s GitHub

Ivo Anjo’s GVL Profiling Talk (RubyConf)

Ivo Anjo’s GVL Profiling Tool

Jean’s Blog Post: “So, You Want to Remove the GVL?”

Jean’s Blog Post: “The Mythical IO-Bound Rails App”

Ruby Ractors Documentation


Dead Code Podcast Links:


Mastodon

X


Jared’s Links:


Mastodon

X

twitch.tv/jardonamron

Jared’s Newsletter & Website


Episode Transcript


Hosted on Acast. See acast.com/privacy for more information.

Episode Comments

Generate a badge

Get a badge for your website that links back to this episode

Select type & size
Open dropdown icon
share badge image

<a href="https://goodpods.com/podcasts/dead-code-543080/all-models-are-wrong-with-james-gayfer-87168453"> <img src="https://storage.googleapis.com/goodpods-images-bucket/badges/generic-badge-1.svg" alt="listen to all models are wrong (with james gayfer) on goodpods" style="width: 225px" /> </a>

Copy