#debugging
8 posts

10 Tips for Debugging in Production

This is an interesting story of how this team solved a tricky bug. What followed was a checklist of things we can all follow to debug production code.
Read more

10 Tips for Debugging in Production

Heisenbugs
Courtesy: Geek and Poke

This is an interesting story of how this team solved a tricky bug. What followed was a checklist of things we can all follow to debug production code.

  • Eliminate all the improbable scenarios immediately. In order to do this, it's perfectly fine to add temporary debug code to your production deployment.
    Just remember to remove it after.
  • Don't be afraid to ask co-workers for advice. It's likely that they've seen something like this before. Experience trumps everything when you're stuck.
  • Read, read and then re-read the logs. In my personal experience, lot's of people simply skim the logs and miss out important details in the logs.
  • Don't ignore dependent libraries as potential sources of problems. After all, that is code written by another human.

Lastly, The fact that you had to debug in production means that you couldn't reproduce the error on your local machine. Once all fires are extinguished, spend time fixing this problem.

Full Post here, 15 mins read

When debugging, your attitude matters

In this article, the Julia Evans battles with CSS and talks about our attitude as individuals when faced with a problem that we don't understand.
Read more

When debugging, your attitude matters

In this article, the Julia Evans battles with CSS and talks about our attitude as individuals when faced with a problem that we don't understand.

  • When debugging a problem, throwing darts in the dark doesn't help. Furthermore, even if we managed to hit bulls-eye, we're no better for it. There's no greater understanding of the system that lives with us.
  • Reading the documentation (if available) or source code helps us understand the fundamentals of the system.
  • Find documentation that you can trust. As engineers, we've sold our souls to StackOverflow (which is a bargain, if you ask me). While StackOverflow is great for snippets of code, it's not a replacement for good documentation or tutorials.
  • Watching other people perform the same task helps us learn much faster. After all, we are all monkeys that imitate each other. This is also the reason that we have so many die-hard fans of pair-programming.

As a backend engineer, this article made me feel seen. For example, I do not enjoy centering my divs. Instead of trying to understand CSS and it's many tricks, I actually founded a company, Appsmith, to save others like me from this hell. That was my attitude to this problem. If you too hate centering your divs, do give us a spin at Appsmith. You might be pleasantly surprised.

Full post here, 7 mins read

7 debugging techniques to speed up troubleshooting in production

Remove or automate all the configuration needed to run the app. Don’t fall into the tech stack soup trap. Use 80% of your logging for 20% of your most important code.
Read more

7 debugging techniques to speed up troubleshooting in production

  • Remove or automate all the configuration needed to run the app by taking advantage of containerization and aiming for zero configuration.
  • Don’t fall into the tech stack soup trap. The fewer technologies or ‘right tools’ you use, the better, to avoid a pile of dependencies.
  • Use 80% of your logging for 20% of your most important code (the parts used the most).
  • Make it simple and quick to replicate customer issues. Use a tool to import only the records needed from the production database to your machine.
  • Place breakpoints in obvious places in the application, with one easily locatable method per UI event.

Full post here, 7 mins read

Lessons from 13 years of tricky bugs

Some of the hardest bugs to track are those caused by code failing silently. Event order matters. Imagine all event orders possible while writing co
Read more

Lessons from 13 years of tricky bugs

  • Some of the hardest bugs to track are those caused by code failing silently.
  • Event order matters. Imagine all event orders possible while writing code.
  • Complicated if statements & missing else statements cause more bugs than you think.
  • Add enough logging so you can tell why the program does what it does.
  • Always test with zero & null conditions.
  • Reveal bugs by using random input.
  • Always check that an action that shouldn’t happen doesn’t happen.
  • Commit different changes in different commits and use clear descriptions of the changes.

Full post here, 9 mins read

Perspectives on issue tracking

It helps in enlisting unique tasks to be done. It helps identify ownership of an issue, sometimes extending to multiple roles.
Read more

Perspectives on issue tracking

Some fundamental capabilities of the issue tracking we should pay attention to:

  • It helps in enlisting unique tasks to be done.
  • It helps identify ownership of an issue, sometimes extending to multiple roles.
  • It allows for the organization of issues into components, hotlists, sprints, releases, backlogs, etc.
  • It can establish hierarchy and interrelationships between issues.
  • It helps determine resource allocation.
  • It helps to aggregate discussions around an issue by supporting comments.
  • Issue trackers make for excellent knowledge repositories for postmortems.

Full post here, 8 mins read