Live data from Hacker News

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

news.ycombinator.com

201–210 of 289 posts

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

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

Similar but inverse to this, I was fixing a critical server and it usually came up in a minute or less. 5 minutes later I get concerned, I walk into the server room and it’s still trying to boot. I scratch my head and see a usb keyboard attached.... with a screwdriver sitting on my space bar.

Yup, I IRQ-DOSS’ed myself.

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

#202
post #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…

Did you consider the point about code being defined only at build-time, not being available for inspection by the developer? That sets it apart from most auto-generating code scenarios I've seen.

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

#203
post #67

Earlier quoted context omitted.

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

Have you ever read the following?

https://www.schneier.com/blog/archives/2009/08/risk_intuitio...

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

#204

Whilst this isn't really in production. I was porting AOSP to an Android TV I owned. However, I wanted to use the latest version of Android, but I had some closed-source graphics composition binary blobs to interface with; they were for an older Android API. Naturally, this meant writing a wrapper from the new API back to the old API. For some reason, every so often (sporadically) I'd get a segfault inside the closed…

Wow. Thanks for sharing your story.

The way you casually explained this to me really threw me off. I remember trying to do some AOSP hacking on some older phones and always gave up. For different reasons

Locked Bootloaders

Huge sources to download

Confusing device configuration (all those xml files were and still are magic to me)

The farthest I ever got was to compile a kernel and flash it unto a phone. I was so happy for so little. The only difference was the change to the build version / name.

I remember back in the pre Ice cream era graphics drivers were the most often quoted reason for older devices getting "stuck" on older versions of Android. It never occurred to me that you can write a graphics wrapper.

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

#205
post #195
post #153

Earlier quoted context omitted.

I disagree that you shouldn't do it. The way you do it is to add a comment // This %thing% was generated from %template% using data from %data%. If your language is too restrictive to add sensible tools, you should write the tools yourself. As with any code, write it in a way such that other people will be able to understand it. There is no magic, it's just code. I wish people would stop using that word.

The original comment says "they just weren't anywhere in the code that humans could see." Where would you and the comment in a situation like that one? I don't have anything against generated code but it should be visible and, as you said, it should be crystal clear where it come from

I think in this instance it's also a matter of tools. Visual Studio/Visual Assist would have been able to find the class definition, and that's where the comment would go. For cscope it's a matter of configuration, which should be auto-generated by the build tool.

If the class is being used, then the definition has got to be somewhere, hopefully in a header. It's simply a file that is included somewhere. And it will be human readable. There is no magic.

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

#206

This isn’t even top 20 in this thread, but here’s mine: maybe 17 years ago, we upgraded our department server from a big old Sun 4/690 running sunos to a shiny new Ultra80 running Solaris. Among the many functions this server has was to host a bunch of black and white x terminals. Probably only a few people here ever used those (although more than most other online forums!), but basically the idea is that they plug i…

Second real job I ever had, in the IT division of an investment bank, all the devs (about 15?) had color X terminals, which all booted off of one shared development server which was a mid-1990s era HP9000 box, and it supported the load and worked well. Everyone else had either a PC or a dumb vt100 type of terminal.

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

#207
post #101
post #84

In a consumer app, I would say Snapchat's early camera hack on Android takes the cake. To be brief, their app ran the Android native camera app in the background and took a screenshot of the resulting feed for the image, bypassing actual integration with Android's camera apps. Having worked on an Android smartphone from the ground up, I can understand their reluctance to commit dev time to having to support so many A…

This is hilarious as Snap Inc. bills itself as a "Camera Company"

This isn't a comment about snap chat, moreso about how shitty the camera API is for Android. Yes, it is faster and more reliable to take a screenshot of the camera app.

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

#208

As a consultant I got a job from a major public company to fix a new touchscreen based in-car dashboard they had built. It was a web app running on a cheap android tablet full screen. The thing worked well, they said, except that it would get stuck in demo mode, and you couldn’t switch out of it. They’d paid an overseas contractor a significant sum to build this and eventually fired them when they got stuck at this p…

I worked on a very similar application (likely the same platform) and grew increasingly concerned while reading your post that I was the one who built this.

Phew -- this was not me.

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

#209

The music for our call waiting at my first job, was an old Windows machine blasting music in our server room with a phone on speaker... You ever wonder why music on clal waiting sounds so fuzzy?

Which I guess means you had to be super silent when doing physical hardware maintenance?

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

#210

In the midnineties I was hired to improve the performance (and eventually rewrite) a custom in-house search engine. I dipped into the software and there were some quick wins, but I couldn’t get the damn thing to reply quicker than 100 ms. In desperation I just grepped for the number 100 and sure enough I found a 100 ms sleep in the routines handling the connections. Turned out the author had made a mess of his socket…

An SAP consultant once told me that his preferred technique of averting long-winded and pointless discussions about irrelevant details was to insert random delays into his code. That way, instead of discussing irrelevant details, people would get upset about the performance. He would then sigh, dramatically, and say he would see what he could do, remove a few lines, spend the rest of the day reading the news, and - importantly - billing the customer.
Post reply on HN