Why debugging is all about understanding
futurice.com
Why debugging is all about understanding
1–10 of 80 posts
Re: Why debugging is all about understanding
#2Re: Why debugging is all about understanding
#3Also, bugs aren't only bad - you learn a lot from them too [2].
[1] http://henrikwarne.com/2014/01/01/finding-bugs-debugger-vers...
[2] http://henrikwarne.com/2012/10/21/4-reasons-why-bugs-are-goo...
Re: Why debugging is all about understanding
#4Re: Why debugging is all about understanding
#5I've seen developers bang away at a problem for days and not be able to describe how it "works" in a code review. They just tried every crazy thing they could think of until it eventually returned results that looked correct.
Don't be that kind of developer. For one, all the other developers are going to make you maintain that code for the rest of your life. Two, never be too proud to ask for help. We can't know how to solve every problem on our own. It's not possible.
Re: Why debugging is all about understanding
#6The former is true even if you are doing exploratory development: in that case, you need to understand what has been found so far and what the next iteration is intended to investigate.
Re: Why debugging is all about understanding
#7Tangential to the topic: The git bisect image has "good" and "bad" backwards, showing the solving of a bug instead of the production of one. I would hope a commit in between would clearly state it contains the bugfix.
Re: Why debugging is all about understanding
#8The Kernighan quote is absolutely key, and is one of the many email signatures that I use.
Re: Why debugging is all about understanding
#9The Kernighan quote is absolutely key, and is one of the many email signatures that I use.
An interesting interpretation/rebuttal of that quote: http://www.linusakesson.net/programming/kernighans-lever/
Worst times are when you jumping around the flow area.
Re: Why debugging is all about understanding
#10+1 for encouraging the use of logs as a debugging tool - they're often better than a debugger in my opinion [1]. Also, bugs aren't only bad - you learn a lot from them too [2]. [1] http://henrikwarne.com/2014/01/01/finding-bugs-debugger-vers... [2] http://henrikwarne.com/2012/10/21/4-reasons-why-bugs-are-goo...
Over the years, I had less and less use for intense debugging sessions, but I've been reading and writing logs all the time.
Today, I see server side code without logging statements, I immediately ask myself, how do the authors debug this thing?
Related:
> If you want more effective programmers, you will discover that they should not waste their time debugging - they should not introduce the bugs to start with.