Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can think of only a couple of cases over 20+ years where I had to bisect the commit history to find a bug. By far the normal case is that I can isolate it to a function or a query or a class pretty quickly. But most of my experience is with projects where I know the code quite well.


I think your last sentence is the key point - the times I've used bisect have been related to code I didn't really know, and where the knowledgeable person was not with the company more or on holiday.


Exactly. And even if I do know the source pretty well, that doesn't mean I'm caught up on all the new changes coming in. It's often a lot faster to bisect than to read the log over the month or two since I touched something.


Even so, normally anything like a crash or fatal error is going to give you a log message somewhere with a stack dump that will indicate generally where the error happened if not the exact line of code.

For more subtle bugs, where there's no hard error but something isn't doing the right thing, yes bisect might be more helpful especially if there is a known old version where the thing works, and somewhere between that and the current version it was broken.


Or they were barking up a wrong tree and didn’t know it yet, and the rest of us were doing parallel discovery.

Tick tock. You need competence in depth when you have SLIs.


> By far the normal case is that I can isolate it to a function or a query or a class pretty quickly

In general, this takes human-interactive time. Maybe not much, but generally more interactive time than is required to write the bisect test script and invoke `git bisect run ...`

The fact that it's noninteractive means that you can do other work in the meantime. Once it's done you might well have more information than you'd have if you had used the same time manually reducing it interactively by trying to reduce the scope of the bug.


I’ve needed CPR zero times and bisect around a dozen. You should know both particularly for emergencies.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: