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.
Ask HN: What's your "it's not stupid if it works" story?
11–20 of 510 posts
Re: Ask HN: What's your "it's not stupid if it works" story?
#12Re: Ask HN: What's your "it's not stupid if it works" story?
#13The 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.
Re: Ask HN: What's your "it's not stupid if it works" story?
#14`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@@ :-)
Re: Ask HN: What's your "it's not stupid if it works" story?
#15Re: Ask HN: What's your "it's not stupid if it works" story?
#16I 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.
Re: Ask HN: What's your "it's not stupid if it works" story?
#17It's not the best story - I'm sure there are some greats here - but I tricked GitLab into running scripts that looked like https://gitlab.com/jyavorska/c64exec/-/blob/master/.gitlab-c... by modifying a runner to pass everything through the VICE Commodore BASIC emulator. It would even attach the output file as an artifact to the build.
Re: Ask HN: What's your "it's not stupid if it works" story?
#18I 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 eac…
That was a structural crash and I should not have addressed it.
Re: Ask HN: What's your "it's not stupid if it works" story?
#19I 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 eac…
Re: Ask HN: What's your "it's not stupid if it works" story?
#20So I dynamically replaced the part of their code that was wrong. That monkey patch has run years and is still going :)