74 lines
2.5 KiB
YAML
74 lines
2.5 KiB
YAML
|
uuid:
|
||
|
- value: d33e4704-c07e-421e-8227-f3f74e9f57ff
|
||
|
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:32+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: |
|
||
|
How much refactoring should I be doing?
|
||
|
created:
|
||
|
- value: '2023-09-17T00:00:00+00:00'
|
||
|
changed:
|
||
|
- value: '2025-05-11T09:00:32+00:00'
|
||
|
promote:
|
||
|
- value: false
|
||
|
sticky:
|
||
|
- value: false
|
||
|
default_langcode:
|
||
|
- value: true
|
||
|
revision_translation_affected:
|
||
|
- value: true
|
||
|
path:
|
||
|
- alias: /daily/2023/09/17/how-much-refactoring-should-i-be-doing
|
||
|
langcode: en
|
||
|
body:
|
||
|
- value: |
|
||
|
<p>I watched a webinar recently, and one of the panellists asked, "How much refactoring should I be doing?".</p>
|
||
|
|
||
|
<p>The reply was, "More than you're doing now.".</p>
|
||
|
|
||
|
<p>It was quite tongue-in-cheek, but I agree that, in general, code isn't refactored enough.</p>
|
||
|
|
||
|
<p>One main reason is a fear of introducing regressions, and to avoid that, you need a good automated test suite.</p>
|
||
|
|
||
|
<p>If you break the existing functionality whilst refactoring, you want the test suite to fail so you can identify and fix the regression.</p>
|
||
|
|
||
|
<p>If the test suite passes, you can release the new code.</p>
|
||
|
|
||
|
<p>How many tests and how much coverage do you need? There's no specfic answer - enough for you to be confident everything still works.</p>
|
||
|
|
||
|
|
||
|
format: full_html
|
||
|
processed: |
|
||
|
<p>I watched a webinar recently, and one of the panellists asked, "How much refactoring should I be doing?".</p>
|
||
|
|
||
|
<p>The reply was, "More than you're doing now.".</p>
|
||
|
|
||
|
<p>It was quite tongue-in-cheek, but I agree that, in general, code isn't refactored enough.</p>
|
||
|
|
||
|
<p>One main reason is a fear of introducing regressions, and to avoid that, you need a good automated test suite.</p>
|
||
|
|
||
|
<p>If you break the existing functionality whilst refactoring, you want the test suite to fail so you can identify and fix the regression.</p>
|
||
|
|
||
|
<p>If the test suite passes, you can release the new code.</p>
|
||
|
|
||
|
<p>How many tests and how much coverage do you need? There's no specfic answer - enough for you to be confident everything still works.</p>
|
||
|
|
||
|
|
||
|
summary: null
|
||
|
field_daily_email_cta: { }
|