← Back to context

Comment by calmingsolitude

6 hours ago

When I read the first sentence, I expected the author to use `git bisect`.

However, what the author seems to have done is used a prompt with claude that probably looked something like this:

"Some piece of code is causing the page to load very slowly. To debug this, I'd like to use binary search, where we keep commenting/uncommenting 50% of the remaining code, and then I manually check if the page is still very slow. Let's start now; Comment out a component (or parts of a component) that you estimate is 50% of the page, and I will tell you if the page is still slow."

`git bisect` is interesting option. I haven't heard about it before. Thanks for info. Still learning something ;)

I'm old school. I used to do "manual bisection" on git history by just `git checkout <commit_id>` until I find first introducing bug commit.

Then another "bisection" on commit changes until minimal change found.

Deterministic bugs are quite "fine". For me personally worst are randomly occurring bugs in specific conditions for eg. some race conditions.