Hynek Schlawack on Nostr: Things I’ve been thinking about a lot lately: - code design pressure (good: ...
Things I’ve been thinking about a lot lately:
- code design pressure (good: testability, bad: coupling business code with validation and/or storage – interestingly there’s been a #PyCascades talk about just that, framed using an obscure German mathematician)
- type state pattern, or: why I don't use state machines. This has nothing to do with static types but a continuation of “make illegal state unrepresentable”. Practically, this means that you’ll rarely see an `| None` in my class fields.
Published at
2024-04-09 16:50:43Event JSON
{
"id": "28620c4a7810ed9982fe82add7952d6cf8b335d45a5f1455bcfec2f6f7ecbcb8",
"pubkey": "d753d0d5fc6e5fd39b41e33be5d5dd22de4090d64b4acbea83ffe4631d84f043",
"created_at": 1712681443,
"kind": 1,
"tags": [
[
"t",
"pycascades"
],
[
"proxy",
"https://mastodon.social/users/hynek/statuses/112242291084349875",
"activitypub"
]
],
"content": "Things I’ve been thinking about a lot lately:\n\n- code design pressure (good: testability, bad: coupling business code with validation and/or storage – interestingly there’s been a #PyCascades talk about just that, framed using an obscure German mathematician)\n\n- type state pattern, or: why I don't use state machines. This has nothing to do with static types but a continuation of “make illegal state unrepresentable”. Practically, this means that you’ll rarely see an `| None` in my class fields.",
"sig": "3b61313608f1dde5bc81737666f0b9380309efa359b290dda86eb61fe711a0cecb4e6f7232731cbdfd543117f8d9d71c8384772faf12f04bb76e532aef90e464"
}