Update
This commit is contained in:
parent
af69eeea02
commit
87345e7f0e
24 changed files with 1859 additions and 1842 deletions
|
@ -6,6 +6,8 @@ Debugging is a term predominantly related to [computer](computer.md) technology
|
|||
|
||||
**Spare yourself debugging by testing as you go** -- while programming it's best to at least quickly test the program is working after each small step change you make. Actually you should be writing **[automatic tests](automatic_test.md)** along with your main program that quickly tests that all you've programmed so far still works (see also [regression](regression.md)). This way you discover a bug early and you know it's in the part you just changed so you find it and fix it quickly. If you don't do this and just write the whole program before even running it, your program will just crash and you won't have a clue why -- at this point you most likely have SEVERAL bugs working together and so even finding one or two of them will still leave your program crashing -- this situation is so shitty that the time you saved earlier won't nearly be worth it.
|
||||
|
||||
**Which kind of bug is the biggest pain in the ass to debug?** One take on answering this might the following: [statistical](statistics.md) bugs. That is bugs that aren't really an error in the code but an error in the mathematical model behind the code, and furthermore ones that don't manifest in a single place but only in the whole. For example when programming a [monte carlo](monte_carlo.md) [chess](chess.md) engine -- the code may be perfect, it's doing exactly what you want it to do, but the engine is making wrong moves because you actually want the wrong thing; debuggers won't help you, you cannot point a finger at a specific line in the code, you have to think deeply about statistics, sampling, probabilities and things that many times betray intuition, your brain starts to emit smoke and only then you realize you actually chose a wrong mathematical model and have to rewrite the whole thing. This is debugging on a high level.
|
||||
|
||||
## Debugging Software
|
||||
|
||||
Debugging of programs will commonly occur in these steps:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue