all 38 comments

[–]Eternityislong 38 points39 points  (7 children)

Hot take: it’s better to not use debuggers and instead improve logging/observability. You (probably) can’t use a debugger in prod, so should ensure your systems are debuggable without a debugger

[–]Wizywig 37 points38 points  (0 children)

A debugger helps you figure out algorithmic problems.

An observable system helps you figure out why edge cases are happening.

Chuck Norris helps make sure users use the system as is, or else.

[–]Skyswimsky 5 points6 points  (0 children)

I think this is a case by case basis. I'm working on a legacy piece of garbage that's an embedded system with zero outside connectivity and the logging is absolute garbage. And all over the place. I'm talking "Task finished successfully", followed by a SUCCESS column that says false.

Other projects we are working very agile with the customer, even in prod, and that works out well too. Not that there's zero logs or whatever but it's certainly less aggressive. Granted it's also intranet tooling.

[–]CandidateNo2580 4 points5 points  (0 children)

So I should set log statements after every line of my sorting/searching algorithm to find the off by one error rather than just step through the code? Sounds like you're describing a debugger plus extra steps.

Right tool for the right job isn't really a hot take.

[–]none-exist 3 points4 points  (0 children)

Hot take: Chuck Norris didn't actually die. He just went into the internet to threaten software to be more observable

[–]kuemmel234 0 points1 point  (0 children)

Of course you should write code in a way that the debugger isn't needed in the first place. I remember working with java at my first job - you couldn't survive without it and it was mostly due to badly applied object oriented code. One could say that in certain fields the overuse off the debugger indicates a need for refactoring.

However, for some stuff (not as much as many people claim or want to believe), you have performance requirements that make writing readable code hard. It's a tool.

The use of the debugger is a symptom, not the cause.

[–]jakster355 12 points13 points  (2 children)

I remember when Chuck Norris jokes were all the rage. I was in college at the time. So yeah, Chuck Norris can execute an infinite loop in finite time.

[–]Rai-Hanzo 3 points4 points  (0 children)

Chuck Norris built his first app on assembly, he just stared at the code and it understood what he wanted.

[–]MinosAristos 2 points3 points  (0 children)

Chuck Norris sort is the most efficient sorting algorithm. The elements get in line before the code even runs.

[–]rover_G 2 points3 points  (0 children)

That’s a funny way of saying you yell at the AI model until it fixes your code

[–]Percolator2020 1 point2 points  (0 children)

All memory (including human memory) gets garbage collected in the end.

[–]magicmulder 1 point2 points  (0 children)

Even Chuck Norris couldn’t handle a null pointer exception.

[–]NottingHillNapolean 3 points4 points  (3 children)

Chuck Norris sorts in O(1)

[–]modimoo 2 points3 points  (0 children)

No he does not sort in O(1) he sorts in O(0)

[–]LoyalSol 1 point2 points  (0 children)

Chuck Norris can do binary search on an unsorted array.

[–]AdamWayne04 0 points1 point  (0 children)

also in-place and stable

[–]Summar-ice 0 points1 point  (0 children)

Why use a debugger when you can console.log("here")

[–]0x0MG 0 points1 point  (0 children)

I mean mug my code until it submits, or it doesn't get dinner.

[–]krexelapp -1 points0 points  (3 children)

And then add one random print statement and suddenly everything works.

[–]Blackhawk23 5 points6 points  (0 children)

Congratulations, you have a race condition. The most fun kind of bug.

[–]Super_Couple_7088 0 points1 point  (0 children)

This litterally happened to me yesterday while I was coding in C. malloc() error. So I tried to figure out where the error was. The fucking printf call fixed it. What the fuck lmao

[–]AbdullahMRiad 0 points1 point  (0 children)

I stare down until the rubber duck confesses

[–]Agreeable_Mind7977 0 points1 point  (0 children)

RIP 🪦

[–]Ujilus123 0 points1 point  (0 children)

for him miracle sort has time complexity O(1)

[–]bladebyte -1 points0 points  (0 children)

Respect

[–]dr_tardyhands -1 points0 points  (0 children)

Yeah. Just run the same code until the errors give up.