Unfortunately, I found many times this is actually the most difficult step. I've lost count of how many times our QA reported an intermittent bug in their env, only to never be able to reproduce it again in the lab. Until it hits 1 or 2 customer in the field, but then when we try to take a look at customer's env, it's gone and we don't know when it could come back again.
Debugging: Indispensable rules for finding even the most elusive problems (2004)
211–220 of 238 posts
Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#212Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#213I also think it is worthwhile stepping thru working code with a debugger. The actual control flow reveals what is actually happening and will tell you how to improve the code. It is also a great way to demystify how other's code runs.
Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#214Earlier quoted context omitted.
Not to complain about bisect, which is great. But IMHO it's really important to distinguish the philosophy and mindspace aspect to this book (the "rules") from the practical advice ("tools"). Someone who thinks about a problem via "which tool do I want" (c.f. "git bisect helps a lot"[1]) is going to be at a huge disadvantage to someone else coming at the same decisions via "didn't this used to work?"[2] The world is…
I've spent the past two decades working on a time travel debugger so obviously I'm massively biassed, but IMO most programmers are not nearly as proficient in the available debug tooling as they should be. Consider how long it takes to pick up a tool so that you at least have a vague understanding of what it can do, and compare to how much time a programmer spends debugging. Too many just spend hour after hour hammer…
It's very rare for me to use debuggers.
Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#215Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#216First time hearing about these 9 rules, but I learning most of them by experience with many years resolving or trying to resolved bugs. Only thing that I dont agree is the book cost US$ 4.291,04 on Amazon
Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#217Rule 0: Don't panic Really, that's important. You need to think clearly, deadlines and angry customers are a distraction. That's also when having a good manager who can trust you is important, his job is to shield you from all that so that you can devote all of your attention to solving the problem.
Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#218Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#219Earlier quoted context omitted.
> why I maintain the discipline that all commits to the "real" branch, however you define that term, should all individually build and pass all (known-at-the-time) tests and generally be deployable in the sense that they would "work" to the best of your knowledge, even if you do not actually want to deploy that literal release You’re spot on. However it’s clearly a missing feature that Git/Mercurial can’t tag diffs a…
This is why we use squash like here https://docs.gitlab.com/ee/user/project/merge_requests/squas...
Re: Debugging: Indispensable rules for finding even the most elusive problems (2004)
#220Earlier quoted context omitted.
I explicitly don’t want squash. The commits are still worth keeping separate. There’s lots of distinct pieces of work. But sometimes you break something and fix it later. Or you add something new but support different environments/platforms later.
But if you don't squash, doesn't this render git bisect almost useless? I think every commit that gets merged to main should be an atomic believed-to-work thing. Not only does this make bisect way more effective, but it's a much better narrative for others to read. You should write code to be as readable by others as possible, and your git history likewise.