Live data from Hacker News

Have you ever hurt yourself from your own code?

blog.nikitas.link

111–120 of 432 posts

Re: Have you ever hurt yourself from your own code?

#111
post #80

Earlier quoted context omitted.

> A cordless handheld drill is hardly a tool that most people would call 'hazardous'. You turn the trigger, the thing rotates, grab the chuck and you can likely stall it. But that much energy in something driven by code is extremely dangerous, it's waiting for any of who knows how many conditions to take off, a common one is that putting your hands in/on something that seems to be not moving can 'make' a sensor and t…

Why would a drill be engineered to put out more torque than a human holding the handle could be expected to counterbalance?

They probably could have, had they been ready for it. Not everyone is the same weight and strength either so it could just be that it was out of their physical capabilities.

That is often the difference between home and tradesman tools. A tradesman can reasonably be expected to handle a bit more responsibility from their tools than the home handyman.

Re: Have you ever hurt yourself from your own code?

#112
> Look at an audio file's waveform before playing it at max volume.

This is important, but more broadly, practice good sound hygiene: wear headphones them around your neck until you know for a fact that it's safe to put them on your ears. Additionally, never play "new" sounds without remembering to set audio output to a tiny fraction of normal and increasing it after the sample is deemed safe.

Musicians have this drilled into them because it involves their daily work, but this is good advice for everyone. Damage to ear drums can be permanent.

Re: Have you ever hurt yourself from your own code?

#113
> Well this was fine by me because I was going to write this program in C, so I didn't really care about safety.

this is extra funny if you work in automotive functional safety.

the collection of anecdotes in this thread makes me wonder if an intro to functional safety could be standard curriculum.

the approach of Nancy Leveson is not only very accessible but also very accessible, freely so:

https://g.co/kgs/AJWDuh

http://sunnyday.mit.edu/

Re: Have you ever hurt yourself from your own code?

#115

> Look at an audio file's waveform before playing it at max volume. This is important, but more broadly, practice good sound hygiene: wear headphones them around your neck until you know for a fact that it's safe to put them on your ears. Additionally, never play "new" sounds without remembering to set audio output to a tiny fraction of normal and increasing it after the sample is deemed safe. Musicians have this dri…

Also: put a limiter on your audio bus if you're exposed to such risks regularly. Don't play sounds directly, but open them from a host program that can apply VST/AU/... effects, and make sure there's a (brick-wall) limiter at the end.

Re: Have you ever hurt yourself from your own code?

#116
I've made the mistake in this article by piping something that wasn't uncompressed audio to /dev/dsp. These days I prefer to work with speakers with a physical volume knob and start it at 0 with unknown sources... you just never know what the yahoos upstream are sending you.

Re: Have you ever hurt yourself from your own code?

#117
post #35

Earlier quoted context omitted.

I used to do robotics, I can tell you that the fact that it was the cheapest or the most hacky does not matter in the least. Everything can and will go wrong, even the priciest and well documented part. I used to have multiple clamps around the controller, message bus, the firmware and also a physical barrier, and yet would not feel safe with my fingers or person around moving parts.

Not quite robotics, but some of our servers kept powercycling , had to plug in the physical terminal. It was close to lunch, so I kept eating. The finale was a jar of mayo spilled into the guts of a 50k server. Best mayo I ever had.

Best mayo it ever had, too.

Re: Have you ever hurt yourself from your own code?

#118
I’ve not been physically hurt but lessons were learnt :

A friend of mine once gave me an old computer (I don’t remember exactly but it was some random Compaq running Windows 98 and this happened in ~2010). I installed some distro in it but tbh, it was barely usable.

I decided it was a great opportunity to see with my own eyes what would happen when you intentionally « sudo rm -rf /* ».

Well, no surprise, it erases everything. Conscientiously. Recursively. Including the mounting point of the USB hard drive where I stored my hobbies projects. Including the network share of my other computer’s /home.

No real harm if you don’t account the dehydration from sweating.

Re: Have you ever hurt yourself from your own code?

#119

> Look at an audio file's waveform before playing it at max volume. This is important, but more broadly, practice good sound hygiene: wear headphones them around your neck until you know for a fact that it's safe to put them on your ears. Additionally, never play "new" sounds without remembering to set audio output to a tiny fraction of normal and increasing it after the sample is deemed safe. Musicians have this dri…

And if you have been exposed to a very loud noise, to the point where your ears are ringing (probably not from headphones, but like starting a loud bike in a garage or gun fire), go to hospital, as soon as possible. They can give you medicaments and prevent permanent damage (tinnitus).

Re: Have you ever hurt yourself from your own code?

#120
post #110
post #82

I wrote a layoff database for Nortel Networks from ~1998 to 2001. The way I got my notice of termination was while I was running some tests on the production database and needed a "negative" so I searched for a userid that was not present in the database: my own. When I saw my name in the list I called my manager and asked him what was going on. He said "Alex, why don't you head on home for the day and I'll call you…

Ouch... and what are the odds!

What are the odds of being laid off if your boss asks you to write something called a layoff database?
Post reply on HN