Please Stop Using Booleans.

Should we be using booleans? Yes, but a lot less then you think... Thank you Embrace for sponsoring! Check them out at: https://soydev.link/embrace SOURCE https://ntietz.com/blog/that-boolean-should-probably-be-something-else/ Want to sponsor a video? Learn more here: https://soydev.link/sponsor-me Check out my Twitch, Twitter, Discord more at https://t3.gg S/O Ph4se0n3 for the awesome edit 🙏

Channel: Theo - t3․ggGenerated by anonymousDuration: 20mPublished Aug 27, 2025
Thumbnail for Please Stop Using Booleans. ▶ Watch on YouTube

Video Chapters

Original Output

0:00 The Boolean Enigma: To be or not to be a good choice?
2:33 Unveiling the "Boolean Controversy": Why your simple true/false might be misleading.
3:10 Time for a Change: Discovering why datetimes often surpass booleans.
4:20 Avoiding Data Nightmares: The "split-brain" problem lurking in your booleans.
6:18 Beyond True/False: Mastering Enums for complex states and roles.
8:15 Building Robust Systems: Combining states and timestamps for ultimate data integrity.
12:00 The Unsung Heroes: Why `created_at` and `updated_at` timestamps are non-negotiable.
13:25 Permissions Power-Up: Why logic, not booleans, should drive your access control.
15:52 The Boolean Sweet Spot: Uncovering the rare instances when true/false shines.
18:35 The Deceptive Nature of Booleans: Unmasking their hidden complexity.

Timestamps by StampBot 🤖

Unprocessed Timestamp Content

0:00 Booleans: To like or not to like, that is the question
0:06 Exploring why booleans might not be your best friend in coding
0:55 Sponsor: Embrace - giving you superpowers to understand your users
2:33 Diving into the controversial article: That boolean should be something else
3:10 Why datetimes are often a better choice than a simple boolean
4:20 The dreaded "split brain" data problem caused by redundant booleans
5:29 The superior alternative: storing datetimes instead of just true/false
6:18 Unpacking enums as a powerful solution for complex states and roles
7:19 Avoiding the "multiple boolean" mess with clear status definitions
8:15 Structuring status with states and timestamps for better data integrity
9:00 Visualizing data architecture: how clean design leads to derived insights
11:08 Database Normalization: the unsung hero of sane data structures
12:00 Why every table needs created_at and updated_at timestamps always
13:25 Permissions are logic, not data: Stop storing them as booleans
14:23 Databases store data, permissions aren't data, they're pure logic
15:52 When *should* we use a boolean? The rare, justified use cases
17:07 Breaking down complex conditional logic into readable helper functions
18:35 Booleans are sneaky: they feel like data but often hide complex logic
19:31 The data is usually something different underneath; don't couple data
20:27 Final thoughts: an absolutely one-out-of-one article on booleans

Timestamps by StampBot 🤖