Add daily email for 2024-09-20
Be consistent
This commit is contained in:
parent
7be26febec
commit
69498d6c86
24
source/_daily_emails/2024-09-20.md
Normal file
24
source/_daily_emails/2024-09-20.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: Be consistent
|
||||
date: 2024-09-20
|
||||
permalink: daily/2024/09/20/be-consistent
|
||||
tags:
|
||||
- software-development
|
||||
cta: ~
|
||||
snippet: |
|
||||
However you write code, be consistent.
|
||||
---
|
||||
|
||||
Whether you [prefer strict code or not][0], [use snake-case or camel-case for variable names][1] or [how you write your test methods][2], it is important to be consistent in how code is written.
|
||||
|
||||
If you're working in a file that uses snake-case variable names, you should do the same and follow the same conventions.
|
||||
|
||||
When reading a file, everything should be consistent and seem like it was written by the same person following the same approaches.
|
||||
|
||||
Otherwise, when you need to add to or refactor this code in the future, it will be harder to do so.
|
||||
|
||||
Consistency is key.
|
||||
|
||||
[0]: {{site.url}}/daily/2024/09/19/the-two-ways-of-writing-php-code
|
||||
[1]: {{site.url}}/archive/2023/04/19/camel-case-or-snake-case-for-drupal-code
|
||||
[2]: {{site.url}}/archive/2022/11/14/camel-case-or-snake-case-for-test-methods
|
Loading…
Reference in a new issue