Debug Your Coding Mindset!

Bugs are everywhere! No, not like the cute little lady-bugs you find on a hot summer day… I’m talking about the bugs we find in our code as well as the bugs we may have in our heads. What is a bug ? According to techopedia, “ a software bug is a flaw or fault in a system that causes it to produce an incorrect or unexpected result [which can] cause the program to crash.” Some bugs can either be subtle in nature, or can cause a program to crash and freeze altogether!

What is a mindset bug?

Like a software bug, mental “bugs” can be subtle and have ripple effects as well. In terms of the programer’s mindset, unchecked stress and negative self-talk (referred to as bugs) can affect productivity as well as self-esteem, but only if we allow them to. Without debugging our code, our system can crash, and that’s the same with us as well. Without checking in with ourselves, we can have bugs influencing how we approach and frame challenges. To prevent us from crashing, it’s important to identify and remove what is not working in our favor.

Get Perspective!

Despite the intensity of an immersive software-engineering bootcamp at Flatiron School, I realized that a lot of the stress I had was alleviated once I shifted my perspective. I found this to be a common experience for a lot of programmers, so I invite you to try out the helpful gems of I’ve picked up along the way.

“You’re not dumb, the computer is.” -Raúl Sanchez

This is something my instructor told us in our bootcamp, which has helped me tremendously in times of stress. When something isn’t working in your code, remember your brain makes these super fast connections to come to a conclusion that the computer simply does not. A computer can only do what you tell it to do. Remembering this phrase has helped me debug my own mindset from feeling incapable and made me realize that wasn’t the case at all! I only had to provide these shortcuts (explicitly name every part of code) and take it step by step, so the computer can catch up.

“Try to view errors as the natural state of the code”

It’s common to feel frustrated when persistent error messages are reflecting back at you, repeatedly confirming that your code is not working. When this happens, take a breath… and try reframing the scenario. If we view errors as something to be expected when coding, we’d feel less discouraged and blindsided when they do occur. Rather than stressing about error messages, try to see them as a helpful tool, because they provide solution clues by telling us where to look and what to try (such as syntax errors vs. logical errors). I like to remind myself of this by referring to errors as clues, which help fuel my curiosity and prevent mental burnout.

“Write a little code, write a little test, debug tonight”

Okay, I admit I’m having a little fun with this one, but it doesn’t make it any less true. It’s easy to get excited about building a new project and diving right into coding, however it is important to make sure it’s doing what you’re expecting it to do. Sometimes language can be clumsy, right? It can be easy to misinterpret or misunderstand what someone else is saying during a conversation when one of them is learning the language. When this happens, effective communicators advise to confirm if what we heard was exactly what was being said, and vice versa. Computers aren’t that different. It is good to check in with our code by testing along the way to confirm that it is working properly. It’s much easier to test and debug a few lines of code, rather than fifty. Trust me, this will save you time!

In short, perspective is crucial because it colors our reality and coding is no exception. I hope this article has helped in recognizing and debugging some common, but counter-productive mental “frameworks” that will help you in your journey as a programmer. Remember to debug your mind, debug your codes and remember to ABC (Always Be Coding)!!!

Don’t be too hard on yourself. You might already be doing better than you think :)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Avelon Pang

Full stack software developer with a passion for applying new technologies and a zest for technical problem solving. Bilingual in English and Mandarin.