oliverdavies.uk/content/node.b5e6b353-30b6-42d7-a8f1-ed202131a6f6.yml

68 lines
2.5 KiB
YAML

uuid:
- value: b5e6b353-30b6-42d7-a8f1-ed202131a6f6
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:08+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: 'What are err, req and res?'
created:
- value: '2024-08-16T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:08+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2024/08/16/what-are-err--req-and-res
langcode: en
body:
- value: |
<p>Today, I was at another School of Code hackathon event, mentoring a team of three Developers as they planned and built an application within a day.</p>
<p>During the day, we looked at some example documentation that included variable names like <code>err</code>, <code>req</code>, and <code>res</code>.</p>
<p>I don't like short variable names like this.</p>
<p>I'd suggest calling them what they are - <code>error</code>, <code>request</code> and <code>response</code>.</p>
<p>This makes the code clearer and easier to read and understand, particularly if you aren't using types and need additional context.</p>
<p>Readability is important as <a href="/daily/2024/08/07/people-read-more-code-than-they-write">people read more code than they write</a>.</p>
format: full_html
processed: |
<p>Today, I was at another School of Code hackathon event, mentoring a team of three Developers as they planned and built an application within a day.</p>
<p>During the day, we looked at some example documentation that included variable names like <code>err</code>, <code>req</code>, and <code>res</code>.</p>
<p>I don't like short variable names like this.</p>
<p>I'd suggest calling them what they are - <code>error</code>, <code>request</code> and <code>response</code>.</p>
<p>This makes the code clearer and easier to read and understand, particularly if you aren't using types and need additional context.</p>
<p>Readability is important as <a href="http://default/daily/2024/08/07/people-read-more-code-than-they-write">people read more code than they write</a>.</p>
summary: null
field_daily_email_cta: { }