Live data from Hacker News

Ask HN: Weirdest hack that you ever saw in production?

news.ycombinator.com

141–150 of 289 posts

Re: Ask HN: Weirdest hack that you ever saw in production?

#141
post #120

I once worked maintenance on a large C++ program used in production by a lot of customers. It was odd in several ways, but the feature that stands out in my mind was the numerous classes that were not defined anywhere in the source code or libraries. If that sounds unlikely to you, it sounded unlikely to me, too. I wasted a lot of time trying to figure out where they were defined. I couldn't ask the original author o…

I have a simple rule about adding "magic" like that- if you can't make it immediately obvious to the readers of the code just what it is the magic is going to do, don't do it. AOP Java lead me to that rule because of too many obscure annotations that did insane things to help one developer avoid some minor nuisance.

I agree with that rule.

Sometimes you have to get the job done in a "less than ideal" way. But a lot of documentation/comments should be left to justify and more importantly explain how it works.

Re: Ask HN: Weirdest hack that you ever saw in production?

#142
post #112

Earlier quoted context omitted.

Do you have any more interesting stories of working on game development for the PSX?

I only worked on the one title (NASCAR Racing) and so my war stories are limited, but I'll give you what I recall. Original dev boards were 3 full length ISA bus (IIRC) boards and were a PITA to get installed, all the IRQ conflicts resolved, etc. Later dev environment was a "blue PSX" (basically a production PSX with blue plastic that could run non-copy protected discs). I think the ISA boards had more memory than th…

Funny you mention NASCAR Racing. Was this the 1994 MS-DOS title? How were threads even done in an OS like DOS? I'm guessing this was something DOS/4GW gave or along those lines.

Re: Ask HN: Weirdest hack that you ever saw in production?

#143

This was probably not considered a hack when it was implemented but at some point in the early 2000s someone deployed two binary programs on an old Compaq rack server running RedHat Linux of some version. I think they're called lpr and lpd. But I've tried to find their source and it's not in any major printer packages. By running strings and hexdump on them I think my co-worker finally managed to trace it to a packag…

https://en.wikipedia.org/wiki/Line_Printer_Daemon_protocol

Re: Ask HN: Weirdest hack that you ever saw in production?

#144
I worked for a chain of medical clinics in the early 2000s in Florida.

Everything was going digital. We had a “remote” office across the street that didn’t have internet access and it was really expensive to have lines installed.

I don’t remember what the device was called but it was some sort of satellite dish. Our network admin had ordered them and installed them on the roof tops of both buildings and we could provide access via this link.

It was pretty rad to me. But then the intermittent bugs started creeping in. The remote site used some windows 2000 dumb terminals and throughout the day all of them would disconnect at the same time - every day.

It was very random and they’d automatically reconnect after a few seconds to a few minutes - always.

Well, I was the new guy / intern grad. And so after a few weeks of debugging different things inside and moving the dishes around to make sure they were exactly pointed at each other my boss rolls into work with a beach chair and an umbrella.

I looked at him and asked if he was taking off early and hitting the beach and he goes “no you’re debugging”.

We set up the chair and umbrella on the roof. I sat up there with an walkie talkie and the remote site had the other one. My job was to sit until they radioed to see if anything was obvious interrupting the connection.

Then a semi truck stopped at the red light.

Re: Ask HN: Weirdest hack that you ever saw in production?

#145
post #8

I worked at a place that had a large, distributed terminal network running on something like OSF or DEC Unix. It was 2001 and the thing was on life support while PCs were being rolled out. I was helping to rack my new database servers, which was next to this big lab table/shelf combo with like 16 terminals on it. When pulling a cable I banged my head on the table, then this big book fell on my hand. About 10 minutes…

I've got one of those from "Only on WIndows" series. One of my colleagues uses WIndows and tends to remote in from home. Unfortunately when a cleaner cleans the office after hours she sometimes accidentally hits the CAPS key and he can't log in anymore remotely. His solution was to rip out the CAPS key and cover the hole with duct tape.

Not a hack, but once we couldn't figure out why a printer dropped off the network.

Turns out the cleaners were thorough enough to clean deep down behind a desk and turned off a surge protector that a 5-port network switch was plugged into.

