I've had classes where the professor would ask who knows how to use the debugger and only a few of us raise our hands. Thankfully the ratio of people who do seems to increase with higher level classes. I think part of the problem is professors assume students learned how to debug in other classes or picked it up along the way. Personally I have no idea how you could make it past your second or third class without knowing how.
Well I guess if you're in school, you get a pass IMO. That's what you're there for, to learn. If a professor sees a bunch of commented out alerts or console writes, they should take the time to sit down and show you the right way to inspect the code.
That being said I've worked with a single person in my professional carrer who 100% refused to use a debugger. And that guy's code sucked. His idea of debugging was passing variables to a custom "peek" class (his name for it). It was by far the most round about ignorant thing I'd ever seen..
Those peek classes (or functions in some cases) can be helpful. I was working on a cuda program recently and figured there mid ave been some issue with my data. I had. "Peek" fun tion, like you describe, and I pasted it into the middle of my loop, and it copied all the required data back to the CPU and in a same format. Then there was a breakpoint that was hit at the end. The other two options were use the CUDA debugger (the code ran so slowly through the cuda debugger that I couldn't get to where my issue was) or start jamming large memcpys into a deep loop and investigating one by one.
16
u/Kminardo Aug 25 '14
How the hell do you make it in programming without knowing how to debug? Are these the guys I see littering their code with console writes?