Live data from Hacker News

Have you ever hurt yourself from your own code?

blog.nikitas.link

61–70 of 432 posts

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

#61

Is there a reason why you might want to mix endianness within a file format? Wouldn't it just be extremely error prone as demonstrated in the article?

I've had this come up with composite data formats. If your data formats includes already existing data formats and they do not all agree on an endianness you are basically stuck with being inconsistent about it.

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

#62
post #47

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…

Wow. That’s... bold. One suggestion, maybe have it email your dosing to a trusted person so a human being can at least establish whether the numbers look approximately right? Although that still doesn’t cover any mechanical failures unless you’ve got a rock solid redundant closed loop setup. To be honest, the whole thing sounds ill advised, but I guess you already knew that.

I do not I do not even know who I would send it to honestly. I am obsessed with this work now which is why I am expanding my provider network to other countries.

I found that things I think are "experimental" are much more common overseas probably due to a lack of regulatory controls but the result is that there are really smart people with a plethora of knowledge about these things as where my western doctors were not that knowledgeable or willing to really listen.

If you have any suggestions it would be awesome if you could email me.

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

#64
Ah yes, off-by-one errors when filling a PCM buffer can be loud. Speaking from experience, it’s similarly loud when you accidentally fill an integer PCM buffer with floating point data.

My story: I physically broke an indoor bike trainer by writing a mobile app.

I was fed up with the rent-seeking subscription-based app that the vendor provided for the machine, and wanted to write a simple app to be able to change the training parameters over Bluetooth. It worked via a standard BLE fitness machine protocol, so I’ve spent a few hours creating a prototype iOS app for interacting with it via the CoreBluetooth framework, based on the free docs from Bluetooth.org.

Everything worked wonderfully, up until the point of adding a slider to the UI for changing the “hardness” parameter of the current session. You see, changing the hardness parameter adjusted an electromagnetic braking mechanism inside the machine, and the slider I’ve put on the UI was set to its “continuous” mode, which meant that it was generating a steady stream of change events while dragging, basically at the framerate of the phone (60 fps). The designers of the machine probably didn’t anticipate that someone would be flooding it with 60 “set hardness” commands per second, and the actuator doing the adjustment simply broke from the overload after a few seconds of me dragging the slider…

I’m not sure exactly which part broke, but there was a loud crack from inside, and the braking power could no longer be adjusted at all. I could have disassembled the machine, but it wasn’t even mine (it was lent to me by my brother-in-law to try it out), and was still under warranty, so I gave it back and told that it spontaneously broke :^)

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

#65
post #7

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

Whoa that's interesting! Glad you're alright. Where was the pain?

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

#66

I 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?

#67

I mean, they should have been removing zero byte-pairs, not zero bytes; removing zero bytes risks shifting whether you're off by one or not!

This would be the case for 16 bit samples (which all of my files were, and most WAV files are nowadays), but for 8 bit samples, it would be correct to remove single zero bytes. Basically I just have to follow the spec more closely

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

#68

Earlier 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

Yes, it is one of the therapies I am currently studying as I have had success with it but it does not scale. The reason I want to do this is so that I can create a Medicare/Medicaid E2E single payer solution that provides these solutions to everyone. Even people on the lower socioeconomic rungs. The pandemic was really hard for me and I have been behaving very recklessly in terms of my own health but I have been very…

As someone with autoimmune issues who rarely checks HN but is very interested in your work, do you have a newsletter I could sign up for or an email address I could reach out to to receive updates on your work?

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

#69
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.

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.

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

#70
post #47

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…

Wow. That’s... bold. One suggestion, maybe have it email your dosing to a trusted person so a human being can at least establish whether the numbers look approximately right? Although that still doesn’t cover any mechanical failures unless you’ve got a rock solid redundant closed loop setup. To be honest, the whole thing sounds ill advised, but I guess you already knew that.

I'd imagine having a strict boundary between "software thing that calculates how much you need" and "robot thing that mixes stuff together" would help, and you'd set up guardrails and unit tests on the calculation part.

Worst case you could have physical guardrails such as "can't take more than x mg per week" in the form of only supplying a certain amount of raw materials and topping off intermittently. If you run out you find out sooner instead of a month later.

Post reply on HN