#100DaysOfCode: Python Day 13
#100DaysOfCode Day 13
Have you noticed that bugs enjoy waiting till Friday to be found?
Yesterday I explored how to squash them!
###The 10 Step Approach:
- Describe the problem: Doing this can help you break down the problem.
- Reproduce the bug: You have to get the bug repeatedly, or something more complicated may be the issue.
- Play computer: Think like a computer. Execute the code in your head and determine each lines outputs.
- Fix the errors: If your editor is underlining things in red underlined, fix that first.
- Print is your friend: Print values to see how they change during execution.
- Use a debugger: If your IDE supports it, make use of breakpoints.
- Take a break: Sometimes taking a break does wonders; make some coffee or have a nap and get back to the problem at hand.
- Ask a friend: Chances are your friend will see the problem from a different angle and help you identify the bug.
- Run often: Run/build your code often as you would want to pick up bugs sooner rather than later. Just imagine finding 20 bugs after writing 100 lines of code 🙈.
- Ask Stackoverflow: Always search for your problem on google before you resort to this, but chances are someone in the world will be able to help you or may have encountered that same rare bug you see.
These are things that I practice daily as a professional software developer, and I can comfortably say that they can be applied to almost all programming languages.
Want to stay up to date with my learning journey? Just head to my home page and sign up for my newsletter.