2 ms·
My second day of classes, after an overview of the courses, I teach students: - How to use a debugger - How to set up a Github account A good computer progra
by recursivedoubts 3y ago
My second day of classes, after an overview of the courses, I teach students:
- How to use a debugger
- How to set up a Github account
A good computer programmer needs to be able to evaluate/simulate the code they are looking at in their head, and the debugger (and other visual tools) are excellent for developing that ability. This is particularly the case for students that aren't "naturals" at CS (I was not a natural.)
https://grugbrain.dev/#grug-on-tools https://grugbrain.dev/#grug-on-tools
> grug always recommend new programmer learn available debugger very deeply, features like conditional break points, expression evaluation, stack navigation, etc teach new grug more about computer than university class often!
- bnolsen 3y agoThere's a difference between general "debugging" and "using a debugger". In my experience using a debugger is generally abused. Students need to learn to modularize and modularize and modularize so that what they write can be unit tested with logic errors detected by the tests. Tossing in quick print statements, compiling and rerunning ends up encouraging better design. When someone can't debug without an interactive debugger generally that means the code has hit ball of spaghetti status. This becomes especially helpful when writing heavily threaded code as interactive debuggers are almost entirely worthless when it comes to finding and fixing race conditions. I find I use debuggers for post crash analysis, either unintentional during a program run, or intentionally forced by me. Specific tests designed to crash the system in these cases can be cleaned up and added to the general test suite.