Recently, I spent a fair bit of time explaining assertions to an apprentice on my team. While he could understand how assertions work, he struggled to grasp the motives for using them. Indeed, it is arguable that defensive coding in the form of guard conditions and exception handling makes assertions redundant. But there is a …