Live data from Hacker News

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

news.ycombinator.com

121–130 of 289 posts

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

#121
Mid-90s, a very large cell phone company at the time, working on a car phone (the head units had their own microcontrollers).... Discovered that the interrupt service routine was calling the reset vector instead of returning from the keypad interrupt. The original author apparently didn't understand how it was supposed to work, and a simple RTS would eventually overflow the stack....so on every keypad interrupt the whole code flow started over from reset. Worked surprisingly well.

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

#122

In 1997, I worked with FedEx to build an integrated order management system for the e-commerce company that I ran with my dad. Orders would come into my Perl-based order management system and the pickers would use the web interface to print a packing slip. A bash script would generate a Postscript barcode and then my Perl would generate a packing slip in LaTeX that included that barcode. The LaTeX-generated PS file w…

You should have sold books, and expanded to bicycles later.

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

#123

Earlier quoted context omitted.

Tons of asp (and asp.net) sites are restarted on a regular basis to prevent crashes. The source of most of these problems are never known.

Actually, IIS automatically restarts the worker thread once a day by default; meaning most developers are unaware of memory/resource leaks that don't end up causing a crash within 24 hours. Got called in to look at quite a few "random" issues that turned out to be resource leaks that only showed when the site was under enough stress for it to hit the brick wall within the 24 hour recycle period.

The default IIS app pool elapsed time based recycle interval is 1740min, or 29hrs. 29 being the smallest prime over 24. Seriously.

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

#124
Early 90's. Big fortune 500 website running on a single Pentium 90 desktop PC. We had to remove the case on the computer to allow for more cooling and put a consumer grade house type fan next to it. Otherwise, it constantly overheated and would reboot.

So real data center, racks, etc. But this cheap ass, caseless, P90 on a shelf with a household fan blowing on it, while making millions of dollars.

I was mystified why there was no budget to use a real 1U server. The internet was pretty new at this time, but it was driving revenue.

Also, side info, this caseless P90 still exists. Sitting in my friend's cubical, naked and caseless. Pure glory. It's a hero. Tech stack was NCSA webserver, C, and Ingress plus daily updates with a 1.44MB floppy disk.

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

#125

Sony PSX (original playstation) port of a PC title that I worked on, we needed to have a physics thread run at a predictable and consistent rate regardless of what the rest of the game was doing. Sony Japan said pre-emptive multi-tasking wasn't possible. Found a way to hook the vertical blank interrupt (shades of old Atari 8-bit programming), push all the registers onto the stack to create a setjmp/longjmp-ish way to…

I think your solution is better than running a background thread.

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

#126
post #108

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 use AutoHotKey to remap it to launch TotalCommander.

Does AutoHotKey function on the login screen?

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

#127
post #96

An external vendor delivered a new static marketing site written in PHP. Info sec team wouldn't let us install mod_php on the publicly facing servers and the vendor needed more time/money than the budget and timeline allowed to change it. A coworker stood up a local server and wrote a script to periodically crawl it and push changes out to the publicly facing apache servers. It might still be there for all I know.

Thats actually not so bad imo, it's fairly common to build a site in wordpress just for the CMS, then convert it to static HTML periodically and rehost it straight from CDN edge servers.

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

#128
I work on a .NET application that runs multiple download HTTP requests at the same time. We recently added support for client-side certificates to authenticate to a customer controlled server.

When Windows is configured in a very high security manner, the user needs to manually give our application permission to use the certificate once during the lifetime of our process.

We hit a bug in .NET where, if we start multiple HTTP requests at the same time that use the same certificate, and the user needs to approve our use of the certificate, the user will get multiple request dialogues.

The fix is a very convoluted lock statement, because if the user says no, the other HTTP requests that would be started at the same time need to be aborted.

What makes the lock statement more complicated is that we essentially need to lock right before the HTTP request starts, but then unlock when we are reading the stream. This means that the first time we use a client-side certificate, we have to disable multi-threading until we know that the client site certificate is approved by the user.

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

#129
post #42

Earlier quoted context omitted.

I used to use autohotkey to send an F13 key press every couple minutes to avoid lockout on a work computer where I wasn't allowed to increase the timeout

Wait is Function keys above F12 still addressable?

Certainly, my keyboard still has those buttons and I still use them
Post reply on HN