uuid: - value: 5e37f5e3-8ada-4d61-925d-5033258e441f 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:02+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: "Don't make assumptions" created: - value: '2025-01-08T00:00:00+00:00' changed: - value: '2025-05-11T09:00:02+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2025/01/08/don-t-make-assumptions langcode: en body: - value: |
I was recently writing code for a project and found myself making assumptions about what I was writing.
I was creating my own requirements.
Something no-one asked for.
I was assuming a value was always going to be a certain number of digits long.
I was writing code that verified this was true or throw an Exception.
Until I found out that that one of the values wasn't the same length as the others.
This could be an error in the data or it could correct.
No-one told me the lengths were always going to be the same.
So why was I checking it?
Why was I adding bugs to the code?
I've reverted the code that checks the length of the value and gone to find clarification.
If it's an issue, it'll be fixed in the source data.
If the lengths should all be the same, I'll potentially re-add the check.
Until I'm sure, I'll only write what's needed to deliver the feature and stop adding my own requirements and assumptions.
format: full_html processed: |I was recently writing code for a project and found myself making assumptions about what I was writing.
I was creating my own requirements.
Something no-one asked for.
I was assuming a value was always going to be a certain number of digits long.
I was writing code that verified this was true or throw an Exception.
Until I found out that that one of the values wasn't the same length as the others.
This could be an error in the data or it could correct.
No-one told me the lengths were always going to be the same.
So why was I checking it?
Why was I adding bugs to the code?
I've reverted the code that checks the length of the value and gone to find clarification.
If it's an issue, it'll be fixed in the source data.
If the lengths should all be the same, I'll potentially re-add the check.
Until I'm sure, I'll only write what's needed to deliver the feature and stop adding my own requirements and assumptions.
summary: null field_daily_email_cta: { }