oliverdavies.uk/content/node.4a1294d7-248e-48f8-bfae-b49bbe1d19b4.json

100 lines
3.8 KiB
JSON
Raw Normal View History

2025-04-16 23:34:31 +01:00
{
"uuid": [
{
2025-05-11 09:40:11 +01:00
"value": "4a1294d7-248e-48f8-bfae-b49bbe1d19b4"
2025-04-16 23:34:31 +01:00
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
2025-05-11 09:40:11 +01:00
"value": "2025-05-11T09:00:02+00:00"
2025-04-16 23:34:31 +01: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": "Comments can lie. Code can't."
}
],
"created": [
{
"value": "2025-01-17T00:00:00+00:00"
}
],
"changed": [
{
2025-05-11 09:40:11 +01:00
"value": "2025-05-11T09:00:02+00:00"
2025-04-16 23:34:31 +01:00
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2025\/01\/17\/lies",
2025-04-29 14:30:51 +01:00
"langcode": "en"
2025-04-16 23:34:31 +01:00
}
],
"body": [
{
"value": "\n <p>How often have you need code like this?<\/p>\n\n<pre><code class=\"php\">\/\/ Returns true.\nreturn false;\n<\/code><\/pre>\n\n<p>Whilst a comment like this could have been true when it was written, the code can change independently of the comment - making them out of sync and the comment no longer true.<\/p>\n\n<p>As the comment is not evaluated or executed, there isn't a way to validate whether it's still correct, so whilst it could be, it may not be.<\/p>\n\n<p>Comments should describe why the code is needed, not what it does.<\/p>\n\n<p>If a comment describes the functionality, it can be refactored and extracted to a class, method or function - a.k.a. self-documenting code.<\/p>\n\n<p>But, if you want something that will alert you if the functionality changes, look into <a href=\"/atdc\">automated testing<\/a>.<\/p>\n\n<p>If you have a passing test that suddenly starts to fail, you know the behaviour has changed.<\/p>\n\n ",
2025-04-16 23:34:31 +01:00
"format": "full_html",
"processed": "\n <p>How often have you need code like this?<\/p>\n\n<pre><code class=\"php\">\/\/ Returns true.\nreturn false;\n<\/code><\/pre>\n\n<p>Whilst a comment like this could have been true when it was written, the code can change independently of the comment - making them out of sync and the comment no longer true.<\/p>\n\n<p>As the comment is not evaluated or executed, there isn't a way to validate whether it's still correct, so whilst it could be, it may not be.<\/p>\n\n<p>Comments should describe why the code is needed, not what it does.<\/p>\n\n<p>If a comment describes the functionality, it can be refactored and extracted to a class, method or function - a.k.a. self-documenting code.<\/p>\n\n<p>But, if you want something that will alert you if the functionality changes, look into <a href=\"/atdc\">automated testing<\/a>.<\/p>\n\n<p>If you have a passing test that suddenly starts to fail, you know the behaviour has changed.<\/p>\n\n ",
2025-04-16 23:34:31 +01:00
"summary": null
}
],
"feeds_item": [
{
2025-05-14 00:09:16 +01:00
"imported": "1970-01-01T00:33:45+00:00",
2025-04-16 23:34:31 +01:00
"guid": null,
2025-04-21 02:34:46 +01:00
"hash": "39666fa6935e0010996ee0d41ac7462b",
2025-04-16 23:34:31 +01:00
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}