Live data from Hacker News

Have you ever hurt yourself from your own code?

blog.nikitas.link

141–150 of 432 posts

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

#141
post #53

About seven years ago I got a bright idea to build a quadcopter. I had experience with little $25-50 drones that bumped around the house with their fragile one-inch propellers, which obviously qualified me to build and pilot something significantly bigger. Off 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…

I built one too, and the first time I powered on the motors I felt like I was staring at four unguarded blenders and thought: wow, people actually handle these things while they are running. Made me very nervous for a long time, especially the first few flights (or attempt at flight). Now I twitch whenever I connect the battery and the FC makes them jerk a little. I know they aren't armed and failsafe is active and a…

Not sure if you want to hear this, but please don't entirely trust any arm/safe system. I've had to debug one when it failed. Original dev: "impossible... show me... huh?!".

(It was some faulty hardware. Dont remember the details; it was a non obvious issue with one FC. Wasn't worth fixing the hardware, I discarded it.)

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

#142
post #124

Earlier 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…

> do not manually create my mixtures because I do not want to know which version I am on, Double blind testing, in the "now unable to see in both eyes" sense?

LMAO, this was really funny. I did not really think of it as blind I just wanted to remove confirmation bias. I saw so much of that at goop. I have no formal training and I just learn on the fly and try to execute. I have no doubt there are better and smarter ways, I would love critical feedback here or via email.

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

#143

In the 90s I implemented a PWM motor controller in asm, for a robot with enough power to accelerate hard on soft grass, outside. Robot was rather over engineered by a team mate who previously worked on automated farm machinery. Tested the microcontroller on the breadboard with an oscilloscope, all looked well: nice PWM shapes. For the first integrated test on the robot, I high-centered it on some bricks so the wheels…

Ouch. I'm curious what would cause the PWM output to invert under such condition? Was there a special case built in for <2% that was coded incorrectly, or did it emerge from something else?

My timing bug, if I recall correctly. I was very inexperienced. I got better but never great at that kind of development.

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

#144
A decade ago I wrote firmware for a printer company. One of the cases we needed to handle was to check if the print head would go back to the home position if I block it with my hand. Being the new guy and wanting to follow instructions I did literally just that. Later on I find out that the QA guy who wrote that test case was just messing with me. The other devs used a pen.

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

#145

A 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…

We had a scary and quite overspec'd arm acquired cheaply in the early history of a startup. We we're able to control it via the serial interface, but similarly to you we had no documentation and everything had been reverse engineered. The thing was surrounded by e-stops.

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

#146
post #97
post #77

Not sure if this qualifies as my own code but I have a highly modified 3D printer, I had upgraded to more modern trinamic stepper drivers which have sensorless homing and I had forgotten to set a sane value for the torque limit to let the drivers know when it had hit the axis' limit when I ported over my existing firmware config and like an idiot decided to use my finger to test it... I learned that day even small st…

Are your finger(s) okay?

Thanks for asking, they are. Just nasty bruises on both sides of my fingertip and a bruised ego.

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

#147
Bugs like these are the reason why I always turn the volume way down before listening to audio that newly written code generates. And even if you know that you're listing to audio that's OK, try to keep the volume low. Your ears will thank you in the long run. It's easy to have headphone levels to high and slowly damage your ears with long listening sessions.

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

#148
post #79

It didn't happen to me personally, but I worked on a flight simulator. Not the fancy kind which moves around but it still used hardware from the real cockpit, including the stick and its actuators. And if the controller is not properly initialized, the stick will slam left and back, hitting the leg of the guy in the pilot seat. For men, it can be much worse... Another bench had a real aircraft gun mounted on a turret…

[deleted]

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

#149
post #35

A 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.

Some small metal pressing machines for example have two buttons, one on each side of the machine. You have to push them both for the machine to operate. This means your hands can't be squished.

Or a dental x-ray machine has the final "run" button in the hallway so the nurse taking x-rays must go there to do it, so they don't get repeated exposure.

Post reply on HN