Skip to content

Code Quote by Brad Fitzpatrick

“My basic rule is, if it could possibly come from the end user, it's not a run-time crash. But if it is my code to my code, I crash it as hard as possible—fail as early as possible.” quote by Brad Fitzpatrick
Download Open image
“My basic rule is, if it could possibly come from the end user, it's not a run-time crash. But if it is my code to my code, I crash it as hard as possible—fail as early as possible.”

Brad Fitzpatrick

About This Quote

Source Talk: Programming Podcast, 2015

Design code to fail fast when internal assumptions break, but avoid crashes caused by user input.

In simple terms: Fail early on internal bugs, protect users from crashes.

Key Takeaway

Validate inputs, add assertions.

Themes

reliability defensive programming software quality

Mood

cautious pragmatic

Type

technical advice

When to use this quote

  • API design
  • unit testing
  • code reviews

Key Concepts

fail-fast assertions error handling

Questions to Reflect On

  • How can you differentiate internal vs external failures?
  • What safeguards prevent user crashes?
A Different Perspective

User input errors still need graceful handling.

4.8 out of 5 (6 ratings)

More Code quotes

Browse all 1,561 Code quotes