Live data from Hacker News

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

news.ycombinator.com

131–140 of 510 posts

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

#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 security"). Despite being banned, it was the seventh most popular web site in Turkey two weeks ago, and the second most popular Turkish web site in the same list: https://x.com/ocalozyavuz/status/1735084095821000710?s=20

You can find its ancient source code from 1999 here: https://github.com/ssg/sozluk-cgi

The platform is currently at https://eksisozluk1999.com because its canonincal domain (https://eksisozluk.com) got banned. Any visitors from outside Turkey should get redirected anyway.

Since it's still a legal business entity in Turkey, it keeps paying taxes to Turkish government, and even honors content removal requests despite being banned. Its appeals for the bans are in the hands of The Consitutional Court to be reviewed for almost a year now.

A newspiece from when it was banned the first time this year: https://www.theguardian.com/world/2023/mar/01/eksi-sozluk-wh...

Its Wikipedia page: https://en.wikipedia.org/wiki/Ek%C5%9Fi_S%C3%B6zl%C3%BCk

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

#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?

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

#133
Worked at a public university. Windows server guru ran a script which had a bug that triggered the wipe of thousands of Windows desktops and some servers on campus.

Being an electronics nerd first, I went around grabbing the hdds (ultimately collected 600+). Took them, a bunch of ATX supplies, and USB adapters to a computer lab. Used some sufficiently thick wire to jump the pins on the PSUs so they’d power up when plugged in.

Plugged in hard drives to lab PCs with USB, into these external power supplies, booted the lab PCs to live USB Linux, ran data recovery over a week, swapping disks as I went. Copied users data to their network drives which was campus policy all along but a lot of people don’t care.

So if your power switch ever breaks on your desktop, use wire to jump pins on the PSU

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

#134
I was working on a video game, and we had a few hundred player hosted servers. The default way that steam handles server listings is not super great, and there was quite a lot of metadata for each server I wanted to filter by.

I didn't know how to set up a centralized service to handle server discovery ourselves, so I had each server serialize, compress, and base64 its metadata and store it in some "rules" field in the Steam API. Problem was that the rules field was a list of indeterminate length of strings of indeterminate length. Absolutely no documentation, so I had to brute force it to find the limits. It was just barely enough.

So the client would fetch the full list of servers, filter on the few parameters steam natively supported, then they'd fetch the metadata for every remaining server.

Honestly I feel really bad about this one. It was a bad solution but it worked for years.

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

#135

Back in the '90s I consulted at HBO, and they were migrating from MS Mail on Mac servers to MS Exchange on PCs. Problem was that MS Mail on the Mac had no address book export function, and execs often have thousands or even tens of thousands of contacts. The default solution was for personal assistants to copy out the contacts one by one. So I experimented with screen hotkey tools. I knew about QuicKeys, but its logi…

Cole ExPorter. lol.

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

#136
I wanted a smart thermostat but my 30 year old natural gas heater didn‘t support them. I only had a wheel which I could turn to set the temperature.

So I took double sided tape, stuck a plastic gear on the wheel and put a servo on with another gear on the side, connected to a raspberry pi, that would turn the wheel when my phone would enter a geofence around the flat.

Picture: https://ibb.co/nDvwndp

I even had a bash script to calibrate the servo which would turn the wheel and ask which temperature it set, so it could figure out the step size.

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

#138
At my previous job I had a number of production test rigs in China for testing PCB assemblies as they came off the manufacturing line. These rigs would sit on the shelf for months at a time and be pulled out to fo a run of a couple thousand boards then put away again.

We wanted to collect some stats about the boards being tested but The internet in the factory was really flakey and we didn't want to pay for a 4G internet plan for a rig that was turned off most of the time.

I eventually went for a cron job that would just try uploading all the local logs to s3 through rsnapshot every 15min. It worked great and was less than 20 lines of shell script.

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

#139

Monkey patching vendor code. They agreed their code didn’t work and produced wrong results, but the correct version would be slower, so they didn’t want to change it. So I dynamically replaced the part of their code that was wrong. That monkey patch has run years and is still going :)

You just reminded me of an old story.

The company I was working for purchased some kind of email spamming program to send mass emails. However they quickly found that when more than a small number (10 to 15,000?) of addresses were in the list it took forever.

Support wasn’t being helpful, so I decided to look at it. It was some kind of PHP application and what I eventually found was it was doing a database query doing table scans for everything because there was a missing index that was incredibly obvious.

I added the index, the program worked well into huge numbers of emails addresses, and we informed the vendor.

The program was soon updated and it fixed the problem as well. Also all the PHP code was now obfuscated/encrypted.

I guess they didn’t like my helpful nature.

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

#140
I built a writing/formatting product now used by 60k+ indie authors. One of the requirements was to format PDFs for print publishing with different themes and configurable layouts. Instead of building a custom PDF rendering engine, I decided to use Puppeteer to generate the PDFs.

But there were a bunch of issues we had to deal with:

- To render the gutter (margin in the middle) you had to know which side of the book each page would fall on.

- To generate the headers and footers, you had to know the exact page number for each of the pages.

- You had to know how many pages the table of contents would take up, but you couldn't know the page numbers for each chapter until the book was fully generated.

What I ended up doing was to generate multiple PDFs for each chapter, header, footer, and table of contents separately, then stitching them together very carefully to build the final export. Super hacky, but it ain't stupid if it works!

Post reply on HN