Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

31–40 of 414 posts

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

#31
Very carefully scheduling NMI and IRQ updates to achieve a virtual sound channel on an old NES, resulting in a sawtooth bassline with volume control. This steals about 13% of the CPU time. The biggest hack in the arrangement is the scheduling of OAM DMA to sneakily just barely fit between timed audio updates, since it pauses the CPU and would otherwise cause an audible glitch. Among other things, if NMI notices that it interrupted IRQ, it apologizes profusely and exits immediately, which is a rather unusual workaround on 6502 systems.

I've open sourced the technique with a more detailed writeup [1] and I like to think the game I created with it is pretty fun, [2] but of course that's subjective. You can try it in your browser here. [3]

[1] https://github.com/zeta0134/z-saw

[2] https://zeta0134.itch.io/tactus

[3] https://rusticnes.reploid.cafe/wasm/?cartridge=tactus.nes

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

#32
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)

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

#33
Not that I'm particularly skilled in this, but for fun I once decompiled an Android app that accompanied cheap electronic door locks we had installed in the office. I found the C files that were generating temporary passwords, manually parsed for what I was looking for, then wrote a shell script (with help from a friend) that could find/generate more temporary passwords from any existing temporary password+approximate timestamp pair.

About a year later an intern showed me that a coffee stirrer also can work to open the lock, but I bet he won't write about that in a forum.

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

#34
I was color calibrating a prototype holographic printer with a 30Hz pulsed laser spatially modulated by a 60Hz LCOS, phase locked of course. I was chasing down a funny issue where the response curve of the LCOS seemed to change every time we power cycled the machine - specifically, it would randomly flip between one of two modes. I had a suspicion that the LCOS was flickering (they're known to do that) and that therefore the two possible embeddings of 30Hz in 60Hz behaved differently.

But how to measure this? The LCOS displays were buried deep inside some optics, and the only light that reached them was the laser light which was pulsing at the same frequency as the signal I wanted to measure, and the laser PSU was incapable of driving it faster. I did however have an pulsed energy meter, which I'd managed to interface to a computer so I got a readout for every pulse.

Sudden insight: flip the switch on the laser power supply from "Ext. trigger" to "Internal trigger". Twiddle the fine adjustment on the PSU frequency knob until the laser frequency was 29.95Hz. Watch in satisfaction as the energy meter described a neat sine wave over the course of 20 seconds - the beat frequency between 30Hz and 29.95Hz - confirming that the reflected energy swung wildly depending on the relative phase.

It was a small and simple hack, and I've poured much more sweat into much grander "hacks", but I will always be proud of that lightbulb moment.

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

#35
Way back in the Napster days before streaming services were a thing, I'd ripped all of my CDs to MP3 and had a bunch of live stuff from P2P networks. I wanted to listen to this stuff at work, but technology of the time was either CD based or limited to 16-32 MB of solid-state memory.

At the time, Microsoft had some live broadcast streaming service built into Windows 2k server that would allow you to stream audio from the computer, so I put together a web front that allowed me to build and save a WMP playlist file along with controls for to start/stop WMP, causing it to re-read the file.

The result was that I could listen to my own music on any device capable of receiving streamed audio, and could control it on anything with a web front end.

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

#36

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)

I like it, because you used your knowledge to minimally invasively fix the problem.

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

#38
Not my hack, but a team effort. Many years ago, I worked for a premium car manufacturer. We wanted to present a new product idea to convince visitors from HQ that we had a project worth funding: The core idea was that the car could be opened not only with the normal car key but also by other means, for example from a smartwatch.

Usually we would simply have modified/rewired a car so that a bluetooth connection to open it would work (for the demo only, of course). However, the keyless entry was designed to be so secure that it would have taken us far too long, even with our insider knowledge. My team leader had the brilliant idea of simply printing a 3d housing in which the original car key and an arduino-controlled servo could be installed, so that the arduino could press the key. We placed this device close to the car and remotely controlled the arduino. The demo worked perfectly and everyone was happy (afaik the project was not funded though).

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

#40
post #27

Was reminded the other day about the time I arrived early at the night shift to learn a particular manual "scheduling" technique (how to match single size and double size packages to hundreds of deliverables, and I think there was some options too). I saw the excel file, asked for 5 minutes, came back after 15 and had solved the problem to such a degree that it went from wasting two hours for two teamleaders on every…

I'd love to learn more about how you solved this scheduling problem.
Post reply on HN