Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

321–330 of 414 posts

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

#321

[dead]

Hi,

I really liked your probe ... and yes freebsd-update(8) may be useful for small updates from -pX to -pY but large updates like from 12.1 to 12.2 are real PITA.

The HardenedBSD (FreeBSD fork) made its own hbsd-update(8) tool which just fetches whole new OS and after extraction installs/updates needed things. But its PITA for small updates :)

Sorry to hear you have bad experiences with FreeBSD Froums ... but to be honest I do not often go there now - just ocasional visits.

I used to love BSD forums when the BSDForums.org existed. Then we started over with DaemonFroums.org as BSDForums.org was shutdown by some asshole admin ... and not long ago official FreeBSD Forums appeared.

Not sure why they (at FreeBSD Forums) would chase you as you provided really nice solution/frontend to freebsd-update(8) tool.

Regards, vermaden

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

#322

One time I accidentally overwrote my hard drive with dd while making an installation thumbdrive. While unfortunate, it was only the first 8GB or so. This nuked the partition table, bootloader, and start of the Windows partition, but fortunately my daily-driver, still-running Linux system partition was unaffected. I kept my cool and figured it was recoverable. I ended up recovering the partition table from RAM and wri…

Oh yeah overwriting the partition table can be "fun". Once wrote the partition table of a floppy to my hard drive. That was when I was still running DOS. Used a disk hex editor (I think it was part of pctools) to change it back to the correct values.

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

#324
A story I like to tell is early high school, I was (and still am) obsessed with reverse engineering things. The school I went to had a custom LMS similar to how Canvas is used now. They'd set it up using Drupal with custom content types and a pretty intricate front-end. Knowing just a smidge about Drupal I tried using some of the alternate permalinks it generated, things like "/node/12345". In some contexts I could bypass a lot of the custom stuff and get access to Drupal's default editors which gave me a lot more permissions in terms of viewing/editing. Like a good egg, I wrote up a summary of what I found and emailed the developers. I was even nice enough to reverse engineer a solution to their problem and give them a detailed write up on how it could be fixed.

Apparently, this department had absolutely no idea that their email was publicly available. I was friends with our IT guy who greeted me when I came into his office with "Why is my boss asking me who is ?".

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

#325
post #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!

Same thing happened to me working as an administrator in a warehouse.

I basically made all midnight-shift administrators redundant (including myself), as their job could be completely automated as long as someone on the floor could put the tickets into a slot. In the morning, the 'actual' administrator(s) would batch-scan these documents which then got picked up by a script I wrote. It categorized all the tickets and sent out the necessary emails depending on which what where when, saving the result to files to be used in reporting (normally written by hand).

They didn't like this, and refused to use it. I tried to explain that the entire office side of the company was filled with this type of low hanging fruit, but they wouldn't hear it.

Company eventually folded due to lack of solvency. When I asked the CEO why this was considering the large amount of paying customers we had, he stated 'rising employee costs'. The headcount of people working on the ground had stayed the same during this entire process, new hires were exclusively doing admin work.

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

#326
I fixed my "broken" washing machine by bypassing the "drum is open" (while it is not) security with a single magnet. It was 10 years ago. Not the best engineering or smartest idea but I really appreciate how the simplest trick allowed me not spending money on a new one. And I really didn't want to. I'm still amazed by it every time I wash my underwears and I'm like "Yeah. F the system" looking at that small magnet.

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

#327
post #284

One that's fun from a historical point of view was my hack for fixing palette flash. Back in the early 90s PC graphics cards typically had a "palette" of 256 colors at one time, selected from a possible 256K colors. In theory this gave you a lot of options, but in practice, switching palettes tended to cause "palette flash" where the previous image changed color in a distracting flash. I was doing a multimedia projec…

Oh, this reminds me of something I once did, but sort of backwards. I was working on a little hobby space game, and there was a star field. I wanted a hyperspace warp effect, like in Star Wars, so I coded something up. But there was a problem. The "stars" in the hyperspace effect were different than the "stars" in the star field. So when you engaged hyperspace, it looked like all the stars kind of "jumped", changing positions immediately before the hyperspace effect began. I "fixed" this by inserting a single frame of all white to flash the screen, and this somehow prevented people from noticing that the stars jumped.

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

#328
post #85

Earlier quoted context omitted.

Love this one. For the clicking sound you could add something like the below command on each click. 'aplay click.wav'

If adding mouse/keyboard sounds the main challenge is the variability in sounds, for instance how hard keys are pressed. Also, repetetive sounds, or sounds that are mis-timed to the corresponding action, are worse than no sound at all.

Just have a disconnected model M that you type along with.

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

#329

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…

But did it match reality? I know that I’ve found both Optus and Telstra’s network coverage maps next to useless in both metropolitan Melbourne and regional Victoria, Australia, for as long as I’ve been paying attention, which started in roughly 2015. They claim almost total coverage in a way that is simply not true, especially with cheaper phones’ modems (they often have poor antennae) and modems that lack total frequency band overlap (surprisingly common, even among flagship phones from the domestic market), but even on phones with good modems and support for all frequencies. Telstra only say whether it’s 3G, 4G or 5G, with no indication of likely strength (which is extremely important—near me, they claim 4G coverage, but in practice you’ll get a weak 3G signal outside and probably nothing inside, and I believe it’s served from a tower in the next town over 10km away, but of course no one that lives here uses Telstra, when there’s an Optus tower right in the town), and Optus are only a tad better, splitting it into two strengths, without and with antenna.

I wish they’d tell you where the towers actually were, because then even a layman could do a better job of estimating how usable a signal will be.

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

#330

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…

Cool. Kind of unrelated, but is there anything stopping someone from just generating a sawtooth DPCM sample at runtime and using the channel as normal without having to use crazy timing stuff?

Yes, it comes down to how the DPCM channel encodes sound data. A sawtooth gets most it's energy and harmonics from the sudden jump at one end. This impulse is impossible to encode in 1-bit delta encoding, the closest you can get is a slightly steeper slope. The audible effect is similar to a low pass, with the strength dependent on the intended amplitude, so instead of a nice sharp saw, you get a muddy not quite triangle.

A few commercial games did use the DPCM channel melodically, but the main drawback is the large size of the samples relative to the commonly available ROM chips of the era. Price is a big factor when you need to put one chip in every game. Here's how that sounded in practice:

https://www.youtube.com/watch?v=LEgoYUzwabI

Post reply on HN