debugging-testing

Solid

Use when the user reports a bug they can't reproduce, asks where to start debugging, or mentions a Heisenbug / production-only failure. Drives the observe→hypothesize→predict→test→iterate scientific method.

Testing & QA 69 stars 9 forks Updated 1 weeks ago NOASSERTION

Install

View on GitHub

Quality Score: 79/100

Stars 20%
61
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Debugging & Testing A program without tests is a hypothesis. A program with bugs and no debugging strategy is a mystery. This skill catalogs systematic approaches to both: finding defects (debugging) and preventing them (testing). The emphasis is on method over intuition -- debugging and testing are engineering disciplines with established techniques, not arts that depend on talent. **Agent affinity:** hopper (coined "debugging" when she found a moth in the Mark II), dijkstra (program correctness as a mathematical property) **Concept IDs:** code-debugging-strategies, code-iterative-development, code-peer-review ## Part 1 -- The Debugging Mindset ### Debugging as Scientific Method A bug is a hypothesis falsifier: your mental model of the program says X should happen, but Y happens instead. Debugging is the process of updating your mental model until it matches reality. 1. **Observe** the symptom. What actually happened? What did you expect? 2. **Hypothesize.** What could cause the discrepancy? List at least three candidates. 3. **Predict.** If hypothesis H is true, what would happen if I do experiment E? 4. **Test.** Perform the experiment. Does the result match the prediction? 5. **Iterate.** If the prediction was wrong, the hypothesis is eliminated. Try the next one. This is the scientific method applied to code. The most common debugging mistake is skipping step 2 -- changing things at random hoping the bug disappears. Random changes do not build understanding. Th...

Details

Author
Tibsfox
Repository
Tibsfox/gsd-skill-creator
Created
5 months ago
Last Updated
1 weeks ago
Language
TypeScript
License
NOASSERTION

Similar Skills

Semantically similar based on skill content — not just same category