Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 10, 2023 12:32 pm GMT

Debugging Like a Boss: A Decade's Worth of Tips

Debugging code is harder than writing it

If you're a developer, chances are you've spent countless hours debugging code. Debugging can be time-consuming, frustrating and fun at the same time.

In my career as a developer, I've encountered my fair share of bugs. From minor issues to major production outages, I've tackled them all.

Here are my learnings in 25 lessons that will help you elevate your debugging game.

  1. Bugs are inevitable. You just get better at fixing them.

  2. Train your mind to see debugging as an opportunity to learn.

  3. Start with breaking down the problem. Obvious but overlooked.

  4. Understand what happened before trying to fix the bug.

  5. But things are randomly failing No, theres always a reason. You just dont know it yet.

  6. Assume nothing. Bugs can come from ANYWHERE.

  7. Identify whats wrong before where its wrong.

  8. Investigate - When did the code work last? What has changed since then?

  9. Never skip reading the error message.

  10. Google it. Your issue is (most likely) faced by thousands everyday.

  11. When debugging code, never try to prove yourself right.

  12. Stop blaming JavaScript runtime. Its your code that needs fixing.

  13. Debugging is hard if you do it without a plan.

  14. Explain your code out loud. Step by step. (Check Rubber-Duck-Debugging).

  15. When things stop making sense, start thinking on paper.

  16. Getting stuck is normal. Its a signal to approach the problem differently.

  17. Ultimate debugging hack is taking a walk.

  18. Debugging tools are your best friend if you value your time.

  19. Fixing a bug with a friend or colleague is criminally underrated.

  20. Learn to ask for help on an issue. Give back by helping others.

  21. Bug in production? Revert breaking change rather than pushing a fix.

  22. Debugging a production system is an independent skill.

  23. Document your learnings and share them with the community.

  24. Debugging teaches you what you should know but don't.

  25. To improve debugging skills fix more bugs. Cliche for a reason.

That's it!

Hope you found these lessons helpful.

If you liked this post, follow me for more of these
Also, would love to hear your best debugging tip in comments


Original Link: https://dev.to/codewithvoid/debugging-like-a-boss-a-decades-worth-of-tips-1439

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To