| |
Shotgun debugging is the process of making relatively undirected changes to code in an attempt to fix a bug. This is essentially a process of guessing that may be used when a programmer has run out of ideas.The term shotgun debugging has slightly negative connotations as it implies that a developer doesn't understand the code or design. For example, cut-and-paste coding often leads to shotgun debugging as developers may lack understanding of their own code.
In practice, highly skilled developers also use shotgun debugging from time to time. It is often faster to redesign and reimplement a section of code than to fix a difficult to reproduce bug.|
Type | | Definition | Making changes to code in hopes of fixing a bug without knowing what is causing the bug. | Value | It is often easier to rewrite poorly designed code than fix it.
Making code a little more robust often makes an error go away when you have been unable to determine a root cause after reasonable effort. | Related Concepts | | Next: Educated Guess
If you enjoyed this page, please consider bookmarking Simplicable.
© 2010-2024 Simplicable. All Rights Reserved. Reproduction of materials found on this site, in any form, without explicit permission is prohibited.
View credits & copyrights or citation information for this page.
|