uuid: - value: 141f3c86-ae34-430f-9cba-d1278047fe0d 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:36+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: | YAGNI created: - value: '2023-08-06T00:00:00+00:00' changed: - value: '2025-05-11T09:00:36+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2023/08/06/yagni langcode: en body: - value: |

During a recent coding dojo session, we spoke about YAGNI - i.e. "You aren't going to need it".

In this situation, we discussed how many numbers we should support passing to a method in a calculator application.

There's no technical limit to how many numbers we can pass, but there may be a requirement where we only need to add or subtract two numbers. In that case, we don't need to calculate three or more numbers, so there's no benefit or value to writing that code.

If we follow YAGNI, we only write the code we need now. If the requirement changes in the future, we revisit the code and change it as required.

format: full_html processed: |

During a recent coding dojo session, we spoke about YAGNI - i.e. "You aren't going to need it".

In this situation, we discussed how many numbers we should support passing to a method in a calculator application.

There's no technical limit to how many numbers we can pass, but there may be a requirement where we only need to add or subtract two numbers. In that case, we don't need to calculate three or more numbers, so there's no benefit or value to writing that code.

If we follow YAGNI, we only write the code we need now. If the requirement changes in the future, we revisit the code and change it as required.

summary: null field_daily_email_cta: { }