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.”
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.
Validate inputs, add assertions.
Themes
Mood
Type
When to use this quote
- API design
- unit testing
- code reviews
Key Concepts
Questions to Reflect On
- How can you differentiate internal vs external failures?
- What safeguards prevent user crashes?
User input errors still need graceful handling.