logoalt Hacker News

Hung by a thread

9 pointsby ectotoday at 6:24 PM11 commentsview on HN

Comments

Negitivefragstoday at 8:21 PM

It's quite interesting to me the way that different "programming cultures" exist around debuggers.

If you grew up doing windows C++ development, looking at things in a debugger is your first step. You only resort to printing values if you can't immediately see what happened in the debugger.

A lot of other envioronment/language cultures are the opposite. Obviously both have their place, but I do feel like more people should use the debugger as the first step instead of the last.

throwaway173738today at 8:16 PM

This kind of stuff is why devs doing safety critical work often painfully reinvent the wheel. Even if you’ve personally read the code yourself and think you understand it, there’s always some latent defect that arises from someone else’s bad assumptions.

show 1 reply
MobileVettoday at 8:21 PM

Man I miss embedded robotics work. So fun to write a control loop / algorithm and then see it play out in the real world. <robot crashes into wall> Whoops, guess we better review that routine...

n_utoday at 8:11 PM

The last photo appears to show the view out the author's office in Fort Mason. Didn't know they had offices there, that's quite a nice view of the Bay.

knorkertoday at 8:09 PM

That auto flip back and forth between before and after is the most annoying thing I've seen since the blink tag was removed.

show 1 reply
01HNNWZ0MV43FFtoday at 8:16 PM

Oof lol.

Sometimes I yearn for the Haskell or Idris style of programming where a dependency can do nothing harmful or stupid without me passing in permission.

Then I think about having to pass in thread handles and file handles to logging libraries. I don't know. It would be a cool option. There is probably a hack for `tracing` that would let me manage the logging thread myself.

Software is so complex these days. The funny solution of doing static-allocated C with no threads and no logging isn't gonna work for me. You aren't going to have WebRTC in from-scratch C.

show 1 reply
_dain_today at 8:24 PM

>Not crashed, not erroring, just... vibing. Sitting there. Motors off. Completely checked out.

>Doesn't crash. Doesn't throw. Just ghosts me.

>Same freeze. Same spot. Iteration 1,615. Every single time.

>It's not slow. It's not starved. It's blocked.

>The Reveal

>That's it. That's the fix. 8 hours of debugging. 2 lines changed. Hold the lock for less time. Tale as old as time.

>The Takeaways

>[the way the bulletpoint list is formatted]

pure AI slop. i'm appalled that this obvious garbage is on the frontpage. you even got the title from GPT, didn't you?

show 2 replies