TDD Pro-Tip: Suspect Sentinel Returns

TDD Pro-Tip: I suspect sentinel returns, and though I still use them, it’s generally because I haven’t found the right formulation yet. I’m working on the TSD project today, and I’ve got a nasty little chunk of code I wish weren’t nasty. (It’s in this file, and of course, you’re welcome to grab the whole repo, which will enable you to really make fun of me.) You don’t have to look at the code, I’m not going into it, but …

TDD Pro-Tip: Suspect Sentinel Returns Go to Post »

TSD #2: Short Session, Long Notes

TSD Development: First short TDD session pushed. I said I’d start yesterday, but instead I played a computer game most of the day. https://github.com/GeePawHill/tsd This was short and sweet, so there’s just three simple points of interest, one noticed infrastructure problem, then I’ll move on to the next part. POI #1: This was textbook TDD, as most toy problems are. Think of a test, write a test, fail a test, pass a test, design it all. No shockers or embarrassing …

TSD #2: Short Session, Long Notes Go to Post »

TSD #1: Early Thoughts, Tests, Code

TSD Development: The first thing to do is make a thing that accepts key-value pair assignments to make a tree. Since kotlin readily supports map-like assignments, the first minor-leage case looks like this: output["key"] = "value" That resembles a map, by design, but it isn’t one. Later cases will elaborate this, but the secret sauce is two-fold, consisting of a sequencing concept and a nesting concept. Sequencing: the order in which keys are assigned values is preserved. Think in terms …

TSD #1: Early Thoughts, Tests, Code Go to Post »

Scroll to Top