The Pragmatic Programmer - How to use Exceptions

Topics covered
Popular Clips
Episode Highlights
Coding Plans
In the realm of software development, planning and structuring code deliberately is crucial to avoid randomness and inconsistency. Alan Underwood emphasizes the importance of understanding the code you write, rather than making assumptions, whether you're working with Kotlin or any other language 1. He suggests that developers should "take the time to code from a plan," highlighting that while it may seem like common sense, it is often overlooked. Michael Outlaw and Joe Zack add their perspectives, with Joe humorously admitting, "I have like eight different plans and they all conflict and I start with one and end up with another" 1.
Coding Plans
Documentation plays a crucial role in maintaining code clarity and supporting deliberate programming. Michael Outlaw emphasizes the importance of documenting assumptions, noting that if something seems off, it should be clearly noted to avoid future issues 2. Alan Underwood agrees, stating that even if code appears to work, it might not be functioning correctly and could fail if the underlying assumptions change 2. Joe Zack adds a practical tip: "If you put in tickets, say, like, hey, this only works for positive transactions, then no one can get mad at you" 2.
Programming by Coincidence
Programming by coincidence can lead developers into a false sense of security, ultimately causing unexpected failures. Alan Underwood warns against relying on implicit assumptions, which can become major sticking points if not addressed 2. He advises programmers to "not assume something, prove it," emphasizing the importance of verifying assumptions to prevent future issues. Joe Zack adds that adhering to erroneous code can lead to failures when the original code is corrected, highlighting the need for constant vigilance and readiness to refactor 2.
Related Episodes


The Pragmatic Programmer - How to Build Pragmatic Teams
Answers 383 questionsThe Pragmatic Programmer - How to Estimate
Answers 383 questions

Errors vs Exceptions, Reddit Rebels, and the 2023 StackOverflow Survey
Answers 383 questionsThe Pragmatic Programmer - How to Generate Code
Answers 383 questionsHow to be a Programmer
Answers 383 questions

The Pragmatic Programmer - How to Debug
Answers 383 questionsThe Pragmatic Programmer - The Evils of Duplication
Answers 383 questionsHow to be an Advanced Programmer
Answers 383 questionsHow to be an Intermediate Programmer
Answers 383 questions

Ktor, Logging Ideas, and Plugin Safety
Answers 383 questions

The Pragmatic Programmer - Tracer Bullets and Prototyping
Answers 383 questions

Clean Code - How to Write Classes the Right Way
Answers 383 questionsClean Code - How to Write Amazing Functions
Answers 383 questions

Software Design Anti-patterns
Answers 383 questions

Clean Code - How to Build Maintainable Systems
Answers 383 questions
