All Models Are Wrong (with James Gayfer) - podcast episode cover

All Models Are Wrong (with James Gayfer)

Mar 11, 202526 minEp. 32
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

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.

For the best experience, listen in Metacast app for iOS or Android