https://github.com/flatironinstitute/learn-sciware-dev
Instructions here:
https://sciware.flatironinstitute.org/Theme_Demo/
Thanks Liz Lovero!
- Sept 26 or Oct 3
- Thurs, 3-5 pm
- Advanced Testing or HPC Cluster Intro
- Location TBD
Let's discuss on #sciware Slack channel
Foster an environment which encourages participation across experience levels, coding language fluency, technology choices, and scientific disciplines.
- Avoid discussions between a few people on a narrow topic
- Provide time for people who haven't spoken to speak/ask questions
- Work together to make discussions accessible to novices
About 15 mins each
- Overview of Debugging Strategies - Kelle Cruz, CCA
- System Tools - Dylan Simon, SCC
- Pycharm Debugging Tools - Tibi Tesileanu, CCB
- Emacs and gdb (C++) - Nick Carriero, SCC
- gdb web frontend (C++) - Nils Wentzell, CCQ
- C++/LLVM Sanitiziers - Olivier Parcollet, CCQ
by Glenford J. Myers, Corey Sandler, Tom Badgett
Chapter 8 Debugging
- Bugs represent mistakes and an ego hit
- Debugging is mentally taxing and tiring
- Debugging can take you down rabbit holes
- You probably weren't taught helpful strategies to help
- Review in your mind how the program is designed and how it should be performing
- Concentrate on the process for correct performance, and then imagine ways in which the code may be incorrectly designed
- The human subconscious is a potent problem solver.
- If error is not located in approximately 30 mins, set it aside and do something else
- If solution arises while sleeping, capture it with a recording before going back to sleep
- Talking to someone else may lead to the solution without any verbal assistance from the listener.
- Debugging tools need to be used in conjunction with problem solving strategies
- A haphazard approach is inefficient and could result in compounding the problem by introducing new errors
- When repairing an error, examine its immediate vicinity for anything else which looks suspicious.
- Be careful to find all instances of an error, not just the one causing the failing right now
- Corrections are more error prone than original code and should be tested more rigorously
- Regression testing is important to help catch new errors potentially introduced by bug fixes
- Use induction or deduction to form hypotheses
- Eliminate and/or refine possible hypotheses
- Prove the hypothesis
- Fix the error
- Run regression tests
Two types of test cases:
- for testing: to expose previously undetected error
Can cover many conditions with a small number of test cases - for debugging: to provide information useful in locating suspected error
cover only a single condition in each test
As you track down bugs, write more tests!
- When and where was the error made?
- Who made the error?
- What was done incorrectly?
- How could the error have been prevented?
- Why wasn't it detected earlier?
- How could it have been detected earlier?