oliverdavies.uk/content/node.da62317b-2539-43bd-8db0-94bddb14174e.json
2025-05-11 20:02:14 +01:00

100 lines
No EOL
4.1 KiB
JSON

{
"uuid": [
{
"value": "da62317b-2539-43bd-8db0-94bddb14174e"
}
],
"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:01+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": "Having less code than you started with"
}
],
"created": [
{
"value": "2025-02-07T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-05-11T09:00:01+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2025\/02\/07\/less",
"langcode": "en"
}
],
"body": [
{
"value": "\n <p>When running commands like <code>git log<\/code> or viewing pull requests, you can see the number of lines that have been added, edited or removed.<\/p>\n\n<p>When adding new features, it's likely you'll be adding code.<\/p>\n\n<p>If you're refactoring code, you may have less code than before.<\/p>\n\n<p>I like commits like this.<\/p>\n\n<p>It's not true that having fewer lines of code means the code is better, but having less code makes it easier to maintain and more secure.<\/p>\n\n<p>You don't need to upgrade and maintain code that you aren't using, so why not remove it?<\/p>\n\n<p>Why have old TODO comments, <code>dd()<\/code>, <code>var_dump()<\/code> or <code>console.log()<\/code> functions in the code?<\/p>\n\n<p>If they're not used, they can be removed.<\/p>\n\n<p>I recently read a post that suggested there were 5 to 10 bugs in each 1,000 lines of production code as a general rule, so the less code there is, the fewer places there are for bugs to hide.<\/p>\n\n<p>In general, for production code, less is more.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>When running commands like <code>git log<\/code> or viewing pull requests, you can see the number of lines that have been added, edited or removed.<\/p>\n\n<p>When adding new features, it's likely you'll be adding code.<\/p>\n\n<p>If you're refactoring code, you may have less code than before.<\/p>\n\n<p>I like commits like this.<\/p>\n\n<p>It's not true that having fewer lines of code means the code is better, but having less code makes it easier to maintain and more secure.<\/p>\n\n<p>You don't need to upgrade and maintain code that you aren't using, so why not remove it?<\/p>\n\n<p>Why have old TODO comments, <code>dd()<\/code>, <code>var_dump()<\/code> or <code>console.log()<\/code> functions in the code?<\/p>\n\n<p>If they're not used, they can be removed.<\/p>\n\n<p>I recently read a post that suggested there were 5 to 10 bugs in each 1,000 lines of production code as a general rule, so the less code there is, the fewer places there are for bugs to hide.<\/p>\n\n<p>In general, for production code, less is more.<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "2025-05-11T09:00:01+00:00",
"guid": null,
"hash": "4050be034c1d59312fb930c3290468db",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}