_Preface: While I generally prefer shorter examples, these are functional pieces that actually do something. I'm using them instead of contrived examples because they are small enough to digest quickly and provide a good code reading exercise._
I'm working on a tool to pull videos from NASA's Images site](https://images.nasa.gov) via their [API. The initial step is to grab search query results to identify collections of videos. Each result page is a JSON object confined to a certain number of items. Pagination URLs point to follow up pages if necessary.
Going through the pagination and getting the results is straight forward. You just pull one page and look to see if a 'next' URL exists. If it does, you use it to grab the next page. Otherwise, you're done.
In the past, I would have just thrown together a quick script like this one to do the pulls.
It was easy enough to put together the first version of the code without the tests, but would have been a lost opportunity. Doing tests on small projects is like a musician doing scales, a baseball player going to the batting cage, or any of a thousand other examples of people practicing their craft. Its honing the skill. Getting the muscle memory and the timing. It's all comes down to one thing.
The way we practice is the way we play.