What is Nostr?
GeePawHill /
npub1gvq…dvmp
2024-09-10 02:59:33

GeePawHill on Nostr: Pro-Tip: If something interesting in the code can't be tested cheaply where it is ...

Pro-Tip: If something interesting in the code can't be tested cheaply where it is now, move it somewhere it *can* be tested cheaply, and delegate from its original location to there.

This is called the Steering Premise. "Tests and testability are first-class participants in design."

This is an answer to the ubiquitous "what if it's private?" question: "move it somewhere it's public." And the also common "what if it's in the endpoint handler?": "Move it to a transport-agnostic class."
Author Public Key
npub1gvq4v7a0yt8dqdyy7la0z8d7qvyuc020mwlfl4eykc5ue2q7zpqsfwdvmp