Live data from Hacker News

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

news.ycombinator.com

51–60 of 289 posts

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

#51

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…

I use a posh script like this when i dont want the computer to lock. $ws = New-Object -COM wscript.shell; while($true){ $ws.SendKeys("j"); Sleep 60;} Ive used it for demos that way the computer doesnt lock before the demo starts, its pretty short and easy to remember. Also on windows if you spam SendKeys("{Left}") everything you type is backwards and when you hit the windows key it freezes the computer in an interest…

Try this: http://www.zhornsoftware.co.uk/caffeine/

Use it all the time when working from home/moving around and I don’t want my laptop to lock every 15.

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

#52
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 was sent over a private T1 from the datacenter to the warehouse printer. The order would get picked and put in a crate with the packing slip. The barcode was then scanned at a FedEx shipping station by our shipping guys. That would trigger a script on the FedEx machine (written in Visual Basic, I think) that would make a call to PostgreSQL over Windows ODBC to pull the shipping address and shipping method. As soon as the workstation populated this info, it would spit out a FedEx shipping label and the VB script would then trigger an INSERT back into Postgres with the tracking number. This triggered another Perl job to mark the order as "shipped" and would send an email to the customer with the tracking number.

TLDR: we had real-time order tracking with full shipping and billing integration in a tiny mail order bicycle parts business in 1997.

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

#53

Using a Remote Access Object to proxy calls between 32-bit and 64-bit code. Instead of rewriting any of the original ASP code, the lead architect made a DLL that would provide .NET 2.0 functionality to the ASP code. This was in 2014. The DLL was 32-bit and predictably ran out of memory every 30 hours. We created a scheduled task to restart the service every 24 hours, what a band-aid.

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.

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

#54
post #49
post #9

5F3759DF a.k.a. fast inverse square root [1] in graphics programming. [1] - https://en.wikipedia.org/wiki/Fast_inverse_square_root

I'd love to know who left those comments for Quake III Arena in your referenced Wikipedia article. I had a good laugh.

>I'd love to know who left those comments

The legend himself, John Carmack.

Fast inverse square root is really the perfect example of black magic in programming.

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

#55

my dad put a rubberband on an ibm mainframe printer in 75 to make it work while ibm showed up to fix it. They came in and didn't get it to work. So my dad as he needed to print millions of water bills on time put the rubberband back in and ran his job.

My dad had a similar thing with his car. An old jalopy, I don't remember exactly what was wrong, something slipped out of place in relation to the engine, miles away from any support.

He happened to have clamps in the back, put a clamp on it and a few rubber bands for good measure. When he finally got to the garage they looked at it, laughed, then suggested that he keep it that way, given that the parts for the car were rare and the fix was reasonably expensive. I believe that he ended up driving on that for a couple of years until the car broke down from an unrelated part failure.

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

#56

Here's a late version of Encarta. https://goo.gl/6uX4Qu Do you see that plain-looking dropdown menu with the rounded orange highlights? That is Internet Explorer. Just this one menu. It's an in-process instance of Trident, IEs old HTML rendering engine. So that little window is the equivalent of somthing like chromium embedded. I don't know why that menu is an instance of IE's HTML renderer. Someone wanted to style i…

That is just insane. Separate rendering engines for each tab?

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

#58
post #44

"Don't delete this comment or the production server will crash." Tried it, did as advertised. Apparently the website went through a proxy that reflected over the code, using that comment as a hook to inject some sort of functionality.

I've personally set this kind of thing up. Inherited an old PHP site for a webdev contract, and a couple weeks into development (before any of my code had made it to prod), the server starts hanging randomly, or spitting out seemingly random errors on every request. I was told in no uncertain terms by the client that I had to fix the server hangs within 48hrs I'd lose the contract. This was in a million+ LOC custom W…

The Atlantic has a magic PAGE_COMPLETED comment that we used when I was there to tell the CDN whether to cache a page or not. I imagine that’s common.

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

#59

Here's a late version of Encarta. https://goo.gl/6uX4Qu Do you see that plain-looking dropdown menu with the rounded orange highlights? That is Internet Explorer. Just this one menu. It's an in-process instance of Trident, IEs old HTML rendering engine. So that little window is the equivalent of somthing like chromium embedded. I don't know why that menu is an instance of IE's HTML renderer. Someone wanted to style i…

That is just insane. Separate rendering engines for each tab?

I can't remember how the flyouts worked. They might have shared a window, or they might not have been HTML windows (but I think they were). What I know for sure is that the one main dropdown was IE.

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

#60
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 worked at a place with a very similar hack before, but it was for a bunch of windows servers. The issue was a process was trying to scan various Office files, and even though no actual Word/Excel/etc app was running warning dialogs could suddenly appear blocking the scan process. The problem was "solved" by some frustrated ops guy that wrote a service that scanned for dialog boxes and closed them.
Post reply on HN