Archive Collection: Defensive Programming

I'm on vacation! I'll be back soon, but until then enjoy today's curated collection of articles from the archive. Today's topic: Defensive Programming.

Archive Collection: Defensive Programming

I've been writing a daily article here since September 1, 2020; that's over 800 articles.  I haven't missed a day yet, and that includes Christmas and Easter.  Well, I'm taking my first family vacation since I started writing this blog.  Our only other family vacation (which predates the blog) was a National Lampoon's-style disaster.  I hope this one is going better.

I'm writing this in the present tense, but I'm writing it for future publication with links to past articles.  Let's hope the time-space continuum holds up.

In any case, as the slacker Firstie says to the Stony Lonesome Gate guard twenty minutes before Taps, let me get to the Point.  I've got a daily publishing streak to keep up.  But I don't want to be writing and publishing articles on vacation.  And I still want to provide you with something of value to read each day.  So I settled on creating a series of curated article lists that I think you'll find beneficial.

I'm hoping at least some of these articles are ones you haven't read before.  And if you're so obsessed with me that you have read all my articles, I'm hoping that they'll keep you busy enough that you don't come looking for me and my family 😳.  


Defensive Programming

Defensive Programming
Don’t build digital Maginot Lines. Program your defenses in depth.
A Safe Way to Add Temporary Code
A quick tip to ensure your temporary code disappears when the sun sets.
The RecordsAffected Property is a Powerful Tool for Defensive Programming
As developers, we need to constantly be thinking about how to handle unknown unknowns. The RecordsAffected property helps us do that.
5 Ways to Reduce Logic Errors Using Automated Double-Checks
Identify the critical functions in your application. Then, apply one or more of these techniques to ensure that if they break, someone will notice.
5 Tips for Making Changes on Live SQL Server Databases
Making database changes on production? These 5 tips will make one of the most dangerous programming activities a little bit safer.
The “Unset” Enum Item
This simple technique is a foolproof way to avoid the sort of logic bug that can live undetected in your codebase for years.
Distributing One-Time Data “Hot Fixes”
Rolling out changes to *production data* when you don’t have direct access to that data can be tricky. This tip makes the process easier.

For more articles on defensive programming, check out my Defensive Programming tag page.

All original code samples by Mike Wolfe are licensed under CC BY 4.0