I had to get past a captcha for automation and the solution I came up with was to always choose 2. If it was incorrect, just request a new captcha until it passed. For some reason, 2 was the answer most of the time so it actually rarely had to retry anyways
Ask HN: What's your "it's not stupid if it works" story?
51–60 of 510 posts
Re: Ask HN: What's your "it's not stupid if it works" story?
#52After a month or so I started to notice that something is wrong with performance. Figured out that every `object.field` access through a COM proxy takes exactly 1ms. Once there’s enough data, these dots add up to tens of seconds.
>_Instead of doing a rewrite I just pushed as much of js logic as possible beyond the COM, so there’s only a constant or little amount of `a.b.c` accesses on my side. Had to write a json encoder and object serialization inside the old app to collect and pass all the data in one go.
The web app was abandoned few months later for unrelated reasons.
Re: Ask HN: What's your "it's not stupid if it works" story?
#53This was a while ago so it probably wouldn’t work today. I had to get past a captcha for automation and the solution I came up with was to always choose 2. If it was incorrect, just request a new captcha until it passed. For some reason, 2 was the answer most of the time so it actually rarely had to retry anyways
Re: Ask HN: What's your "it's not stupid if it works" story?
#54I 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…
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.
Re: Ask HN: What's your "it's not stupid if it works" story?
#55Re: Ask HN: What's your "it's not stupid if it works" story?
#56Re: Ask HN: What's your "it's not stupid if it works" story?
#57I 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.
"on error resume next" never died, it just became serverless!
Re: Ask HN: What's your "it's not stupid if it works" story?
#58Earlier quoted context omitted.
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 upgrade, but an 18B20 would fine as well. A 10K NTC resistor might even be good enough. For what I needed (and I think for what you need), just fixing the sensor to the outside of the pipe [if metal] will give you a usable signal. That sensor was just metal HVAC tape…
The pipes are insulated and I didn't want to cut into that, but maybe a small hole for a sensor wouldn't be too bad. But as you say, timer works good enough and that means little motivation to continue to work on it -- countless other projects await :) BTW I've also tuned the timer to run for longer in the morning to get a hot shower ready. Edit: nice dashboard, what are you using for the chart? I like the vintage lo…
I have a mix of shame and pride that the chart (everything in the rectangle) is entirely hand-coded SVG elements emitted by the ESP web request handler.
Re: Ask HN: What's your "it's not stupid if it works" story?
#59The process of authenticating with the CRM was complex and there wasn't a way to get anything at print time and most of the data was stored all over the place.
But I found the printed report knew almost everything I wanted, and you could add web images to the paperwork system. So I added a tiny image with variable names like "{order_number}.jpg?ref={XXX}&per={YYY}" and then one for each looped product like {order_number}/{sku}.jpg?count={X}&text=..." etc. After a few stupid issues (like no support for https, and numbers sometimes being european format) it was working and has remained solid ever since. Live time stamped data, updates if people print twice, gives us everything we wanted just by a very silly method.
Re: Ask HN: What's your "it's not stupid if it works" story?
#60Launching 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.
Writing this package made me realize that even big projects (such as Chromium) sometimes have features that just don't work. Edge headless wouldn't let you take screenshots up until recently, and I still encountered issues with Firefox last time I tried to add support for it in the package. I also stumbled upon weird behaviors of Chrome CDP when trying to implement an alternative to using the headless mode, and these issues eventually fixed themselves after some Chrome updates.