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."
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."