Category: Clean code
Checked exceptions
Checked exceptions propagate similar to error values. However, they’re more disliked than error values. Find out why in this post.
How to use error values in an exception-based language
If you’re using error values, you probably want to avoid exceptions. But, how do you do that if you’re using an exception-based language?
Look before you leap vs easier to ask for forgiveness rather than permission
Conditionals vs try / catch. A long-standing debate in programming is LBYL vs EAFP. Which should you use and why?
Clean code & programming principles
The entrypoint article for clean code. We cover many essential topics such as programming principles, error handling, naming and much more.
Errors & error handling
The entrypoint article for error handling. We cover everything from how to respond to errors, to error catching best practices, and much more.
Control flow for invalid actions – Conditionals, try/catch and Booleans
An important part of clean code is handling control flow. In this article, we’ll examine actions that may fail and need a check first.
Nulls and null checks – How to work safely with nulls in any codebase
Nulls and null checks have been a tricky problem in programming for decades. Thankfully, there are many solutions to make them easier to work with.
Defensive & offensive programming
Defensive programming helps with uptime and reliability. Offensive programming helps you find bugs. They’re both extremely useful in software.
Exceptions vs error values
Exceptions vs error values has been a debate in error handling for decades. In this article we’ll examine the pros and cons of each.
Best practices for error catching and handling
When catching and handling errors, you need to keep some best practices in mind. Some are essential for correct programs.
Error recording – How to record errors in your application to debug later
When errors occur in production, you want to know about it. You need some way of recording them, so you can view them and debug them later.