Bisect the Problem Space

A binary search can be the fastest way to isolate an issue's cause.

Product Support often needs to diagnose problems in complex systems with many parts. If an issue comes in that’s similar to ones you’ve seen before, you might have a good idea where to look first, but if a brand-new one comes in on an unfamiliar system, it may not be clear how to get started. In these cases, your instinct might be to test every link in the chain in sequence from the beginning - but the quickest way to isolate the cause is to do a binary search.

Suppose for example there’s a button on a web page. Clicking this button executes JavaScript code that makes an AJAX request to a REST API on a cloud server which triggers a service to perform some database operations, builds some JSON based on the result, and serves the JSON back to the client web browser which then executes more JavaScript to display the information on the page.

If the customer clicks the button and nothing happens, what’s breaking? The fault could be anywhere in the chain: the problem space is large. But you can quickly shrink it by starting in the middle.

Check the server logs to see if the database operations were successfully performed. If they were, then you know that everything up until that point was working and something after it failed. If they weren’t, then you know that something before that point failed. Either way, your problem space has shrunk considerably after just one test. Repeatedly bisect the remaining problem space and determine which half is still a problem, and you’ll soon zero in on the cause.