Live data from Hacker News

Why debugging is all about understanding

futurice.com

1–10 of 80 posts

Re: Why debugging is all about understanding

#3
+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...

Re: Why debugging is all about understanding

#5
Writing code is about understanding, also.

I'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

#6
Understanding is the key to everything in software development. In particular, understanding both what you are trying to do and the tools (including language) you are using is necessary for writing code that works.

The 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

#9
post #2

The 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/

Hmm delicious image http://www.linusakesson.net/programming/kernighans-lever/flo...

Worst times are when you jumping around the flow area.

Re: Why debugging is all about understanding

#10
post #3

+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...

I remember stepping through many programs when I started programming as a teenager. It was quite fascinating to see everything in slow-motion.

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.

Post reply on HN