All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Why You Should Never Disable Asserts in Production

By

May 31, 2026 • 14 min read • by Loris Cro

10h ago· 14 min readenOpinion

Summary

The article argues that disabling asserts in production is a harmful practice, contrary to common belief. It explores how asserts serve as critical documentation and runtime checks that enforce program invariants, and disabling them removes safety nets that catch bugs early. The author uses Zig's std.debug.assert as a starting point but generalizes the argument to software engineering best practices, emphasizing that asserts should remain enabled in production to maintain code reliability and developer confidence.

Key quotes

· 4 pulled
Fear is the killer of the mind ...and the codebase as well.
I think 'disabling asserts in prod' is a pretty common technique, yeah?
As far as I know that is probably a correct statement, but I believe it to be an irredeemably bad practice.
An assert is a line of code that introduces a new fact to the program, such as 'this argument can never be null', or 'this integer can never be even'.
Snippet from the RSS feed
Fear is the killer of the mind ...and the codebase as well.

You might also wanna read