Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

71–80 of 414 posts

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

#71
I don't know if its my proudest, but certainly a recent one...I leveraged python and Bash/cli to automate content work... I'm proud of it because prior to that i had not coded any apps or even minor bash scripts in about 15 years.

In the midst of the pandemic (2020), i worked for a non-profit....and they published all manner of important economic research data on different strata of incomes, families who struggle putting food on the table, etc. All data that they sell to governments for policy work (its that great, valuable, and expertly published) and they also sell it to other research firms, NGOs, etc. (Side note: when i worked for them, they were severely under-pricing their data for way too low prices for how others used, referenced the data) Anyway, among the steps involved in reviewing the reports, I automated link checking of urls used within their reports. The report content lived in PDFs, so i automated grabbing all content from PDFs (not fun!), then picking out urls from the massive copy, then running link checker scans, finally producing a report of any links that were broken. The overall authoring of the reports encompassed many, many months of work - by top-notch research teams - and the design and production of said reports also (sadly) took months to perform. Well, when i automated even just the link checking portion, i reduced their work from many weeks (sometimes 1 or 2 months) down to 1 or 2 days. I left before i could extend my automation, so it still required a human to trigger some steps. But, if i still worked there, i planned to automate far more, and start moving upstream for other areas (like scaling out their report designs, etc.).

Was it some hacker-level thing or rocket science? No way. But, all in all, it was a neat use of python, python pdf modules, some minor bash/cli scripting, etc. I learned a bunch of fun stuff, and the non-profit saved tons of time. I still feel so good when i reflect on that little project!

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

#72
post #42
post #29

https://github.com/piku/piku Started as a hack, turned into the standard way of how I deploy all my personal projects, and then some.

Oh, nice surprise. I was checking your project last week. I will try it in a new app we are building. Great job!

Thanks! I may be fine tuning the installation process on newer Ubuntu/Debian if I have time over the holidays.

(the code is stable, that's why there are no new features, although I do plan to move up from Python 3.5 to whatever is the least common denominator across distros to clean up a few things)

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

#73
Around the time that tap-to-pay apps were in their infancy, vendors were offering extremely generous bonuses... a combination of a couple of these ended with essentially free snacks for the entire time this promo existed (~6 month period).

This was back when the tap-to-pay app was called ISIS, for context.

I combined a couple offers:

Amex's Serve (prepay debit card thing) offered a $1 off any transaction over $1 (a fixed $1, not a percentage), up to 50 transactions a month.

The vending machine company near me that had machines in my office offered a buy-4-get-1-free promo using tap-to-pay that has a very weird implementation: The dollar limit for the buy-4 portion had no lower limit, and the get-1 had a fixed $4 worth of payout.

Essentially, every time I got up and went to the bathroom I'd stop by a vending machine, buy 4 items worth $1.25 (costing me, $1 total), and then use the get-1 portion to buy $4 worth of items.

I'd then turn around and sell said $1.25 items to folks in my department for well under ($0.75 for $1.25 items, etc). I told them exactly what I was doing, nobody wanted to deal with the hassle though. And the dollar amounts were so small. The real reason I sold them to coworkers was because I wanted quarters for the pool table at a nearby bar.

In addition to those two offers, the Amex Serve also just straight up gave you something like $60 for signing up for the account plus adding some small amount of money to the card. This basically funded this series of $0.25 purchases for the entire 6 months.

I basically got unlimited snacks for myself, and a freeish source of quarters to fund my pool games for that time period.

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

#74

I spilled water on my favorite keyboard and broke it, then let it dry and fixed it by using a pencil to trace over the damaged circuits. It worked fine again after that! (Graphite in pencil lead is a weak conductor, enough to make the keyboard circuit work)

that's what I call a hack

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

#76

So I once made a script with python and selenium to make fake petitions to bring back Wendy's spicy chicken nuggets. It stopped around 9,000 when the script crashed after awhile... I think they did bring it back though so I feel like I was responsible.

One of my favorite pandemic memories is of a roommate surprising the house with hundreds of spicy nugs. Thank you, null-shell!

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

#77
Years ago I worked in the VAX/VMS development group at Sybase where SQLServer originated. SQLServer was basically an SQL interpreter consisting of several layers of loops. The innermost loop was written in assembler for speed.

I was able to remove one (1) machine language instruction from that innermost loop. I no longer recall if this resulted in a measurable difference but I've always been proud of this.

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

#78

We needed to take delivery data from a proprietory legacy system. It already printed delivery notes so I spliced into the RS232 cable to the printer and took a feed into a second PC. I then wrote a quick and dirty comms program to suck the data in, discard the unwanted control codes etc, and scrape the data into a usable form. This was in pre-windows days, so the data going to a dot matrix printer was pretty simple.…

An old manager used to like giving me PITA (Pain In The Ass) Projects that solved something useful, but were a bit arcane for some reason or other. A couple were printer-related, for our customers.

One customer had a cheque-printing routine that used a blob of HP PCL (Printer Control Language) for some reason when printing these cheques. The blob included image date of the finance person's signature, and they'd changed executives. We didn't have information about how this blob had been created initially, but I was able to pick it apart with a printer manual and hexl-mode in Emacs. That let me edit hex data which could still change size, and replace one image with another.

Another customer had salt mines, which are very corrosive environments, and you didn't want much in the way of computer gear there. They needed to be able to print shipping sheets from head office, ideally without any PC or server on-site. Using a modem and a dot-matrix printer with a serial interface, I figured out a way to connect and send a print job that worked. Not sure if they ever ended up using it though.

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

#79

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.

[deleted]

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

#80

Earlier quoted context omitted.

Did you just cycle the money in the machine, or did the cycle somehow involve taking a bunch of cash, depositing it in your checkings account, getting new cache delivered by courier, put it through the money machine, repeat... or a tighter loop I can't grasp how it would work with your account?

It was a lot of logistics with physical cash. But yeah I tried to run it as close to "real" as possible in case I did hit legal issues (isolating the entities, not comingling funds). Also, had to make sure for taxes that the cycled cash wasn't possibly viewed as income to either entity. There were a few optimization steps I found that helped me streamline the logistics but I still was withdrawal-ing cash from the ATM…

How did you discover these loopholes in the first place? Did you work in the finance industry or an ATM maker or something like that and just figured it out?
Post reply on HN