Learn Before
Concept

Avoiding Debugging

It is important to have good programming practices so that you can, for the most part, avoid having to debug your programs.

When writing a program:

  1. Understand the Problem
  • Decide clearly on what you are trying to accomplish. It is not necessary to know exactly how to accomplish it, but an understanding of what output should be produced for some input will allow you to test the results of your program.
  1. Work in Small Parts
  • Rather than sitting down and writing a whole program at once, work in small, modular chunks and ensure that it works at each step. Writing out large programs at once without testing in between can lead to debugging nightmares where it is very difficult to pinpoint where an error is occurring.

Remember the mantra: "Get something working and keep improving it".

0

0

Updated 2021-06-15

Contributors are:

Who are from:

Tags

Python Programming Language

Data Science