Live data from Hacker News

Have you ever hurt yourself from your own code?

blog.nikitas.link

241–250 of 432 posts

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

#241
post #82

I wrote a layoff database for Nortel Networks from ~1998 to 2001. The way I got my notice of termination was while I was running some tests on the production database and needed a "negative" so I searched for a userid that was not present in the database: my own. When I saw my name in the list I called my manager and asked him what was going on. He said "Alex, why don't you head on home for the day and I'll call you…

... as part of the bankruptcy proceedings they sold the technology to a bigger company. A developer improved the application by automating it. It could now send emails to the right departments automatically. The developer entered his own email as a test and was promptly fired by the new software.

Everyone who worked on the machine are now gone, yet it continues to do what it was designed for. That is until I found myself on the path of the machine...

Just kidding, but it would make a great origin story to this: https://news.ycombinator.com/item?id=17350645

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

#242
Almost. I was working on a web-controlled, high-intensity LED grow light (~1800watts of LEDs).

I was building a UI element which used a single slider to both control the output of the light and show its current position. First attempt had a bug which caused an infinite loop of the UI setting the light to 100%, then the light setting the UI to 0%, and back and forth.

The light was on my desk in an otherwise dark room. I (thankfully) don't suffer from epilepsy, but the the rapid, constant changing from incredibly bright to near darkness made me dizzy to the point where I couldn't really move.

Luckily a breaker tripped after a few minutes.

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

#243

Earlier quoted context omitted.

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.

What kind of server room allows you to bring food?

One that employs people who think eating mayo out of a jar on a ledge next to an expensive server is a reasonable way to work?

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

#244
post #82

I wrote a layoff database for Nortel Networks from ~1998 to 2001. The way I got my notice of termination was while I was running some tests on the production database and needed a "negative" so I searched for a userid that was not present in the database: my own. When I saw my name in the list I called my manager and asked him what was going on. He said "Alex, why don't you head on home for the day and I'll call you…

Echoes of Office Space right there. Did you happen to have a red stapler?

Fun fact: Swingline never made a red stapler, the one in Office Space was a prop produced for the film by the production crew. Office Space popularized it to the point where Swingline actually started producing red staplers after the release of the film to capitalize on the demand.

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

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

I had weird experience with valve index. I somehow miscalibrated it and the floor wasn't level. I spent maybe 20 seconds in VR with skewed floor and it felt horribly wrong. And the whole evening my sense of ballance and perception was broken not to be the point of falling over but the real world around me felt wrong. Only after I slept my brain fixed itself.

I had a similar early experience with Oculus Quest. I downloaded a "ISS tour" game, where you played as an astronaut, and had the full freedom of movement microgravity affords you. The "advanced mode" of the game allowed you to move around by grabbing handles or pushing off things.

This kind of unconstrained motion is notoriously hard on VR players, and I felt a bit uneasy the whole time when I was navigating this way, but then I made a mistake. I wanted to rotate myself, so I instinctively grabbed two handles and made a sideways hand motion, sending myself into a fast spin. I almost puked, and even after taking the VR headset off, I kept feeling nauseous for the rest of the day. Like in your case, my brain fixed itself when I fell asleep, and I woke up feeling fine.

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

#246

I usually think of this more in terms of "what's the reasonable worst thing that can happen, and then be prepared to compensate for it". e.g. - could cause this one page to fail to display - be ready to roll back, open the page asap once deployed - could bring down the entire website - be ready to roll back, maybe try running this during off hours - could delete the entire database - be ready with a backup to restore…

I’ve gradually developed the same instincts around mechanical and home improvement tasks. “How could this five-minute task turn into a multi-hour nightmare?”

Examples could be spilling a poorly placed can of paint all over the carpet, or having a nearly unobtainable fastener fall somewhere inaccessible (or where it can do damage).

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

#247
Back in mid 90's, as a fresh student barely having a year of programming under my belt but with a burning passion I was doing my summer practice (required by school) to a factory IT center. This factory was making a lot of large industrial stuff but during that period the current contract was to make propellers for big ships. Like 20m high one. And they used AutoCAD in the IT center to design those. For a Japanese client.

