Move daily emails into the blog page
This commit is contained in:
parent
be69398931
commit
1b8441608f
828 changed files with 9 additions and 196 deletions
25
source/_posts/2024-08-16.md
Normal file
25
source/_posts/2024-08-16.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
title: What are err, req and res?
|
||||
date: 2024-08-16
|
||||
permalink: daily/2024/08/16/what-are-err--req-and-res
|
||||
tags:
|
||||
- software-development
|
||||
- clean-code
|
||||
cta: ~
|
||||
snippet: |
|
||||
What are err, req and res?
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
During the day, we looked at some example documentation that included variable names like `err`, `req`, and `res`.
|
||||
|
||||
I don't like short variable names like this.
|
||||
|
||||
I'd suggest calling them what they are - `error`, `request` and `response`.
|
||||
|
||||
This makes the code clearer and easier to read and understand, particularly if you aren't using types and need additional context.
|
||||
|
||||
Readability is important as [people read more code than they write][0].
|
||||
|
||||
[0]: {{site.url}}/daily/2024/08/07/people-read-more-code-than-they-write
|
Loading…
Add table
Add a link
Reference in a new issue