Live data from Hacker News

Have you ever hurt yourself from your own code?

blog.nikitas.link

161–170 of 432 posts

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

#162

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…

> messing around with hardware vs software.

Back when I was doing some hands-on practical training in electric engineering school, we had to design a control circuit on some breadboard, the kind that in high school would lit a couple of leds, and maybe make a light fade, but here it was driving a big-ass train engine boxed in a 1.5m x 1.5m x 3m steel cage, right next to the bench where we pieced the control device together, barely arms length away.

While conceptually the same, "theory" vs "practice" and "command" vs "power" suddenly takes a whole new meaning where you're suddenly pushing several orders of magnitude more power than a puny 9V battery could. The buzzing of a hundred amps ready to flow inches away was chillingly ominous. You get a strange urge to triple check, quad check even, design and calculations before flicking the switch.

As we all successfully started up our bench, the rumbling of a dozen of these bare protomachines revving up in a hangar was eerie. The thought of them sucking in such an amount of overall power from the grid dizzying. I rarely get cold-sweat and goose bumps, but this was one of these days.

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

#163
post #129

It's extremely easy to hurt yourself with audio, it almost feels like cheating. Just regular audio work provides plenty of opportunities to do that. Here's a random note from Supercollider, a platform for audio synthesis [1]: > CAUTION: macOS system volume doesn’t effectively limit audio applications’ maximum volume. Extra care has to be put in working on this platform, especially with headphones, because programs ca…

this is when developing audio I have several precautions in place:

1) system volume level pretty down (usually 30%) 2) headphones volume in the middle 3) when testing something really broken I have my headphones not on the ears but on the neck

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

#164
In 2002 I wrote a paper on audio recording for my grammer school graduation and maybe once flipped through it since then.

When seeing the graphic of the wav file header I immediately recognized the same graphic I used in that paper.

Sometimes it's funny how memory works :)

Also interesting for how long content can stick around.

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

#165
post #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 ev…

So much for curiosity. I still believe it must have been worth it though :)

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

#166

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…

600mg of modafinil will make you... really wired, right? Did you notice that you were super productive that month?

tl;dr - Yes and yes.

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

#167
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…

tl;dr: Experience makes dangerously careless. Examples: quadcopters, lasercutters. I had a similar scenario with the same preconditions. In this case, one of the propellers came off and barely missed a face. This was a 10 inch hard plastic prop with some sharp edges. It could've taken an eye out. It could've caused serious cuts. It could've been a carbon fiber prop and caused _serious_ cuts. Of course it could also h…

> Examples: quadcopters, lasercutters.

Believe it or not, but you can find YouTube videos where the two are combined.

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

#168
post #154

Earlier quoted context omitted.

Yes, I also am dying to just talk to anyone about my work and what I am trying to do. I am very approachable and I CRAVE the most vicious, critical feedback that I can find. You can email me (email on profile) as the newsletter stuff will not be done for at least 1 month.

Well, this was finally the thing that made me get an HN account, because I am really interested in talking with someone about that kind of stuff. I can't see an e-mail in your profile though, and as far as I understand noone can see your email you supplied in the email field, and your about section looks empty to me.

Fixed

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

#169

I built a TENS unit with an Teensy and decided to skip a current sensor. Real switching power supplies regulate current too, not just voltage (a low Ohm shunt across one of the stages to an opamp that tells the PWM circuit to slow down the n-fet input pulses, in addition to the voltage feedback power gate). The funny part is: I didn't shock myself, I punched myself. I had the electrodes connected to my pectoral muscl…

Fortunately it didn't penetrate through your pectoral muscle and reach your heart.

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

#170
post #152

Easily. Got ear infection (!) from an unexpected, very loud random noise in my headphones (just one channel) as a result of a bug in my CoreAudio code. What does CoreAudio do if your floating point audio buffer is filled with random numbers? That's right, it plays random noise at the maximum possible level, bypassing the system volume setting. Why ear infection? I have no idea, but my GP explained that it's quite pos…

> it plays random noise at the maximum possible level, bypassing the system volume

but why bypassing the system volume? It does not make sense to me.

Post reply on HN