normative

Assert only what cannot be true, not what you hope

The correct discipline for assertions is to assert only things you know cannot be true (so that any trigger is definitively a bug), not things you merely hope are true; assertions should be added organically as you build each function — encoding assumptions like a pointer never being null — and developers who avoid them out of fear of triggering them are making a mistake because a triggered assert is doing you a favor.

normativepending

Speaker

Dave Plummer

Evidence Quote

“I assert things that I know cannot be true, and I think that’s really the intent of an assertion.”

Source

Dave Plummer— Lex Fridman Podcast
Created: 6/13/2026, 12:28:59 AM

Your notes

Loading notes...