Bisecting is a method most commonly used to find regressions in source control history.
Say you find that today's version has some broken functionaliy, but you know it worked with last week's version. You can provide those ranges to your source control tool and have it help you find the version that first introduced the problem by binary search.
If you can automate the check, you can make this go even faster, but tools will often support a manual flow (handy for difficult tests or stuff that you just haven't automated yet).
Building up scripts over time that can build and test things that can easily be tweaked and put to this purpose is often a good time investment.
Source control tools have good support for this, but sometimes you want to find the first app distribution that did something with a list of download URLs, or you're looking through a package repository.
I was thinking about this over Thanksgiving and decided to code for fun for a bit.
The result of that was mybisect, a little Python function to do the bisecting, that can be driven from a plain text file and a shell command, or put to use in a broader script.
I also took the opportunity to learn a bit more about Python hygiene, and to comment that the public/free GitHub support for actions is pretty darn nice - the defaults and templates did most of the work for me in setting that up.
Happy bisecting!
Tags: python