81 lines
3.2 KiB
YAML
81 lines
3.2 KiB
YAML
|
uuid:
|
||
|
- value: c8d78160-4a98-441c-a707-c1fde53f9044
|
||
|
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:16+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: 'Write programs that do one thing and do it well'
|
||
|
created:
|
||
|
- value: '2024-03-23T00:00:00+00:00'
|
||
|
changed:
|
||
|
- value: '2025-05-11T09:00:16+00:00'
|
||
|
promote:
|
||
|
- value: false
|
||
|
sticky:
|
||
|
- value: false
|
||
|
default_langcode:
|
||
|
- value: true
|
||
|
revision_translation_affected:
|
||
|
- value: true
|
||
|
path:
|
||
|
- alias: /daily/2024/03/23/write-programs-that-do-one-thing-and-do-it-well
|
||
|
langcode: en
|
||
|
body:
|
||
|
- value: |
|
||
|
<p>Over the last few days, I've written about watchers and running commands such as automated tests when files are changed.</p>
|
||
|
|
||
|
<p>Some tools have this built in, whilst others don't.</p>
|
||
|
|
||
|
<p>I've used different tools to do this and recently switched to <code>entr</code>.</p>
|
||
|
|
||
|
<p>The previous one wasn't showing me the output from running Drupal automated tests, which <code>entr</code> does.</p>
|
||
|
|
||
|
<p>I also like that it follows the UNIX philosophy of doing one thing well and working well with other programs.</p>
|
||
|
|
||
|
<p>For example, to run my automated tests when I change a file, I need to run <code>find web/modules/custom | entr ./run test</code>.</p>
|
||
|
|
||
|
<p><code>entr</code> isn't concerned with how to find the list of files to watch - only what to do with them.</p>
|
||
|
|
||
|
<p>To get the list of files, I use the <code>find</code> command and provide the files to <code>entr</code>.</p>
|
||
|
|
||
|
<p>I also like to do this with my application code. I like to write small modules and libraries with clear boundaries and responsibilities, do their tasks well, and work well with other parts of the application.</p>
|
||
|
|
||
|
|
||
|
format: full_html
|
||
|
processed: |
|
||
|
<p>Over the last few days, I've written about watchers and running commands such as automated tests when files are changed.</p>
|
||
|
|
||
|
<p>Some tools have this built in, whilst others don't.</p>
|
||
|
|
||
|
<p>I've used different tools to do this and recently switched to <code>entr</code>.</p>
|
||
|
|
||
|
<p>The previous one wasn't showing me the output from running Drupal automated tests, which <code>entr</code> does.</p>
|
||
|
|
||
|
<p>I also like that it follows the UNIX philosophy of doing one thing well and working well with other programs.</p>
|
||
|
|
||
|
<p>For example, to run my automated tests when I change a file, I need to run <code>find web/modules/custom | entr ./run test</code>.</p>
|
||
|
|
||
|
<p><code>entr</code> isn't concerned with how to find the list of files to watch - only what to do with them.</p>
|
||
|
|
||
|
<p>To get the list of files, I use the <code>find</code> command and provide the files to <code>entr</code>.</p>
|
||
|
|
||
|
<p>I also like to do this with my application code. I like to write small modules and libraries with clear boundaries and responsibilities, do their tasks well, and work well with other parts of the application.</p>
|
||
|
|
||
|
|
||
|
summary: null
|
||
|
field_daily_email_cta: { }
|