So the director of said IT center, seeing me how I dabbled in all kind of stuff with latest and greatest technology asks me "can you create a copy protection?". Nowadays I see this kind of question as a job on my freelancer marketplace and I always say to the potential customer "impossible, and if anyone else says otherwise are either incompetent or just want to hustle your money" but back then? my naive brain said "sure I can".

The IT center just acquired, at around 4000 USD each, a brand new line of 486 DX2 at a whooping 100 MHz which came with latest and greatest Windows 3.1 for Workgroups. Around 20 of them for all their design engineers to use ACAD at a faster pace. Serious business required serious tools. So I enter the scene with my protection. Which was a wrapper around the protected "exe" that on launch would ask for password, 3 tries and you're out. If password was provided then it would unwrap the good exe and launch it, otherwise the protection would kick in.

And oh boy, what a marvelous protection I wrote. First step - overwrite MBR with zeroes, you can guess to what goal. Second step - well, this one is a bit complex. You see back then you could directly access graphic cards DMA channel and write your own graphic driver inside your application because, well, DOS was like that. And poor Win 3.1 was no different either. And because of a physical layout that majority of board back then employed all the same you had an electrolytic capacitor near (like 2 mm only) a pin. Which said pin could go to up 25 KV if you were driving a certain pattern on your graphic card. Which would result in a shortcut between the pin and the capacitor. Which would ignite the resin that was there. Which would set your computer on fire. Third step - restart the PC.

So I am there with the director, head of designers and a bunch of other people to test my copy protection. I explain to them in what the protection consist of, and we test it. They wanted to test it on "acad.exe", so I wrap it up in my protection, delete the original and the new exe is launched. All good, password prompt, get in, Autocad is launched, they can do the work in peace. Except the director asks "and if I launch this wrapper tool separately, what happens?". "Nothing, it's just a tool and if you don't supply a parameter will simply exit". So the director does that, except he supplies a bogus parameter, by mistake, and not any parameter but ^U...you know, the combination that a Windows user will see at a command prompt when he does a mistake and presses CTRL+Z (Undo in Windows), because he pressed space and then wanted to back it off..and muscle memory for that action is CTRL+Z. And happily my tool tries to wrap around a file called ^U, but for some reason that file instead to be "not found", because I had this coded, was treated at "launch the protection". So here a little bug, launched my protection on a $4000 brand new machine. Of course MBR was zeroed instantly and then we see some stuff scrambled on the screen (protection no 2) and puff!! we're at BIOS reset. No fire!!! Why? because protection no 2 should've run for 10 seconds to allow the buildup of those 25 KV, but I was lucky because my dead ass brain introduced another bug and I was triggering the reset immediately.

I spent the next 3 days, me and the head of designers, rewriting the MBR by copy/paste via eyes and hands, using a hexeditor, by reading the MBR from another 486, and I was lucky since they all had identical configuration. That protection scared off the director, he never use it. And my ass hurt from the stick because $4000 during that time would've been both my parent income for an entire year.

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

#248
post #35

Earlier quoted context omitted.

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.

A shirt-tail relative worked on a metal press in the one-button days. It cost him part of a finger or two.

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

#249

Earlier quoted context omitted.

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

Shouldn't you do it the other way round? Set software volume to 90% and limit to safe levels with a good old potentiometer to be safe from any software issues?

yes, that's safer way how to do it.

However I use that 30% system volume for my day to day usage. When needed, I can always bring volume up.

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

#250

Earlier quoted context omitted.

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?

Not much. A floating GPS antenna on a self tensioner, tablet in a housing. And some buggy code :) Good enough for swim lane mapping and preventing holidays (unsearched areas). Another system we worked with used ultrasonic positioning from beacons, very accurate and covert.

Great story and it made me realize that usage of "holiday" is more general than how I thought of it (missing a spot when painting). Which led me to http://www.word-detective.com/2010/12/holiday/
Post reply on HN