top of page
Search

On Debugging: An Insider’s Perspective

  • bjones349
  • May 7
  • 2 min read

Have you ever wondered how a software engineer approaches debugging in real time? In today’s post, we hear from Kevin Chau, one of our team’s tech leads, to get his insights into debugging in the field.


What is your overall thought process while dealing with bugs during test runs?


Having bugs and issues in the code while field testing something for the first time is not ideal, but unfortunately, it's more likely to happen than not in my experience. That's just the way it goes when you deploy something for the first time. So, you have to be prepared and learn to stay cool in the moment. Bugs will always arise, so you need a standardized process for dealing with them. “Versioning” your code is critical.


You have to think logically through the problem so you don’t get frustrated. It’s easy to give up and say, “It’s just not working! We’ll try again later...,” or to think that it will take too long to debug. But you just have to take it step by step and do the best you can in the time allotted.


What’s the most crucial step in debugging?


I’ve found that the most important step in debugging an issue is reproducing the problem. If you can consistently make the bug or crash happen in a controlled environment by following the exact same procedures every time, you’re halfway to finding the solution. Inconsistent, unreproducible bugs are extremely difficult to fix because you just don’t know what causes them. Consistent, reproducible bugs are much easier to deal with.


After you reproduce the problem, you can start looking at what’s happening in the code or software. That’s when we start checking the output logs of the running code and looking more in-depth at the exact function calls or processes happening during execution. It’s in this step that you can usually pinpoint the problem. It’s often a small thing, like an incorrect variable value (such as max speed) or a small line of code that needs to be tweaked.


Often, during the first time testing something, you’ll run into 4-5 of these small bugs—things you couldn’t think of or expect while designing and writing the code at your desk. But it’s these tiny bugs that make the difference between a concept or idea and a working prototype. So it’s critical that we have these field tests to find them.


To read more about the team’s field test day in Catheys Valley, check out our blog post, “Run, Robot, Run! Our First Field Test on Forest Terrain.”


 
 
 

Comments


SUBSCRIBE VIA EMAIL

Thanks for submitting!

© Powered and secured by Wix

bottom of page