From 10bc45561e6b9fd20c9b440ea1202de29c360900 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 24 Dec 2023 23:41:55 +0000 Subject: [PATCH] Add daily email for 2023-12-24 This should never happen --- src/content/daily-email/2023-12-24.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/content/daily-email/2023-12-24.md diff --git a/src/content/daily-email/2023-12-24.md b/src/content/daily-email/2023-12-24.md new file mode 100644 index 00000000..b8d951e7 --- /dev/null +++ b/src/content/daily-email/2023-12-24.md @@ -0,0 +1,20 @@ +--- +title: > + This should never happen +pubDate: 2023-12-24 +permalink: > + archive/2023/12/24/this-should-never-happen +tags: + - software-development + - clean-code +--- + +How often do you see comments like "This should never happen" in a software codebase? + +If that's true, why is it there? + +If it truly should never happen, the additional code only adds more noise and distracts from the code that is run. + +You can add a test that checks a method isn't called, but what value does this offer? + +If it doesn't happen or some code isn't run, remove it and keep it as simple, clean and easy to understand as possible.