4 ms·
I spend most of each working day debugging with binding.pry. A colleague who is much smarter than me rarely uses it. He just stares at the code and figures it o
by delichon 2y ago
I spend most of each working day debugging with binding.pry. A colleague who is much smarter than me rarely uses it. He just stares at the code and figures it out. Forty years of coding and I still can't get away with that enough to put down the debugger. I've been playing chess longer than that and still can't play without the board, which I think of as a similar skill.
So I think of the debugger and the chess board as prosthetics that allow people who like me who are handicapped by a lack of brilliance to perform at a useful fraction of the truly talented.
Plus it's fun. The fast feedback and rapid iteration has the same kind of psychic reward as a good video game.
- matheusmoreira 2y agoSometimes I just end up staring at the debugger instead. After enough staring and maybe a good night's sleep I figure out it was a silly mistake like copying and editing a line of code but forgetting to update some parameter.
- aardvark179 2y agoDebuggers are great, right up to the moment they aren’t. Conditional break points can be slow enough that you may be better off putting the condition in the code and hitting a normal breakpoint on the rare occasions the condition is true. Concurrency can be tricky as well, there’s nothing quite like discovering everything works because the brief pause from you looking at a breakpoint is enough to change the behaviour.
- toastercat 2y agoYeah I still can't figure out how to use a debugger with async or concurrent code.
- wruza 2y agoI understand neither way, cause I’m staring at the extensive stdout/log.txt instead. Why pause, watch, evaluate or search for branches with conditionals if you can just see it all at once, search, go back and forth and distill by grepping. Using a debugger feels like walking through a maze over and over instead of just looking from above. (And not using anything is imo just a waste of time and your employers money, if you have one.)