visit
I’m launching a new Twitter video series that will focus on teaching the concepts of debugging (and other concepts) in small video bites.
This is the first video in the series. I hope to publish a new video
every week. It starts with the very basics of debugging and builds up. I
think debugging is a powerful tool that even experienced developers
don't leverage enough:
When we pick a debugging tool, it isn't that different from typical experimental science. We define what we expect to observe in the code base and we see if our expectations match reality. This analysis leads us to the solution.The first challenge we deal with when pulling out a debugger is reproducing the issue. How do we repeat the experiment?I will go into more details in the next episode of 140 second ducklings…“Debugging is the scientific method applied to computer programming.
We can observe a problem or a behavior directly within the running
application.”
"It isn’t a replacement for testing. You often need a debugger to
debug the tests or understand the missing tests. In fact, debugging and
testing go hand in hand."
Testing and debugging go hand in hand. Debuggers are excellent tools
to debug test failures. But the really significant part is that unit tests help us prevent regressions of bugs we understood in the debugger.
"Debugging provides insight into our code that’s normally much harder to get otherwise. You can use it to learn new code"This process is more than just defect analysis...
When I need to pick up a new code base, I often start with debugging.
I look through the central areas in the software code with a debugger
to verify my assumptions and understandings.
It's like looking inside an engine while it's working and pausing it
to understand details. Common debugging technique can reveal the hidden nuances of a software product.
"We start by making the simplest assumption we can about the projectI wrote about in great detail a while back. I'll try to go over all of its approach as part of this series. The checklist is a generic theoretical framework or algorithm by which an application can be debugged.Then we need to validate that assumption using the debugger. If we
get a different result than what we expected, then we have something to
investigate. This is the debuggers checklist which we will discuss in
the future"
This might be unnecessary for smaller samples like the one in the
video. But as lines of code grow and complexity rises, we need a methodology for locating bugs.
I plan to post a video every week. I hope I can keep up. I have the
next one ready but production is non-trivial. Hopefully, this will get
easier with practice.
I hope to introduce additional topics to the "140 second ducklings"
series. There's so much I want to cover. An interesting subject would be DevOps for developers or tracking production issues.