Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

291–300 of 414 posts

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

#291
A few years ago I started taking up running regularly but I didn't have a buddy that I could run with so I decided to adopt a dog. Unfortunately the shelters were relatively far away from my home making it inconvenient to go in and check continuously on the weekends. I later realized that nearly all of them connected to a central city database which contained all of the dogs in the nearby shelters and furthermore that that database was behind a publicly available rest endpoint.

I whipped up a program that periodically every 10 minutes would query the database filtering for dogs matching the qualifications I was looking for using a combination of regex to search for any dogs that were:

- Between 50 and 100 lbs

- Did not have a history of behavioral problems

- Matched a list of active breeds

When it found a potential match it would send an SMS via Twilio to my phone with a picture of the dog, a link to the shelter, and a picture.

Several years later my huskee / Pyrenees hybrid is the best running partner I could ever have asked for. That's my proudest hack and I think she would agree with me.

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

#294

About 10 years ago, I worked for a Toyota supplier. My job as, the only software guy in a house full of hardware people, was to find out every single Toyota and Lexus dealership in America, and then find out what kind of cell phone reception they had (3G, Edge or none) for each of the major carriers (AT&T, T-Mobile and Verizon, IIRC). They imagined this would be done manually so they estimated a few weeks to do the j…

This reminds me of the response I got once when working for a government agency. I managed to automate their quality assurance process, reducing a two week manual testing routine down to a five minute test suite. Their response? I got fired for "poor performance". I guess I made too many unproductive government employees fear for their jobs. Lesson learned!

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

#295
post #105

When I was in highschool I wrote a Tetris game for the TRS-80. My clever hack was that I could make it twice as fast by keeping the state of the falling shapes in video memory instead of a separate object model. In an early version of this, I failed to completely draw the "cup" the objects were falling into, and one fell straight through the bottom into system memory and crashed the machine.

Reminds me of a similar story of someone creating a Tron lightcycle game on an Apple IIgs. They had created a bug so that the lightcycle could travel off-screen and into memory, causing all sorts of undefined behaviour.

https://blog.danielwellman.com/2008/10/real-life-tron-on-an-...

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

#296
I will tell about my most recent more significant hack. I was building a Yocto image and it failed, because it filled remaining space of my 128G disk. I run some diagnostics. ncdu showed clearly that it is all Yocto builds. Then remembering how Yocto gets lots of the same files in the build process I was curious and run fdupes to find duplicates. I took a hacky python script that interprets fdupes output to calculate the size duplicates take, I wrote the script a few months earlier for unrelated issue. It showed around 36G of duplicates. From the same directory I took a script that replaces duplicates with hardlinks, small change to the mentioned script - I know that it is a common thing for duplicate software to do, but I wanted it to work on the fdupes output, so it would not have to recalculate anything for lots of time.

I run the build and eventually it failed. It failed, because Yocto keeps inode numbers in an SQLite file for an LD_PRELOAD library, that fakes root privileges or something like that. I did a simple SQLite utility in C before and I modified it so it would put correct inode numbers for all the files. After I made it to compile I was surprised that it just worked. I run a find with -exec of my tool for those database files.

Now the build mostly worked, but occasionally it failed. I don't remember exactly, but some of the hard linked files had to be replaced with a copy. I did not investigate further to make it automatic, but I considered checking the build log and doing the copying automatically or maybe to get to know how differentiate which files to leave alone. There was not a lot of files like that and after the build I did not have to do a big rebuild like that often enough to care.

It was not smooth, but I made it work. I wondered about creating a separate BTRFS partition (even in a file) that would do the dedup hidden or a fuse filesystem that would mask my own dedup.

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

#297
My trading empire in the early days of World of Warcraft.

I found a trick that I called "graveyard jumping", which involved sneaking a Level 1 character into a high-level zone far enough to reach the area of the next graveyard before dying, then the next graveyard, then the next.

After a couple of days of survival horror gameplay, I had a dozen of Level 1 characters in multiple high-level areas of the world. The point of reaching these areas was vendors with rare items on cooldowns -- usually recipes or trade books.

I would log into those Level 1 characters (to sheer bewilderment of higher-level locals), buy the cooldown items from the vendors, then send them via mail to my main character in the capital, who would sell the items on the Auction House at an enormous markup, collect the profits, and send some gold to the Level 1 characters so they could cover their item mailing fees.

I never raided or belonged to a guild, but I had so much money that a friend, who was a leader of a high-ranking raiding guild, sometimes came to me to borrow some gold.

Good times!

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

#298
post #120

Elementary school, Windows 3.x era. School district thought they blocked access to the built-in OS games. Nope, from any program (Wordpad, etc) you could FILE -> OPEN to find/launch/play Minesweeper. Nothing makes an 8-year-old feel more like a "hacker" than subverting school controls to play video games, while also gaining cred with your friends. The good ol' days.

Ah, reminds me of the good ol' Windows 98 login bypass: https://epiclogon.ytmnd.com/

AFAIK, Win 9X login was more of a "profile loading" rather than proper login. You could just hit cancel and in you were with a default profile loaded.

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

#299
post #256

In my first job I work on a database product in development that leaked memory slowly, leading to crashes after hours of usage. The software was written in C and there were no tools like Purify or Valgrind back then to deal with memory problem. It was a vexing problem that got punted until release time, when it became a show stopper. I looked into the problem and found that the memory allocation used malloc and free.…

This is a great strategy even today, with the only difference being how you'd implement it: typically by interposing malloc and free and having it walk its own stack.

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

#300

Being in Scotland and poor to the point of trying to eat on a few pounds ($5) a week. I discovered (by watching another customer) that a certain kind of very expensive Scottish smoked salmon was 4 pence more expensive than the price listed on the shelf. The supermarket (Tesco) also has a large sign stating that if the price was wrong on any item, they would both give you the item for free and the money it costs. I pr…

My uncle was in a similar situation: bought a granola bar, price was wrong, free granola bar. He went back a few days later and the price was still wrong. He’s a lawyer, and he sued the store and won (false advertising or something) to get them to fix the price. Pretty awkward because it’s the closest store to his family’s house. His son said it best one day, “dad, are you bored at work?”

No post body was provided.
Post reply on HN