News for hackers. Stuff that matters.
Re:The unreasonable effectiveness of print debugging by dragonwriter on Saturday April 24, 2021 @03:52PM (#26927785)
> And then there's a class of problems that neither debugger nor print statements will help: many years ago a very junior co-worker was wondering why his C code was giving the wrong answer for some math. It took me pointing out that one of the numeric types he was using in his code was different from the rest

A debugger and watches on the values of concern absolutely will help with that (so will properly placed print statements), so its a really bad example. (Of course, strong typing helps even more with that particular case.)

Re:The unreasonable effectiveness of print debugging by cratermoon on Saturday April 24, 2021 @05:51PM (#26928481)
No, my co-worker was so junior he didn't understand why that was happening. It took me a moment to glance at the types in the source and point out the problem, no debugger needed.