Lea Verou on Nostr: And today I had a realization: The primary benefit of TDD is not that it produces ...
And today I had a realization: The primary benefit of TDD is not that it produces better implementations, but that it produces better APIs. It forces engineers to do just that, since they have to *use* the APIs they are designing to write tests.
It's not the same as thinking about use cases directly, since unit tests are more contrived. But it's certainly better than plunging into implementation.
Published at
2024-03-27 14:26:21Event JSON
{
"id": "d663f22f708cc8b990dddc2df9dc6347261b31c7dd0bac51bd28abaaf1391e27",
"pubkey": "deb27057e60b8d796302849309a7c542aa1c718108be4813086deaf9139dff76",
"created_at": 1711549581,
"kind": 1,
"tags": [
[
"e",
"ea67ff7f2cc42b1e7018ba82a634429c8fa6155e4a9c8ed25879c6ed275328ce",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://front-end.social/users/leaverou/statuses/112168113356355985",
"activitypub"
]
],
"content": "And today I had a realization: The primary benefit of TDD is not that it produces better implementations, but that it produces better APIs. It forces engineers to do just that, since they have to *use* the APIs they are designing to write tests.\n\nIt's not the same as thinking about use cases directly, since unit tests are more contrived. But it's certainly better than plunging into implementation.",
"sig": "ef17fb006b2802fc459e10879aa9fe9c95aff3cdd3498aae827a9a02f5df9fb26a3aaf0c562ab57b7086778db4896145bd09c8c6301aef7d198261606467b36e"
}