DEV Community

Cover image for Bugs: a blessing and a curse
EzeanaMichael
EzeanaMichael

Posted on

Bugs: a blessing and a curse

Intro.
A common attribute in every programmer's life is the presence of bugs and as annoying and frustrating as they are quite useful.
Programming bugs are what can be called errors in programming that cause a program to crash, stop working, or be unable to work as intended.

Curse.
We've all been in similar situations when we write several lines of code and when we run it, it generates an error or does something else then we'll have to run through all the steps of the code to fix the problem. It is easy for everyone to see bugs as an unwanted occurrence in their work. Especially In situations when you might have a deadline to submit a project or you've tweaked the code severally but it still doesn't work as intended and you feel frustrated and the urge to quit, but you'll try again and again because of your passion for it before it gets done, and this can cause a lot of mental stress and might affect some interactions with others.

Blessing.
A lot of people might question how bugs can be seen with a positive outlook. From my experience programming in several languages, bugs serve as teachers to you on how the programming language works or how it processes certain information, look at it this way, imagine you're learning a new language, you start from the a-z and then word by word and you won't become a professional at it instantly, you'll go through the pronunciation, use of intonation, arrangement of words and so on you'll probably fail at this a certain time and every time you mistake you to learn something new in the way the language is spoken same as the case of programming when we make a mistake and a program is not running or executing in a wrong order it's a chance to learn something new and you probably won't make that mistake anytime soon and if eventually, you do you'll know how to fix the bug instantly.

Lesson.
Bugs can be a lesson and a curse so how do we manage them, one way I learned when I attended havards cs50 computer science course is by speaking to a rubber duck, ok not necessarily a rubber duck but speak to something or someone-if they understand what you're saying- explain your step by step approach to the program and what you wrote, chances are you'll find the error you're looking for or where you went wrong and you can solve it or google it. Also feel free to take breaks when debugging your codes, something as simple as taking walks, playing with your pet, or going out with someone can clear your head and when you come back, you'll be ready to squash that bug.
Thanks for reading, hope it helps, like and comment on ways you cool off to debug your codes.

Top comments (0)