Re: Ask HN: Weirdest hack that you ever saw in production?

#146

Earlier quoted context omitted.

I've got one of those from "Only on WIndows" series. One of my colleagues uses WIndows and tends to remote in from home. Unfortunately when a cleaner cleans the office after hours she sometimes accidentally hits the CAPS key and he can't log in anymore remotely. His solution was to rip out the CAPS key and cover the hole with duct tape.

I do this, too. The first thing I do when I get a new keyboard is to remove the caps lock key. I never used it in my 20 years of PC usages and I don't get why it's still there. Back in my CounterStrike gaming days I would also remove the Windows key because it would crash the game when accidentally pressed.

DON’T remove caps lock!!! Use it as an application switcher!

Some of my most used shortcuts:

Caps + C = Chrome

Caps + S = Spotify

Caps + A = Atom

Caps + T = Terminal

+1 for removing windows key if gaming

Re: Ask HN: Weirdest hack that you ever saw in production?

#147
Not the weirdest, but weird nonetheless: https://github.com/ckeditor/ckeditor-dev/blob/major/core/too...

Interestingly enough as recently as in 2016 none of the browsers' devtools were prepared for such a usage and would hang if you set a breakpoint inside any of the "tried" functions.

Re: Ask HN: Weirdest hack that you ever saw in production?

#148

Earlier quoted context omitted.

I only worked on the one title (NASCAR Racing) and so my war stories are limited, but I'll give you what I recall. Original dev boards were 3 full length ISA bus (IIRC) boards and were a PITA to get installed, all the IRQ conflicts resolved, etc. Later dev environment was a "blue PSX" (basically a production PSX with blue plastic that could run non-copy protected discs). I think the ISA boards had more memory than th…

Funny you mention NASCAR Racing. Was this the 1994 MS-DOS title? How were threads even done in an OS like DOS? I'm guessing this was something DOS/4GW gave or along those lines.

Yes. This one: https://en.wikipedia.org/wiki/NASCAR_Racing

I was tech lead on the PSX title and contributed to the PC NASCAR Racing 2 and Grand Prix Legends title. Many of the core programmers from Papyrus went on to form iRacing.

I seem to recall that the DOS titles were 4GW. We ran the physics and joystick read (time a capacitor charge through a variable resistor in the controller) together (and maybe the sound synthesis as well)

(We had hacks to detect running under Win95 and then walk the app, touching each page periodically to keep Windows from paging us out.)

Re: Ask HN: Weirdest hack that you ever saw in production?

#149
post #67

In my startup days, we were working on a proof of concept with a really big bank. Because of their security rules, we couldn't have direct access to their systems - so if we wanted to do something remotely, we would have to start a webex, they would join and share their screen, and give us remote control. This worked great, except if we wanted to work over the weekend, since if we left the screen alone for more than…

There's also this [1] I found when I had to opt out of a crazy work-enforced screen lock timer. (like 3m) [1] https://archive.codeplex.com/?p=mousejiggler

As someone who enforces screen lock timers for compliance, if I ever found someone was using any of these hacks, my solution would probably involve writing a script to automatically lock their screen every five minutes regardless of activity until they agreed to knock it off. :P

Re: Ask HN: Weirdest hack that you ever saw in production?

#150

I once worked maintenance on a large C++ program used in production by a lot of customers. It was odd in several ways, but the feature that stands out in my mind was the numerous classes that were not defined anywhere in the source code or libraries. If that sounds unlikely to you, it sounded unlikely to me, too. I wasted a lot of time trying to figure out where they were defined. I couldn't ask the original author o…

Honestly, that sounds pretty normal, or at least ok, to me. Auto-generation of code is one of my primary daily tools, and I think it's just right for whole categories of problems. I currently generate a good third of my compiled sources, and also generate a rudimentary typescript library out of my source code to be used by the my colleagues.

That being said, I usually work in Scala which provides language-based tools for that, so it definitely helps with avoiding the "dark magic" sentiment you may have had.

But why was it done that way ? It reduces boilerplate, copy-paste errors, code duplication, in ways sometimes not made possible by inheritance or composition.

Post reply on HN