From 59e7809438ab783c7494cbaf94f512bbbb7504da Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Jun 2024 01:02:15 +0100 Subject: [PATCH] Add daily email for 2024-06-03 Writing comments first --- source/_daily_emails/2024-06-03.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 source/_daily_emails/2024-06-03.md diff --git a/source/_daily_emails/2024-06-03.md b/source/_daily_emails/2024-06-03.md new file mode 100644 index 000000000..498878c5a --- /dev/null +++ b/source/_daily_emails/2024-06-03.md @@ -0,0 +1,20 @@ +--- +title: Writing comments first +date: 2024-06-03 +permalink: daily/2024/06/03/writing-comments-first +tags: + - software-development +cta: d7eol +snippet: | + Why I usually start by writing my code comments before my code. +--- + +Something I often do before writing new code is to write out what it needs to do, either in a README file or as code comments. + +It could be paragraphs of text explaining the problem I'm solving, or a short checklist of what the code needs to do. + +This clarifies the situation and the approach and allows uncovering any potential questions or issues. + +It takes time, but I can complete the task quicker as I've made the decisions and answered any questions upfront. + +I'll either remove the comments as I write the code or, if they still add value, I'll keep them to add more context and information.