[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppDebug
Make your code readable like a poem. Align brackets and indent consistently. You won't find bugs in unreadable code.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppDebug
(C++) Debug
Debugging is the process or removing errors or bugs.There are two ways to write error-free programs; only the third one works.
Alan Perlis
Debugging tricks for newbies
Programs must be written for people to read, and only incidentally for machines to execute.
Harold Abelson and Gerald Jay Sussman
Write programs for people first, computers second.
Steve McConnell
Make your code readable like a poem. Align brackets and indent consistently. You won't find bugs in unreadable code.
Useful debugging tricks
- Be const correct [1].
- Use assert [1].
- Use a debugger.
'Debug' links
References
- 1) Herb Sutter and Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Chapter 15: 'Use const proactively', chapter 68: 'Assert liberally to document internal assumptions and invariants'.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
