How to Develop a Debugging Mindset

·

5 min read

Good debugging strategies start well before issues come up. From simple typos to a long list of console errors, you have to deal with a range of bugs throughout your career as a developer. One way to approach debugging in a broader sense is to develop a debugging mindset. When you change the way you look at debugging, you'll develop a better toolbox to work with.

Fixed Mindset vs. Growth Mindset

The heart of the debugging mindset has to do with having a fixed mindset versus a growth mindset. Devon H O'Dell, currently a software engineer at Google, has an informative talk that focuses on developing a debugging mindset.

In this talk, Devon says:

"People who have an idea that intelligence is an inherent trait, you can’t do much to change it, you’re sort of born with it have a fixed mindset. And people who think it’s a skill, it can be developed, it’s malleable, you can grow in your intelligence, are said to have a growth mindset."

This is based on Caroll Dweck's research which you can read more about through her book, Mindset: The New Psychology of Success or enjoy this video where she discusses this topic.

Having a growth mindset is a key component in being a programmer who can effectively solve coding errors. If you don't think you can improve and feel like you'll always stay at your current level of technical skill, this thinking may keep you from putting in the time and effort needed to build your skills. Those who recognize that they have a fixed mindset can certainly shift towards thinking that they can improve eventually.

'Practicing at the Edge of Our Ability'

Another key takeaway from Devon's talk is about how you gain better skills by challenging yourself a bit beyond what can already do. Working on more advanced concepts than you are used to is uncomfortable. There is a risk because you might fail, but here is where a growth mindset is critical to have. Feeling uncomfortable sometimes will be what helps you get to a better understanding of complex concepts. Maybe you won't be able to understand certain new concepts right away. You take more time to get back into it and with more repetition, you have that experience to help you get closer to understanding those concepts.

I highly recommend watching Devon's talk or reading his blog post which has other intriguing ideas and debugging tips for developers.

Pair Programming and Live Streams

Teaming up with another developer to work on a collaborative coding project can lead to a lot of learning opportunities. This type of scenario will allow you to watch how someone tackles problems and what techniques they use to debug. You may know several debugging strategies, but seeing them in action and having the chance to talk through those approaches can help you learn how to implement them well. If you are leading the coding session, then you can practice how you explain things which makes you evaluate how much you truly know about a concept. You can connect with other developers through meetups or social media and use tools like the Live Share extension on VS Code or Repl.it to create a virtual collaborative environment. This is also a great way to practice working on more advanced concepts with someone else.

If pair programming isn't a possibility, try watching coding live streams. YouTube Live and Twitch allow you to interact with developers during the live stream, so you can ask questions and make comments in real-time. This is a great opportunity to observe programming in a language you are interested in but have not tried yet, or simply observe someone's process in building a cool project. You can also start your own live stream which would help you improve your skills as well as open doors to many other professional opportunities.

Some Twitch streams I recommend:

CSS - KevinPowellCSS
Web Development - Mayanwolfe
React and Open Source - DevlinRochaa
WordPress Development RyanWelcherCodes
Software and Game Development - MetalAndCoffee_

Document, Document, Document

If you've ever created side projects, you've created a history of changes and updates over time to those projects. There may have been compatibility issues, code depreciation or other errors that you've handled during the lifespan of the project. If you decide to make any of those side projects open to collaborators, how would they be able to jump in and help move the project forward? Documentation.

Documentation saves time by having a place to share knowledge and creates a way to communicate better. Creating documentation is an essential practice because writing down a project's history could help with reducing errors. Open source projects are great examples of how valuable documentation is because these projects rely on many people collaborating to keep it thriving.

Documentation could be as simple as adding notes to the ReadMe file. A bug-tracking system serves as documentation as well because you are developing a log of issues and fixes over time. You'll have this detailed reference to work with when you are trying to make decisions for a project. Good documentation is also handy if you want to create content to share with others including potential employers.

Conclusion

Learning specific debugging techniques is important, but also think beyond those techniques. Getting better at debugging is an accumulation of all the things you do. The experiences with different codebases, the way you push yourself out of your comfort zone, the time you spend collaborating with other developers, and the technical skills you learn all contribute to your overall success as a developer.

Do you consider yourself having a growth mindset? Feel free to comment or ask any questions below!