Have you ever hurt yourself from your own code?
51–60 of 432 posts
Re: Have you ever hurt yourself from your own code?
#52One example that stands out is a case where we had a heating element to seal plastic bags. It turns out those heating elements get ridiculously hot and only need to touch the bag for a fraction of a second. Naïve me felt that 3-4 seconds was a "reasonable" amount of time for a first attempt...it caught on fire.
Re: Have you ever hurt yourself from your own code?
#53Off to Aliexpress and Banggood I went. I ordered a carbon-fiber chassis, big strong motors, ESCs, 3-inch propellers, a FrSky receiver, a Devention transmitter, an STM32-based controller, giant li-poly batteries, and all the cables and fasteners I needed. Over the coming weeks the parts trickled in. Finally once the whole kit had arrived, I assembled everything, connected the TTL serial, built the firmware, downloaded it to the controller, and like the brilliant software engineer I am, plugged in the batteries on my bench at home.
Nothing happened. Those of you who have blown off fingers wondering why the firecracker under the Coke can hasn't exploded yet can guess what I did next.
I examined the chassis closely and began fiddling with the cables and connectors. Again, like the brilliant software NOT HARDWARE engineer that I am.
Evidently, I fixed the problem. Which caused four gigantic propellers to begin whirling around my hands and face. And four brushless electric motors to emit their usual high-pitched whine, which today I instinctively hear as them saying to me "You god damned idiot. You are so ours."
I was not injured. But that evening, I came close to slicing at least a couple things off my body. I hadn't appreciated the scale of the thing I was building, or the inherent risk in debugging it once I'd slapped it all together. I shelved the project for years, eventually giving it to someone at work who claimed to know his stuff when it came to drones. I hear he's doing fine.
Disclaimer: this story isn't about code or my own code. But I think it fits here because I approached dangerous hardware with the "build, run, see what happens" mindset of a software developer.
Re: Have you ever hurt yourself from your own code?
#54I was taking a class in software security and had a homework assignment to demonstrate a buffer overflow. For extra credit, we could have our exploit play music without invoking exec. My approach to this was fairly straightforward. Using ffmpeg I converted the audio to raw 16bit little-endian PCM. Then I appended this data to the end of my exploit. When my exploit runs, it sets some ioctls on /dev/audio then starts copying the data from the end of the file to /dev/audio causing sound to play.
As you might have guessed by reading the article, I had an off-by-one error, causing the music data to be misalligned and loud static to play. Fortunately, my system volume was not particularly high, and I was happy to even get sound to play. I never figured out where I made an off-by-one error, since I had just assumed that the static was caused by an alignment issue that could be "fixed" by adding a 0 byte to the start of the audio data.
Re: Have you ever hurt yourself from your own code?
#55Earlier quoted context omitted.
tl;dr - too much modafinil. Yes, I have Crohn's and I do not like to take the meds or listen to the doctors. This is NOT AT ALL SOMETHING I RECOMMEND, PLEASE DO NOT ATTEMPT IT. Crohn's is an auto-immune disease and the main class of drugs that is used to treat Crohn's like mine (long term) are called TNF inhibitors or TNF blockers. TNF alpha triggers the production of several immune system molecules, including interl…
Wow. I both respect you and think you’re absolutely nuts. Since you seem to be into experimental treatment, have you ever tried helminthic treatment? https://www.healthline.com/health/crohns-disease/hook-worms
I was running an outpatient program for alternative therapies before I knew that you cant just do that, you need insurance and stuff. So now I am making my own Medicare/Medicaid and hope to bring all of my work into a single payer system. There is no way I can pull this off, my only hope is to attract the attention of some really smart people that will tell me why and how I am a moron and how to fix it, lol.
I would love to talk about my work with someone but i'm kind of still scared because its not in a state that is 100% ready for end users and I know everyone is just going to laugh at me, lol. Hell I laugh at me. But I worked at goop and i know more than everyone there so i'm kind of like ... fuck it. Just code / Fierce Nerd blah blah .
Right now I am having fun exploring the world of BHM HMS modules, its far less regulated than I thought it would be which might not be a good thing, but we will see. I am going to do a "Show HN" soon but I want to publish feedback from my active patients and providers first.
Re: Have you ever hurt yourself from your own code?
#56A few years ago, I ordered the cheapest six-axis robotic arm from ebay for about $100 that came with basically no software or motor-driver boards, so I did it all from scratch with a PCA9685 board, a basic kernel driver and some very hacky scripts from user space. One day I had some friends over for a glass of wine, and wanted to show off my creation. I invited them into my "lab" and placed my wine glass down on the…
That's a good story. Yeah I feel like there must be soo many more opportunities to physically damage/harm something from robotics than software alone.
One key observation, though, when working with code is that the machine becomes so close to predictable that it's more dangerous than if it were unpredictable. 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 the machine will take off.
There are definitely two kinds of safety domains, one applies to manually operated tools where the operator of, say, a knife is responsible for their own safety - if they cut themselves, they're at fault, not the knifemaker. There's another kind of safety engineering where if the machine takes off 'by itself' while an operator is in the way it's the machine designer's fault for not stopping that from happening, the operator can't be expected to know what's going on.
The latter should become more common as computers continue to permeate everything we use - that cordless drill is no longer controlled by the operator with a trigger switch that connects power to a DC motor, it's a brushless motor driver with an analog input sensing the position of the trigger and the EMF of the motor, and the charge state of the batteries, and who knows what else. Bump a sensor and it might take off, you don't know why it does what it does.
I'll continue to make my automated cells as safe as I can, but don't trust code that's not so simple you can be confident of how it works.
Re: Have you ever hurt yourself from your own code?
#57Earlier quoted context omitted.
Wow. I both respect you and think you’re absolutely nuts. Since you seem to be into experimental treatment, have you ever tried helminthic treatment? https://www.healthline.com/health/crohns-disease/hook-worms
Not OP, but I have done this for allergies. N. Americanus, 10-15 eggs at a time. No side effects other than an awful itch 12-36h after administration. Been great for my allergies. I've cut way down on fexofenadine. I also live with a cat and a poodle and only really feel symptoms if I literally rub my face in the cat, or groom the dog inside without a mask.
Re: Have you ever hurt yourself from your own code?
#58Dropped to 10 meters, set the datum and started swimming, going well until I crossed into a negative quadrant. My beautiful track went haywire/dead.
Then I swam around trying to get back "into" the positive quadrant, I couldn't find it and consequently couldn't get back to the datum. When I surfaced I couldn't see the dive boat!
After some time contemplating my life/coding choices for literally jumping in without thorough testing, I heard the Zodiac inflatable buzzing around the rising waves looking for me.
Back on the boat I discovered that I had only coded it to work in the positive axis from the datum. In the other axis the location was undefined.
Re: Have you ever hurt yourself from your own code?
#59A few years ago, I ordered the cheapest six-axis robotic arm from ebay for about $100 that came with basically no software or motor-driver boards, so I did it all from scratch with a PCA9685 board, a basic kernel driver and some very hacky scripts from user space. One day I had some friends over for a glass of wine, and wanted to show off my creation. I invited them into my "lab" and placed my wine glass down on the…
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.
Re: Have you ever hurt yourself from your own code?
#60Earlier quoted context omitted.
tl;dr - too much modafinil. Yes, I have Crohn's and I do not like to take the meds or listen to the doctors. This is NOT AT ALL SOMETHING I RECOMMEND, PLEASE DO NOT ATTEMPT IT. Crohn's is an auto-immune disease and the main class of drugs that is used to treat Crohn's like mine (long term) are called TNF inhibitors or TNF blockers. TNF alpha triggers the production of several immune system molecules, including interl…
Wow. I both respect you and think you’re absolutely nuts. Since you seem to be into experimental treatment, have you ever tried helminthic treatment? https://www.healthline.com/health/crohns-disease/hook-worms