Have you ever hurt yourself from your own code?
71–80 of 432 posts
Re: Have you ever hurt yourself from your own code?
#72I drilled down on the offending database record, looking in the demographic data to see if something was wrong. After staring at it for a few moments, I realized that the demographic data looked... familiar. And then it hit me: my own enrollment record from that day had been left in an inconsistent state in the database that my program was pulling the study data from, due to the failure to collect a blood sample. This resulted in my program crashing on the inconsistent data. So I had to add a special case to my program to handle my own failed study enrollment from earlier that same day.
Re: Have you ever hurt yourself from your own code?
#73For the first integrated test on the robot, I high-centered it on some bricks so the wheels would turn freely, on the bench. Didn't want to deliver too much torque with wheels up, so asked for 1% PWM duty cycle. The robot leaped into the air, tearing off its umbilicals, hit the floor spinning and generally smashing shit up, including bits of me.
Debugging revealed that the output PWM duty cycle was inverted when commanded <2%, so my 1% command was 99% power. My breadboard tests had never gone below 3%, which I guessed was the minimum to overcome stiction on soft ground. Poor robot. The chunks out of my hands were the price I paid to learn to test important corner cases.
Re: Have you ever hurt yourself from your own code?
#74Re: Have you ever hurt yourself from your own code?
#75A 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.
Back in 2002, I was getting a package with a brand new Pocket PC (smartphone without the phone, running Windows). And I really wanted to know when it was delivered, but the UPS guy would regularly leave packages on the porch without ringing the bell or anything.
This was before you could get delivery alerts or anything like that. But I had a spare laptop with an integrated webcam (wow!), and I'd figured out how to make it run actions on motion detection.
My plan was to point the laptop at the door, and eject the CD drive when it detected motion. The tray of the drive would push a water bottle off the table. That would land on a seesaw, which would launch a deck of cards in a hard plastic case at the door and make a very loud noise.
It's unclear why I couldn't just play a really sound on the speakers instead. Anyway, I tested the program by standing in front of the laptop and waving my hand.
It worked perfectly! The CD tray ejected, and I watched as the water bottle slowly rolled off the table. It dropped onto the seesaw...... and instantly launched a hard plastic deck at my face and got me right between the eyes.
Never again have I been in so much pain and also so excited about my code working perfectly at the exact same time.
Re: Have you ever hurt yourself from your own code?
#76I have. Back in early days of Oculus, I was using one of the development kits (DK2?, maybe DK1) and making something in Unity. The Oculus had one screen, with lenses over the left and right halves. To give depth perception, it renders a view for each eye, and shows them in a vertical split screen. Some script had a bug, and none of that happened; Instead it simply stretched a normal view across both screens. I put th…
Re: Have you ever hurt yourself from your own code?
#77Re: Have you ever hurt yourself from your own code?
#78I was building an underwater mapping GUI, a quick SCUBA dive to do some testing before the weather closed in whilst at sea in the GBR Australia. Dropped 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 t…
Hardware projects are so far from my norm, something like this is hard for me to imagine. What kind of devices are involved in scuba tech like that?
Re: Have you ever hurt yourself from your own code?
#79And 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 that is also controlled by software. No ammunition of course, but it is still a big metal pipe swinging around at great speed, thankfully, that one was fenced because that's the kind of thing that can easily break bones, maybe even kill you on a bad hit.
Re: Have you ever hurt yourself from your own code?
#80Earlier quoted context omitted.
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.
Anything with an actuator, really. I'm a controls engineer, we work with all kinds of hazards and it's my responsibility to run the risk assessment that makes sure no minimum-wage operator gets harmed because of our machine. People are the squishiest, weakest, most sensitive part of just about any shop, so there's a lot of risks to assess! One key observation, though, when working with code is that the machine become…
A friend needed a valve cover gasket changed on his Honda, and his wife needed to use the car for her Uber runs that night. He came over and instead of our usual hand tools I put a socket adapter on my 20V drill to speed up disassembly. I handed the drill to him and told him "start on the lowest torque setting, and move up in small steps."
I turned around to grab more tools from the toolbox. A minute later, I heard a loud noise. I turned to see the car's windshield cracked and a shocked look on my friend's face.
My friend was used to his renter's power drill. He hadn't anticipated how much torque a modern contractor's drill outputs and set the torque to the maximum setting. On the third valve cover bolt, the drill had caught on the bolt head and spun my friend around, smashing the battery into the windshield.
There's a piece of paper taped to me toolbox called "List of things may not attempt unsupervised." It gained a couple of entries that day...