uuid: - value: f2008694-9d04-4952-b40b-ae2fd880d9fe 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:34+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: | Types vs tests created: - value: '2023-08-18T00:00:00+00:00' changed: - value: '2025-05-11T09:00:34+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2023/08/18/types-vs-tests langcode: en body: - value: |
Today, I saw a Twitter poll - "Poll: Imagine your team has to build a project with either types or tests. You can't have both.".
The results were:
I was surprised by this.
If I can't add type declarations (type hints) or return types, I can still write tests to check what happens when different types are used.
I can also perform checks and throw errors or Exceptions if something isn't what I'd expect.
I use types heavily, but I'd be more confident that my application would work if I had tests and that's the main objective when writing code for myself or clients and for my clients' customers.
format: full_html processed: |Today, I saw a Twitter poll - "Poll: Imagine your team has to build a project with either types or tests. You can't have both.".
The results were:
I was surprised by this.
If I can't add type declarations (type hints) or return types, I can still write tests to check what happens when different types are used.
I can also perform checks and throw errors or Exceptions if something isn't what I'd expect.
I use types heavily, but I'd be more confident that my application would work if I had tests and that's the main objective when writing code for myself or clients and for my clients' customers.
summary: null field_daily_email_cta: { }