From 1ef6df5289432e33b7c68747a57271399b650583 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 8 Aug 2023 22:50:09 +0100 Subject: [PATCH] daily-email: add 2023-08-06 YAGNI --- src/content/daily-email/2023-08-06.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/content/daily-email/2023-08-06.md diff --git a/src/content/daily-email/2023-08-06.md b/src/content/daily-email/2023-08-06.md new file mode 100644 index 00000000..78d00133 --- /dev/null +++ b/src/content/daily-email/2023-08-06.md @@ -0,0 +1,16 @@ +--- +title: > + YAGNI +pubDate: 2023-08-06 +permalink: > + archive/2023/08/06/yagni +tags: [] +--- + +During a recent coding dojo session, we spoke about YAGNI - i.e. "You aren't going to need it". + +In this situation, we discussed how many numbers we should support passing to a method in a calculator application. + +There's no technical limit to how many numbers we can pass, but there may be a requirement where we only need to add or subtract two numbers. In that case, we don't need to calculate three or more numbers, so there's no benefit or value to writing that code. + +If we follow YAGNI, we only write the code we need now. If the requirement changes in the future, we revisit the code and change it as required.