Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

41–50 of 414 posts

Re: Ask HN: What's your proudest hack?

#43
Not code. But I bought an ATM once, set the surcharge to something like $10, then opened some checking accounts with "free ATM rebates", then just started making withdrawals like crazy. In case it's not obvious, the cash just goes in a circle and the ATM surcharge shows up as profit for the ATM owning entity (the expense of the surcharge fee is refunded by the bank, so no cost to that entity). Banks assume these are separate entities.

Re: Ask HN: What's your proudest hack?

#44

I've worked on a single-machine computer vision system which used RabbitMQ to send messages around, including JPEG frames which were rather heavy, in contrast to other messages. After we hit a certain number of frames/second, RabbitMQ became a bottleneck. My solution was to write the JPEG frame in the shared memory, then pass around shared memory ID, offset and frame length, instead of the whole frame. Only services…

Single machine ... RabbitMQ. Using jpg for events locally. Using jpg for computer vision. I think I see the problem, it's this entire thing.

Re: Ask HN: What's your proudest hack?

#45
I was looking for an apartment to rent (circa 2010-ish), on Craigslist and Kijiji. Neither had a map feature, and both suffered from a lot of reposts. If a nice place came up, you had to be extremely responsive (like, contact the poster within minutes of the ad going up) to stand any chance against competing renters.

I wrote a pile of scripts that scraped both sites, parsed and cached the data, and displayed it on a map. I was able to set search criteria based on location, and kludged it so that if something good came up, the system would automatically email the landlord if they made the email available, text them if they left a number, and text me a notification with a link.

The scraper eventually got pretty fancy as I expanded the service across multiple cities - it self-throttled and self-scheduled, based on the average frequency of postings on each platform in each city at a given time of day. The repost detector was working pretty well too, it added a layer of data to the results (eg, "this rental was re-listed 12 times in the past two weeks).

Once I found a place I liked, I made the site public and shared it with some friends, and it didn't take long until I was seeing steady daily use. The site even won an award from CIRA.ca!

I wrapped things up when I learned of Craigslist suing Padmapper for scraping their data. I wasn't monetizing, it was a cool project, but it felt like it was done.

Re: Ask HN: What's your proudest hack?

#46

In my master's thesis, I was generating component graphs from source code. One issue I had was the generated graphs were suuuuper ugly due to the connections between components overlapping in a non-optimal way. Turns out, untangling graphs is a NP-HARD problem. I got around it by using a spring-repulsion simulation, where connections between components pulled them together but components repelled other components whe…

It's such a powerful technique and it's so simple to implement! I used the same technique for putting a bunch of icons on a map and making sure they were as close as possible to their target position without overlapping.

Re: Ask HN: What's your proudest hack?

#47
About 10 years ago I was contacted by an agency I used to work with, that they needed to change a little feature in the android app for the austrian lotteries.

The problem they had was that they had managed to lose the source code of the app, lol. Since the app was a simple webview wrapper I decompiled the apk to some horrendous java monstrocity and carefully extracted all used logic, the html, css and js and created a new webview app with the slightly modified code.

Oh and I had no experience in Java or Android development :)

Another hack I was very proud of:

Some weeks ago I had to pick something up with a car trailer. I went to my parent's place to get it and when checking if the lights worked (it was dark already) it turned out that they did not. Since I was driving to a larger city I could not just go without lights.

The problem was, that I really had to pick this up and also I had no extra time to find an alternative solution, so I wiggled the jack of the trailer's cable in all directions hoping to clear out some oxidation. After some minutes of trying I found a specific position in which the lights seemed to work.

Taking out the good old duct tape from my car's trunk I fixated the jack against the trailer hitch. For some reason it actually worked and did not break. I was very proud of this hack!

Obviously I didn't fix it yet :-P

Re: Ask HN: What's your proudest hack?

#48

My favorite hacks mostly came from when I worked in a robotics+computer vision research lab, ~13 years ago. If you've never worked with stereo vision systems, they have multiple cameras as input. The algorithms need to know the exact position of each camera. These calibrations are extremely sensitive - if the camera moves even a teensy bit, the algorithms start to fail because the image features aren't where they exp…

> "You should just always do calibration," etc.

But that is a calibration. In fact it's exactly how you'd do an automatic calibration of a system like this: mount cameras on robotic arms or some other multi-axis system, then move them around with a feedback loop until cameras produce the wanted image.

Re: Ask HN: What's your proudest hack?

#49
Internet related would be, back in the early 2000s when I was building out infrastructure of pinkbike/trailforks I was optimizing things and discovered that this initcwnd parameter was hardcoded to something like 2 or 3 packets in the linux kernels. This was causing the initial page to require multiple RTTs to load so I figured I would change that and recompile the kernel to make sure all out pages would be transmitted in one go. This made out site perform a lot better compared to most sites at the time. Funny at the time I was a bit worried that the IETF would discover this and shut us down or something. These days that parameter is default to something like 10 and you can increase it with a config parameter.

Re: Ask HN: What's your proudest hack?

#50
My proudest hack and the hack I'm most known for both happened at the same company.

My proudest (and also maybe least proud at the same time) was writing a BASH script that was able to successfully replicate a complex server environment that had been previously built by contractors for an essential service that we needed to re-deploy, both for growing regions, but also to resolve a possible security issue due to how the contractors had deployed it. I had to basically reverse engineer every aspect of the service, built a deployment backend that I triggered, and did all of it in a fully-automated way that would break in known manners if it failed. That script went on to be used to deploy the entire service globally to ~12 regions on hundreds of servers.

The thing I'm most known for in that company was when I was working night-shift support and a customer called in with a server that had one of the drives fail on a Windows box, and apparently had decided it was worth saving $1/mo to not have backups. Because it was night-shift and nothing else crazy was going on, I decided to delve deep and I managed to get things back up by rebuilding their partition table by hand in a hex editor and avoiding some specific bad blocks so we could copy the data to a second drive DCOPS temporarily installed in the server, then we reinstalled the box and I migrated all their data back and brought their website back up. It took me around 9 hours, and at the end of it, the customer called in to complain about how long their site had been down, gave me the whole spiel. I had ended up staying late, so handed things off to the most senior person on the next shift that had a chance of understanding what I had done, and when I got done transferring the call I walked up two floors to talk to them directly to warm handoff and could hear the customer screaming through their headset from 3 cubes away. I became a legend for doing the most thankless task anyone had ever done for a customer in support.

Post reply on HN