4 ms·
That's a nice quote, but why does it have to be an either or? Sometimes you think about problems and sometimes you use debuggers. And sometimes you do both. I m
by CogitoCogito 8y ago
That's a nice quote, but why does it have to be an either or? Sometimes you think about problems and sometimes you use debuggers. And sometimes you do both. I mean for something like C/C++ I just view a debugger as an interpreter. Also using print statements is just a less interactive version of a debugging process.
Personally I _love_ debuggers when coming to new codebases. I view code in the process of execution as the natural state of a codebase. Instead of hoping around through source code by hand, why not step into functions, continue execution, and let the program flow do it for you? Most code only has small parts that are important and with debuggers I can usually find those parts right away.
I don't blame Torvalds for not wanting to use a debugger. He doesn't like them and doesn't want to support them. That's his choice. But I find it odd to just categorically dismiss them.
- r_smart 8y agoPrecisely. One of my favorite bugs I ever introduced was typing 0 instead of O in a variable name. Review your mental model all you want, a debugger is going to be a lot more useful in sussing that kind of thing out. Even just being able to see you have two variables on the stack RockOn and Rock0n will pretty much save you.
- posterboy 8y agoA font with a discernible difference would help, too.
- r_smart 8y agoAgreed! I was young at the time. Also, my poor coworker was the one that had to find and fix it since I was in class that day. Who knows what font he was using.
- smhenderson 8y agoHah, yes, I've done the same thing. It always bugged me how close together the two keys are on a US English qwerty keyboard.
- JohnFen 8y ago> I don't blame Torvalds for not wanting to use a debugger. He doesn't like them and doesn't want to support them. That's his choice. But I find it odd to just categorically dismiss them. I rather suspect that Torvalds' beef with using debuggers is that so many engineers get lazy and begin to use them as a substitute for thinking things through.
- djmips 8y agoAfter all he does use debuggers. He said "I use gdb all the time, but I tend to use it not as a debugger, but as a disassembler on steroids that you can program." This indicates that he is using the debugger as a means to improve his mental models of the CPU / hardware.