Live data from Hacker News

Have you ever hurt yourself from your own code?

blog.nikitas.link

291–300 of 432 posts

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

#291

Not my code, but somewhat related: I almost hurt myself when my friend used a sonic weapon on me in StarCraft. Back in the ancient days, my friends and I would meet every Saturday and go to an Internet cafe for a few hours of playing multiplayer games over LAN. Mostly StarCraft: Brood War, with a mix of Unreal Tournament and Quake 3 Arena. During the week, we'd all play these games alone, in single player, figuring o…

Hahaha okay I have to share a similar story now of where I've actually seen this weaponized. Also not my code but somewhat related.

Somewhere in the range of 10-15 years ago I played Guild Wars somewhat competitively. I was in one of the top-20 PvP guilds, and most of the top PvP guilds were pretty friendly with each other. Very rarely, we'd be good enough friends with an enemy guild that we would know their Teamspeak or Ventrilo server credentials.

So one day, we're doing our nightly battles like always and we get matched up against one of our rival / best friend guilds. A couple minutes into the fight, one of our Mesmers says

"Hey uh guys. So.... This might be a bit much. But I know their Voice Chat login. I could spam their server right now."

"Do it."

So we all hear the "user left" voice thing, 20 seconds later, "user joined". And apparently what he did was open the text-to-speech tool, meant for users without microphones, and entered "!@#$%^&*()_" except copy pasted a thousand times.

Which means the other guild heard from the robotic text-to-speech: "user joined. User Ha Ha Got U says Exclamation Mark, At Symbol, Pound Sign, Dollar......."

They're talking trash about how could we sink so low in the global chat in-game when suddenly we hear "user joined. User Ha Ha Got U Back says Exclamation Mark, At Symbol, Pound Sign, Dollar......."

There was a way to disable the text-to-speech on your client, but none of us knew that at the time. The text-to-speech rambling continued the entire night on both our servers and neither guild was able to speak. Both guilds thought it was hilarious but agreed never again.

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

#292
post #254

Earlier quoted context omitted.

There's lots of safety mechanisms like this in manufacturing. I've also seen "light curtains" which are essentially 2 bars on either side of a hazard. If anything crosses that plane, the machine stops automatically. There are also pressure pads. For one type, you have to be standing on for the machine to operate so that you are in a safe location when it starts. For the other, the pad covers the danger area and the m…

Another one is machinery where you have to "enter" the machine to do maintenance. Think industrial ovens. You're supposed to turn off the circuit breaker and lock it with your own personal lock that only you have the key to. That way no one can turn it on even if they wanted to. I've heard no one, under any circumstances is allowed to take the lock off. If the person leaves after their shift and forgets to take it of…

Not just equipment you have to enter. This is used in situations with "stored energy" or other systems that need to be turned off or otherwise disabled for safe maintenance. There are multi-lock hasps that can be used if multiple people have overlapping needs to lock out the system, and other devices such as valve handles covers, etc., that help with locking out components don't have a built-in place for a lock.

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

#293
back in the early 80’s I wrote 400kLoC in the course of a summer (APL/360, very short lines), printed it all out on green bar fanfold paper. Stashed the printouts in binders on bookshelves, the shelves collapsed and I got nasty bumps and paper cuts.

If you meant conceptual injury, I try not to dwell on it, but I once wrote a makefile that “clean”-ed up all the source code, source control, and the backups...just a cut and paste error, but soured my original exuberance about make. For life.

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

#294

Earlier quoted context omitted.

There's lots of safety mechanisms like this in manufacturing. I've also seen "light curtains" which are essentially 2 bars on either side of a hazard. If anything crosses that plane, the machine stops automatically. There are also pressure pads. For one type, you have to be standing on for the machine to operate so that you are in a safe location when it starts. For the other, the pad covers the danger area and the m…

Another awesome safety system is the SawStop which uses the conductivity of skin to monitor for contact against the blade in a tablesaw. If it detects contact a small explosive charge goes off, instantly sending a block of aluminum into the path of the blade, stopping it dead. Even a serious accident like leaning with an elbow against a moving blade is likely to result in little more than the scratch from hitting a s…

The biggest problem with the saw stop is that wood when it is even slightly moist can set it off.

So on a worksite if you are using lumber that hasn't had adequate time to dry the saw stop would trip even without any limbs being in danger.

Each time it would destroy itself, you would have to take the saw apart and change it which would cause a work stoppage.

What irks me the most is that the SawStop owner tried to create legislation that would have required companies to use his product.

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

#296
post #254

Earlier quoted context omitted.

There's lots of safety mechanisms like this in manufacturing. I've also seen "light curtains" which are essentially 2 bars on either side of a hazard. If anything crosses that plane, the machine stops automatically. There are also pressure pads. For one type, you have to be standing on for the machine to operate so that you are in a safe location when it starts. For the other, the pad covers the danger area and the m…

Another one is machinery where you have to "enter" the machine to do maintenance. Think industrial ovens. You're supposed to turn off the circuit breaker and lock it with your own personal lock that only you have the key to. That way no one can turn it on even if they wanted to. I've heard no one, under any circumstances is allowed to take the lock off. If the person leaves after their shift and forgets to take it of…

An example, not a nice way to go - https://www.bbc.co.uk/news/uk-england-merseyside-32050998

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

#297

Earlier quoted context omitted.

I feel obligated to add my silly mistake here. I was playing with SDR and was soldering together a small antenna for receiving ADS-B signals. I soon realised my electric soldering iron wasn't powerful enough so I nipped out and bought a miniature blow torch. The kind which are basically a big cigarette lighter. Having got it home I tried igniting it a few times and nothing happened. I held it up to my ear to try to h…

Hey, accident twins! I once had a Zippo lighter that was playing up - you could strike it and you could see the spark fly, but it didn't light. I sniffed the wick, yeah, definitely fuel evaporating off it. I struck the striker, yup, spark. Sniff, fuel, strike, spark. Sniff, strike and OF COURSE the thing lights up immediately, sending a cigarette lighter flame right up my right nostril. I'm told by bystanders that ha…

FWIW, when that happens just blow at it slightly.

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

#299
post #110

Earlier quoted context omitted.

Ouch... and what are the odds!

What are the odds of being laid off if your boss asks you to write something called a layoff database?

“We anticipate this being the last round of layoffs so we won’t need a layoff db guy any more.”

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

#300

I program CNC lathes in G-code for a living, so yeah. Dodgeing shrapnel is part of the job. A missing dot could cost thousands in repairs and result in loss of life limb. There is usually an aptitude test for machinists. Not everybody can do it fast enough safely.

Good machinists are something akin to lion tamers. CNC machine tools inspire a special sort of horror. They're mechanical beasts that growl and groan, ready to lunge at a moments notice with sharpened fangs, and will disembowel you if you let them. Working with a machine that will happily blow itself to pieces with a few errant keystrokes does wonders to focus one's attention. You learn to move carefully and delibera…

I managed to program a 'hard interrupt' into my skull so that before I press the play button I at least have brought into mind what I expect to happen... It usually works. You have to keep a lot of state in mind, and when you run multiple machines at once you do get immersed in the flow and time flies. It is a power trip when you're punching buttons with complete confidence like you're part machine yourself. A quick one to come down from too. :)
Post reply on HN