{ "uuid": [ { "value": "1b73b0cd-a0e3-443a-bc6a-edfcbc8d5481" } ], "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": "Documentation and comments get stale. Tests don't.\n" } ], "created": [ { "value": "2023-09-22T00: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\/22\/documentation-and-comments-get-stale", "langcode": "en" } ], "body": [ { "value": "\n

I'm sure you've seen code comments that say the code will do something when, in fact, it does something different.<\/p>\n\n

Or documentation that has become outdated and stale and no longer correct.<\/p>\n\n

Automated tests and other tools, such as static analysis, are executable documentation, so they can't become stale.<\/p>\n\n

If the implementation code changes and no longer matches the tests, the tests will fail, and either the implementation or test can be updated.<\/p>\n\n

Then, if you need to refer to the test, as long as it's passing, you know what it shows is still applicable.<\/p>\n\n

The same can't be said for markdown files, Confluence pages, Word documents or other static documentation.<\/p>\n\n ", "format": "full_html", "processed": "\n

I'm sure you've seen code comments that say the code will do something when, in fact, it does something different.<\/p>\n\n

Or documentation that has become outdated and stale and no longer correct.<\/p>\n\n

Automated tests and other tools, such as static analysis, are executable documentation, so they can't become stale.<\/p>\n\n

If the implementation code changes and no longer matches the tests, the tests will fail, and either the implementation or test can be updated.<\/p>\n\n

Then, if you need to refer to the test, as long as it's passing, you know what it shows is still applicable.<\/p>\n\n

The same can't be said for markdown files, Confluence pages, Word documents or other static documentation.<\/p>\n\n ", "summary": null } ] }