oliverdavies.uk/content/node.3faefe1b-3c1d-47e6-93d5-dbdd17f2e4fe.yml

89 lines
4.9 KiB
YAML

uuid:
- value: 3faefe1b-3c1d-47e6-93d5-dbdd17f2e4fe
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:51+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: |
Doing the simplest possible thing
created:
- value: '2022-11-24T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:51+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2022/11/24/doing-the-simplest-possible-thing
langcode: en
body:
- value: |
<p>I spent most of today working on some code I wrote for the first phase of a client project a few months ago.</p>
<p>The previous version used hard-coded data within a Vue.js application, which was sufficient for the previous criteria and in line with the lean approach we decided to take.</p>
<p>It was the simplest thing that worked.</p>
<p>A new requirement means that the hard-coded data no longer works, so I need to refactor and enhance the code to work with different configurations. I have a proof of concept of this working using JSON from an API endpoint, but I would also like to use a static JSON file when needed for local development.</p>
<p>I experimented with a few different ways to approach this before asking myself, "What's the simplest possible thing I can do to get this working?".</p>
<p>I already knew that I needed to make a change to the structure of the data, which I was able to do quickly with the hard-coded data that I already had, and whilst a static JSON file would be a nice-to-have, I could quickly move the hard-coded data into the API endpoint that I'd already created and continue building on my proof of concept.</p>
<p>The idea of "What's the simplest thing?" is something that I use regularly.</p>
<p>When teaching or coaching test-driven development, I want to write the smallest failing test and then find the quickest and simplest way to get it to pass - even if it means returning a hard-coded value for now.</p>
<p>When working on development tasks, I like to break things down as much as possible and find the smallest thing I can do, commit, and push. This gets the ball rolling, and then I repeat the process.</p>
<p>Even when writing an email or blog post, once I start writing, it's much easier to continue once I'm in the flow.</p>
<p>Taking the simplest approach and not making assumptions about future requirements or scope means less and more maintainable code, as well as being a productivity hack.</p>
format: full_html
processed: |
<p>I spent most of today working on some code I wrote for the first phase of a client project a few months ago.</p>
<p>The previous version used hard-coded data within a Vue.js application, which was sufficient for the previous criteria and in line with the lean approach we decided to take.</p>
<p>It was the simplest thing that worked.</p>
<p>A new requirement means that the hard-coded data no longer works, so I need to refactor and enhance the code to work with different configurations. I have a proof of concept of this working using JSON from an API endpoint, but I would also like to use a static JSON file when needed for local development.</p>
<p>I experimented with a few different ways to approach this before asking myself, "What's the simplest possible thing I can do to get this working?".</p>
<p>I already knew that I needed to make a change to the structure of the data, which I was able to do quickly with the hard-coded data that I already had, and whilst a static JSON file would be a nice-to-have, I could quickly move the hard-coded data into the API endpoint that I'd already created and continue building on my proof of concept.</p>
<p>The idea of "What's the simplest thing?" is something that I use regularly.</p>
<p>When teaching or coaching test-driven development, I want to write the smallest failing test and then find the quickest and simplest way to get it to pass - even if it means returning a hard-coded value for now.</p>
<p>When working on development tasks, I like to break things down as much as possible and find the smallest thing I can do, commit, and push. This gets the ball rolling, and then I repeat the process.</p>
<p>Even when writing an email or blog post, once I start writing, it's much easier to continue once I'm in the flow.</p>
<p>Taking the simplest approach and not making assumptions about future requirements or scope means less and more maintainable code, as well as being a productivity hack.</p>
summary: null
field_daily_email_cta: { }