News for hackers. Stuff that matters.
Re:The type system is a programmer's best friend by bluGill on Saturday November 05, 2022 @01:10PM (#33483355)
I'm adverse to debuggers as i've more than once caught myself following a rabbit hole of steping through code instead of thinking.

IDEs have some use, and static analysis has proven to catch the same mistake over and over, but only as the authors of those tools have discovered that false positives cannot be allowed ever, once there is a false positive the tools is worthless.

Re:The type system is a programmer's best friend by icedchai on Saturday November 05, 2022 @01:56PM (#33483877)
I find debuggers more valuable with dynamically typed languages, especially Python. It's handy to be able to drop a `breakpoint()` in the middle of a script when you have no idea what a function is actually returning. The happens more often than you might think.
Re:The type system is a programmer's best friend by bornfreddy on Saturday November 05, 2022 @05:52PM (#33486242)
Of course, when this happens the bug you are hunting is not your only problem. You really should clean up the code to make it clear what is being returned from the function.
Re:The type system is a programmer's best friend by astrobe_ on Saturday November 05, 2022 @02:38PM (#33484317)
> I'm adverse to debuggers as i've more than once caught myself following a rabbit hole of steping through code instead of thinking.

Yes. I was kind of forced to think and do printf debugging at the beginning of my career, after having used before that (as a hobbyist) quite good asm debuggers.

Maybe that's just me, but I also was, I believe, a bit over-reliant on the debugger - I would just compile, run, see what happen, and launch the debugger if something didn't work.

Nowadays I could use sometimes a debugger - but the system I work with is sort of soft real-time so stopping at a breakpoint of even slight changes in timings can change the context - in some cases even printf debugging could make a bug vanish.

If nothing else, debugging without a debugger is a good exercise in logically thinking - and it can save time too.

Re:The type system is a programmer's best friend by Gibbon1 on Saturday November 05, 2022 @05:34PM (#33486067)
I have a code base that is a mix of hard, soft, and static real time. I have a command line interface built in to it and a lot debug logging that can be re-enabled.

I've also spent some effort into making it tolerate being interrupted. And there is also the good old technique of inserting break points while the code is running.

Re:The type system is a programmer's best friend by titzer on Saturday November 05, 2022 @03:48PM (#33484918)
Yes yes, indeed. The ability to look at what's happening step by step really hamstrings my imagination. Sorry, no. A debugger is a microscope! It will help you find problems faster and will seed your imagination by filling in what is really going on. It's an augmentation, like any tool. Or do you prefer to stare into space blindfolded?
Re:The type system is a programmer's best friend by morelisp on Saturday November 05, 2022 @04:15PM (#33485179)
> A debugger is a microscope! ... Or do you prefer to stare into space blindfolded?

Perhaps illustrating the original point, microscopes aren't used to stare into space. A debugger is a microscope but the most pernicious bugs don't benefit from such a thing.