83 lines
2.5 KiB
YAML
83 lines
2.5 KiB
YAML
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: |
|
|
<p>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.".</p>
|
|
|
|
<p>The results were:</p>
|
|
|
|
<ul>
|
|
<li>Types - 50.9%</li>
|
|
<li>Tests - 49.1%</li>
|
|
</ul>
|
|
|
|
<p>I was surprised by this.</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>I can also perform checks and throw errors or Exceptions if something isn't what I'd expect.</p>
|
|
|
|
<h2 id="here%27s-the-thing">Here's the thing</h2>
|
|
|
|
<p>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.</p>
|
|
|
|
|
|
format: full_html
|
|
processed: |
|
|
<p>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.".</p>
|
|
|
|
<p>The results were:</p>
|
|
|
|
<ul>
|
|
<li>Types - 50.9%</li>
|
|
<li>Tests - 49.1%</li>
|
|
</ul>
|
|
|
|
<p>I was surprised by this.</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>I can also perform checks and throw errors or Exceptions if something isn't what I'd expect.</p>
|
|
|
|
<h2 id="here%27s-the-thing">Here's the thing</h2>
|
|
|
|
<p>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.</p>
|
|
|
|
|
|
summary: null
|
|
field_daily_email_cta: { }
|