Re: Debugging skills
Mats Wichmann <[email protected]> Tue, 2 Jan 2024 16:56:23 -0700
| Newsgroups | gmane.comp.python.tutor |
|---|---|
| Message-ID | <[email protected]> |
On 1/2/24 16:27, Alan Gauld via Tutor wrote: > On 02/01/2024 22:30, ThreeBlindQuarks via Tutor wrote: >> ...the best gift for some learners is learning debugging skills. > > Interestingly the paper book version of my tutorial has a chapter on > debugging. However, I've never got round to adding that chapter > to the online version. I probably should... That would be cool. I think the topic of which debugging technique to choose is quite interesting. Inserting prints, logging events, adding decorators which emit useful information, actual debuggers - both the quite basic pdb and some more advanced variants, various sorts of profiling and other external inspection, and... test-driven-development is really a kind of debugging technique: you write a failing test, and then work until you can get the test to pass, that's really another form of debugging, as long as you keep the unit of test simple enough that you don't just go "I wrote the code, and I have no idea why it's failing my test". There's probably more things that I didn't call out explicitly. Different approaches are usually needed for differing situations. _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor