Now Reading
Ask HN: What’s your “it isn’t silly if it really works” story?

Ask HN: What’s your “it isn’t silly if it really works” story?

2023-12-22 05:50:57

As a 12 year old: I tried to overclock my first “good” own computer (AMD Duron 1200 MHz). System wouldn’t start at 1600 MHz and I didn’t know BIOS reset exists.
I ended up putting the computer in the freezer and let it cool down for an hour. I placed the CRT display on top and the power/VGA keyboard cable going into the freezer. I managed to set it back to the original frequency before it died.

I had an old boiler that would sometimes trip and lock out the heat until someone went down and power cycled it. (It was its own monstrous hack of a gas burner fitted to a 1950s oil boiler and I think a flame proving sensor was bad.)

Every time it happened, it made for a long heat up cycle to warm the water and rads and eventually the house.

So I built an Arduino controlled NC relay that removed power for 1 minute out of every 120. That was often enough to eliminate the effect of the fault, but not so often that I had concerns about filling too much gas if the boiler ever failed to ignite. 12 failed ignitions per day wouldn’t give a build up to be worried about.

That ~20 lines of code kept it working for several years until the boiler was replaced.

I have a similar one.

Our boiler has a pump to cycle hot water around the house – this makes it so you get warm water right away when you turn on a faucet and also prevents pipes in exterior walls from freezing in the winter.

This stopped working, the pump is fine but the boiler was no longer triggering it.

I just wired up mains through an esp32 relay board to the pump and configured a regular timer via esphome.

Temperature based logic would be even better but I didn’t find a good way to measure pipe temperature yet.

I eventually switched to an ESP32 and added temperature graphing: https://imgur.com/a/VM7nD74

IIRC, I used an RTD that I had left over from a 3D printer improve, however an 18B20 would positive as properly. For what I wanted (and I believe for what you want), simply fixing the sensor to the skin of the pipe [if metal] provides you with a usable sign. That sensor was simply metallic HVAC taped to the entrance forged iron door of the burner chamber.

However a dead-simple timer resolution will get you fairly far as .

I worked at a startup where the core backend was 1 giant serverless Function. For error handling and recovery, the Function ran in a while loop.

For all its faults, it worked and it was generating revenue. Enough that the startup got to a sizable Series A. That experience completely changed how I think about writing code at startups.

this is great. if you look at older game source code you find things like this. things that we view as horrible hacks which are both extremely stable and perform well.

i see no reason to stop using these types of solutions, when appropriate.

A company I worked for had a website where you could order mobile phones and subscriptions from different providers. This was just a frontend, and behind the scenes, they just ordered them directly from those providers. But those providers had terrible sites still written for IE6 (this was in 2010 I think). And yet those sites where all they had (for some reason; I don’t know the full background).

So what happened is: the customer would order their phone subscription on the front end, that would create a job that would be sent to a scheduler that managed 10 Windows VMs that used a Ruby Watir script to direct IE6 to fill in the data from the job on the old decrepit website.

It’s the most horrific hack that I ever touched (I forgot what it was, but I had to make some adjustments to the system), but it worked perfectly for a couple of years until those providers finally updated their websites.

I had a GCP Cloud Run function that rendered videos. It was fine for one video per request but after that it slowed to a crawl and needed to shut down to clear out whatever was wrong. I assume a memory leak in MoviePy? Spent a couple of days looking at multiple options and trying different things, in the end I just duplicated the service so I had three of them and rotated which one we sent video renders to and do each render one at a time. It was by far the cheapest solution, means we processed them in parallel rather than serially so it was faster, all in all it worked a treat.

This reminds me of a service I recently found that was routinely crashing out and being restarted automatically. I fixed the crash, but it turns out it had ALWAYS been crashing on a reliable schedule – and keeping the service alive longer created a plethora of other issues, memory leaks being just one of them.

That was a structural crash and I should not have addressed it.

Launching a headless browser just to generate some PDFs.

Turns out, if you want to turn html+css into pdfs quickly, doing via a browser engine is a “works really well” story.

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.

Define works? Ive seen stupid and not working but convinced it’s working until proven otherwise…

I use to work part time restoring Fiat, Porsche, and VW rares for an old head out in the mid west, lots of “stupid but works” in those old
cars… Mercedes Benz once (1980s or so) employed glass containers to solve for fuel pressure problems. Insane coolant loop designs or early Fuel Injection systems that develop “Ghosts” lol…

See Also

`envsubst` on a k8s manifest, for templating. The space for templating/dynamic k8s manifests is complex, needlessly so I felt. But this… just works. It has been running in CI for a couple months now, deploying to prod. I’m sure the day that breaks down will come, but it’s not here yet.

In a previous role, I automated an unholy amount of business processes by adding doGet() / doPost() handlers to expose google sheets as basic web services. It’s a bit slow for large sheets, but was quite nice to work with and troubleshoot, and the built-in history in google sheets allowed me to experiment with little risk of data loss/corruption.

Generated HTML email newsletters from Excel (in 2004).

It was a big old-fashioned bookseller trying to compete with Amazon. Software and the web was locked down tight, but they opened a daily report in Excel, and I built a VBA macro that generated the necessary HTML and published the images to an FTP server. Turned a 2 day job into a 10 minute one.

I was part of a team which had to make web interactives for an old desktop-only Java-based CMS which published out to HTML. This was back before cross-publishing to formats like Apple News was important; we only had to worry about things working on the browser version.

The CMS didn’t support any kind of HTML/JS embed, and had quite a short character limit per “Text” block. But luckily, that block didn’t filter out _all_ inline HTML – only some characters.

So, a bootstrap “Loading” element was inserted, along with a script tag which would bring in the rest of the resources and insert those in to the page where the bootstrap was placed. This quickly became a versatile, re-usable loader, and allowed us to launch the features. But all this grew from a very inelegant hack which just happened to work.

I used a WiFi smart switch and a USB thermometer to make a sous vide cooker. I plugged a slow cooker into the smart socket, put the thermometer in it, and wrote a program to turn the switch on/off depending on the temperature the thermometer registered.

`sed` text files as a replacement for templating.

In the text file you have something you want to template (or “parametrize”) from an outside variable, so you name that something like @@VAR@@ and then you can sed that @@VAR@@ 🙂

I use a table object and a OnAfterModifyRecord trigger to process OData calls in Navision 2018 (ERP System). For some reason I can not call actions manually so I write whatever I want to do into a table and process accordingly with triggers.

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 🙂

A bunch of SQL triggers and procedures to overcome software limitations and workaround certain bugs which the developers won’t fix (3rd party app).

Reminds me when we started implementing features as an Oracle trigger. It was meant to be “just a trigger” but then there are so many edge cases when you do an end—run around application code that it took a couple of week total. Boss was like “couple of weeks for a trigger!”

I made my own version of AWS workspaces inside AWS because workspaces is a buggy piece of shit and the client sucks. It’s just an EC2 instance which can be started and stopped by a makefile that runs awscli and I query the IP address and open it in MS RDP!

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top