news.volyx.in

Debugging: Indispensable rules for finding even the most elusive problems (2004) (dwheeler.com)

532 points by omkar-foss · 569 days ago · 227 comments on HN

Article summary

The article reviews the book 'Debugging' by David J. Agans, which provides nine rules for finding and fixing problems. The rules include understanding the system, making it fail, and quitting thinking and looking, among others. The book is praised for its timeless advice and practical examples, but criticized for lacking a master list of rules and sub-rules. The reviewer finds the book to be a great resource for learning and reminding oneself of debugging fundamentals.

Main themes

  • Debugging principles
  • Software development
  • Problem-solving strategies
  • Testing and validation
  • Code maintenance

What commenters say

  • Writing tests for bugs that were fixed can help prevent regressions and ensure that the fix is not broken in the future.
  • Some argue that writing tests for every bug is not worth the effort, especially for complex or time-consuming tests.
  • Others believe that writing tests is essential, even if it takes effort, as it provides a safety net for future changes and refactoring.
  • The value of unit tests is debated, with some seeing them as essential for ensuring code quality and others finding them too time-consuming or difficult to write.
  • Some commenters suggest that tests should be written before fixing a bug, while others argue that it's more practical to write tests after the bug is fixed.
  • There is a trade-off between writing exhaustive tests and the resources required to do so, and some argue that it's not always worth the effort.
  • Writing tests can help identify and prevent bugs, but it's not a guarantee, and other methods such as code review and debugging techniques are also important.