From 7914911db5dcc51478669b117aac1d3530cfa8e6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 4 Jul 2023 00:30:47 +0100 Subject: [PATCH] daily-email: add 2023-06-26 Is any code without tests legacy code? --- src/content/daily-email/2023-06-26.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/content/daily-email/2023-06-26.md diff --git a/src/content/daily-email/2023-06-26.md b/src/content/daily-email/2023-06-26.md new file mode 100644 index 000000000..a0b03c9a9 --- /dev/null +++ b/src/content/daily-email/2023-06-26.md @@ -0,0 +1,17 @@ +--- +title: > + Is any code without tests legacy code? +pubDate: 2023-06-26 +permalink: > + archive/2023/06/26/is-any-code-without-tests-legacy +tags: + - automated-testing +--- + +While I can't find the original quote, I've heard numerous people describe any code without automated tests as legacy. + +Legacy code is typically inherited from other Developers and is riskier to work on and harder to change, as there is no guarantee changing one piece of code won't cause breakages elsewhere in the codebase. + +This is true for code that doesn't have accompanying automated tests, regardless of when it was written. + +I can release a feature to an environment, and although it may be checked and tested at the time, it likely won't be again for every subsequent release. Automated tests can run automatically for every commit and before every deployment, ensuring the code continues to work and for it to be edited without causing regressions.