Don’t You Hate It When a Little Error in Your Code Takes an Entire Day to Fix?

Categories: Tech, Education | Pubby Cash Received:  20 | Click to Award

I know, debugging applications can sometimes be an unwelcome activity. You’re busy working under a time crunch and you just want it to work. However, at other times, you might be learning a new language feature or experimenting with a new approach and want to understand more deeply how something is working. Regardless of the situation, debugging code is a necessity, so it’s a good idea to be comfortable working in a debugger. Additionally, I have some more useful tips that can help you better debug your program.

  1. Make sure to test your program frequently. This way, any errors that occur can be easily found as there are only so many places you’ve changed in the code.
  2. When you know where the error is, try many different methods to get it to work. Most bugs are just one tiny little misspelling or logic fallacy. Sometimes, the brutal trial and error can be the best way to get something to work.
  3. Consult help when you need it. Websites like Stack Overflow and Github offer solutions to anything you could encounter. Try Googling the error that shows up in your debugger and you just might find what you’re looking for.
  4. Skillfully use the print statement. It was the first line of code I learned in Python. Place print statements throughout the code and anywhere the print statement doesn’t execute, you know there’s an error.
By knowing how to properly and skillfully debug your program, you could save hours of valuable time and effort.


Published from: Pennsylvania US
Liked by: H2O, Evan Tang 

Daily Deals


MECHANICSBURG WEATHER