Live data from Hacker News

Ask HN: What's your "it's not stupid if it works" story?

news.ycombinator.com

171–180 of 510 posts

Re: Ask HN: What's your "it's not stupid if it works" story?

#171
Too late for the bonanza here, but back in the day I owned an 8-bit Amstrad CPC 464 machine which came with a built in cassette deck.

Eventually a 3"(!) disk drive was launched which needed some extra space in the upper memory banks to host its driver.

This made it almost impossible to copy certain games (ok, it was Spindizzy) from tape to disk, since there was no longer enough memory to load the game without overwriting the disk driver.

Almost impossible, until I split up the loading process and used the only other remaining RAM possible: the graphics buffer. So while loading the game your whole screen got distorted pretty bad, but it worked: I copied the graphics buffer right over the precious disk driver and the game worked just fine.

Re: Ask HN: What's your "it's not stupid if it works" story?

#172
post #106

I used to work at a small company. We had a few remote embedded devices that did work and sent data back to the mothership over the internet. Their firmware could be remotely updated, but we were always very careful. Well one day a mistake was finally made. Some of the devices went into a sort of loop. They’d start running the important process, something would go wrong, and they’d just retry every few minutes. We ca…

Your company had remote embedded devices but didn't keep one "locally" for debugging issues?

Re: Ask HN: What's your "it's not stupid if it works" story?

#173

We have a production service running for years that just mmaps an entire SSD and casts the pointer to the desired C++ data structure. That SSD doesn't even have a file system on it, instead it directly stores one monstrous struct array filled with data. There's also no recovery, if the SSD breaks you need to recover all data from a backup. But it works and it's mind-boggingly fast and cheap.

I do similar things with mmap and dumping raw structs to get insane speeds one wouldn't expect to get from traditional databases.

Perhaps you could even pause the operations, snapshot with dd and resume everything back in order to get a backup.

Re: Ask HN: What's your "it's not stupid if it works" story?

#174
This was such a fun thread to read. I love seeing people just come up with solutions however inelegant. I do this myself: get something working and then circle back to make it more maintainable etc.

While as a new DBA for Microsoft SQL server on a team of very seasoned DBAs with decades of experience each I wrote a small Python script to fix a replication bug that MS refused to fix.

The bug iirc was something related to initial snapshot settings such that by default a setting was set to off so replication would fail. They would normally go and edit this file manually when this happened. When it really blew up it could be editing this file in tens of locations! It was just something they had consigned themselves to doing since it happened just infrequently enough for them not to invest time to fixing but when it did happen it could take an hour or so to do and yeah my noob self thought that’s far too tedious I am not doing that.

The bug really should have been fixed by MS and the flag should have been set to on and my script would just find the relavent unc share and text file and basically do a find and replace of that line and toggled the flag. And then replication would work again. I could point the script to a server and it would figure out the path and do the work. All I then had to do was enumerate the servers that were affected and it was fixed in no time.

This fix was so popular when I showed it internally that they asked me to turn it into a GUI application. It was awesome. I learned a bit of C# and from what I heard a few years back my little tool was still in USE! Huzzah

Re: Ask HN: What's your "it's not stupid if it works" story?

#175
post #4

I used SQLite for coordination between processes. It was a huge Python application that originally used the multiprocessing library and had to be migrated to Rust. In hindsight, it would have been better to use a local HTTP server. Seemed like overkill at the time.

I'm confused. Was SQLite for the migration?

Probably IPC.

Re: Ask HN: What's your "it's not stupid if it works" story?

#176
post #132
post #106

I used to work at a small company. We had a few remote embedded devices that did work and sent data back to the mothership over the internet. Their firmware could be remotely updated, but we were always very careful. Well one day a mistake was finally made. Some of the devices went into a sort of loop. They’d start running the important process, something would go wrong, and they’d just retry every few minutes. We ca…

How you could have enough control over the machine to reroute the error log to (what I assume was) a Pastebin api, while also lacking access to any of the files on the machine? In my mind you'd be required to ssh into the machine to upload, and if you're ssh'd in, why not just cat the log?

> In my mind you'd be required to ssh into the machine to upload, and if you're ssh'd in, why not just cat the log?

Ssh on remote IoT class devices is works. The problem is rarely ssh, the problem is always some form of key management plus NATs in-between.

If you've got a few thousand devices in the field, public key management can become a a real pain, especially when you want to revoke keys.

Re: Ask HN: What's your "it's not stupid if it works" story?

#178
post #131

I created the most popular Turkish social platform, Eksi Sozluk, using a single plaintext file as its content database back in 1999. It had taken me only three hours to get it up and running without any web frameworks or anything. It was just an EXE written in Delphi. The platform's still up albeit running on .NET/MySQL now and getting banned by Erdogan government for baseless or false reasons (like "national securit…

Crazy to see you! Some time ago, I was actually looking to add Eksi to Touchbase (www.touchbase.id) since several users reached out and wanted to add it alongside their other platforms to share on their profile, but we couldn't find out the URL convention for user profile feeds! It seemed to be "https://eksisozluk1999.com/{{username}}--{{7 digit value}}", but we couldn't find any rhyme or reason to the 7 digits. Are the integers random, or do they even go back to stemming from a convention from the previous codebase?

Re: Ask HN: What's your "it's not stupid if it works" story?

#179
This is a little different than what you are asking but when I was a kid my C64 would crash if it was on too long and I would lose all of my work. If I ran my mother's vacuum cleaner plugged into the same outlet as the C64 then it would not crash. No I cannot explain it but it worked so that vacuum cleaner would get turned on before I started to save my work to tape.

Re: Ask HN: What's your "it's not stupid if it works" story?

#180

This was such a fun thread to read. I love seeing people just come up with solutions however inelegant. I do this myself: get something working and then circle back to make it more maintainable etc. While as a new DBA for Microsoft SQL server on a team of very seasoned DBAs with decades of experience each I wrote a small Python script to fix a replication bug that MS refused to fix. The bug iirc was something related…

In some ways this is also a “nothing is more permanent than a temporary solution.”
Post reply on HN