Live data from Hacker News

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

news.ycombinator.com

191–200 of 510 posts

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

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

I’ve worked at a company where our remote access was over a super slow modem line but the machine did have access to the internet.

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

#192
post #188

I'm in the middle of such a story right now. I'm doing research on a data set of COVID-19 hospital patients with multiple blood samples over time from each patient. The obvious thing we want to do with this data is to line up all the samples on a single timeline so we can see how the data changes over the course of COVID-19 from infection to resolution. Unfortunately, as with most infectious diseases, no one knows ex…

I'd love to read it when it comes out. Where should I look for it when its published? Ignore if its a stupid question.

We will be posting it on a preprint server when we're ready to submit it to journal review, hopefully some time in February (but who knows, publishing timelines are murky at the best of times). The title will be something along the lines of "Reconstructing the temporal development of COVID-19 from sparse longitudinal molecular data", though that's likely to change somewhat.

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

#193
At Google almost 20 years ago, a bunch of our machines (possibly with slightly bespoke CPUs?) were behaving oddly. These machines were mostly in use for serving Google's web index, so almost the entire RAM was devoted to index data; the indexserver processes were designed to be robust against hardware failure, and if they noticed any kind of corruption they'd dump and reload their data. We noticed that they were dumping/reloading massively more often than they'd expect.

Eventually the cause was narrowed down to that, randomly when the machine was stressed, the second half (actually, the final 2052 bytes) of some physical page in memory would get zeroed out. This wasn't great for the indexservers but they survived due to the defensive way that they accessed their data. But when we tried to use these new machines for Gmail, it was disastrous - random zeroing of general process code/data or even kernel data meant things were crashing hard.

We noticed from the kernel panic dumps (Google had a feature that sent kernel panics over the network to a central collector, which got a lot of use around this time) that a small number of pages were showing up in crash dump registers far more often than would statistically be expected. This suggested that the zeroing wasn't completely random. So we added a list of "bad pages" that would be forcefully removed from the kernel's allocator at boot time, so those pages would never be allocated for the kernel or any process. Any time we saw more than a few instances of some page address in a kernel panic dump, we added it to the list for the next kernel build. Like magic, this dropped the rate of crashes down into the noise level.

The root cause of the problem was never really determined (probably some kind of chipset bug) and those machines are long obsolete now. But it was somehow discovered that if you reset the machine via poking some register in the northbridge rather than via the normal reset mechanism, the problem went away entirely. So for years the Google bootup scripts included a check for this kind of CPU/chipset, followed by a check of how the last reset had been performed (via a marker file) and if it wasn't the special hard reset, adding the marker file and poking the northbridge to reset again. These machines took far far longer than any other machines in the fleet to reboot due to these extra checks and the double reboot, but it worked.

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

#194
I often used to regret buying an item at Costco at high price and few days later seeing discount on the same item.

Later found out that Costco has price adjustment policy if price of an item is reduced within 30 days of purchase.

Created simple app to tell me if the price is reduced. Its not awesome, but it works. I have got a few 100 dollars so far :)

https://reclaimo.vercel.app/

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

#195
post #150

15+ years ago, I was working on indexing gigabytes of text on a mobile CPU (before smart phones caused massive investment in such CPUs). Word normalization logic (e.g., sky/skies/sky's -> sky) was very slow, so I used a cache, which sped it up immensely. Conceptually the cache looked like {"sky": "sky", "skies": "sky", "sky's": "sky", "cats": "cat", ...}. I needed cache eviction logic as there was only 1 MB of RAM av…

... how does doing a full string dict lookup take less time than just checking a few trailing characters in a trie? For indexing it's okay to be aggressive since you can check again for the actual matches.

> since you can check again for the actual matches.

Can you explain this?

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

#196
It's 1996 or so. The web is new. The Bureau of Transportation Statistics (BTS) at the US Department of Transportation collects ontime arrival data for all the major airlines, by flight. It publishes some summary reports, but what people really want to see is how all the flights from, say, JFK to LAX performed in a given month.

The monthly database textfile is not that large, but it is unwieldy.

I'm a web consultant, but database backends are not yet a thing, at least not for us. Static webpages, all the way down.

So I use a script to parse the database into a series of text files and directories. E.g. JFK/index.html is a list of all the airports receiving flights from JFK, e.g. LAX, SFO, etc. And JFK/LAX.html is that month's results for all JFK to LAX flights. Etc.

As I recall, once I'd worked it out, it took 15 minutes to generate all those files on my Mac laptop, and then a little ftp action got the job done. Worked great, but someone did complain that we were polluting search results with so many pages for LAX, SFO, etc. etc. (SEO, sadly, was not really on our radar.)

That was replaced within a year by a php setup with a proper Oracle backend, and I had to explain to a DB admin what a weighted average was, but that's another story.

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

#197
When I was younger I learned that Sed was turing complete. So I did was any young woman would do. I build an entire search engine in Sed. But it wasn't like a useless little search tool that provided bad search capability for a website, no, nearly every page (minus a few like the about page) of a site was nothing more than a presentation on top of the search query results. Several thousand hardcoded "known" pages and infinite possible pages depending on user searches. Because it was the foundation of the site, search worked unlike most websites searches of the era (~2005). This site happily ran for about a decade with surges of traffic now and then before a server migration and too little time prevented its continued existence.

Adult me is both horrified and impressed at this creation.

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

#198
The fan I bought was exactly the thickness that I had between the bracket and the top panel of a mITX build. But since it's the EXACT thickness, there's no way to put it there.

I ended up sanding the fan's plastic shroud for two hours to get it to fit. It's still in my desktop right now and I won't ever be able to get it out because it's just snug enough to go in.

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

#199
I have a website, blog, a cdn, and a domain level email inbox running off AWS SES.

You email specific email addresses which get processed as web pages, blog posts, or attachments extracted to the cdn. All other emails sent to your domain sit inside the inbox. You can also send out emails from any address.

The blog and webpages are all SEO optimised so you can share the link on say Twitter and it will unfurl the link and read the meta tags.

You can also forward specific emails to a special address to be shared or bookmarked in your browser.

The entire thing runs off Lambdas, S3, Cognito, and AWS SES, nary a database. I use pug template files to format content extracted from emails.

To make this work, I had to do a deep dive into how Gmail’s email composer translates actions into HTML tags, then align the templates to these behaviours.

For a while, I had a handful of paying customers which paid my AWS bills. Right now, I’m down to one customer and the rest of my uses are for personal projects.

I learnt a lot in the process - from templating to SEO to S3 usage to Lambdas and got a very usable domain level email inbox and blog out of it. The CDN and static pages are a little less useful but building them too was quite fun.

Btw, highly recommend nodemailer as a module for email parsing.

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

#200
post #182
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…

Oh, I did something similar. I built quite popular local (non-english language) gaming forum with an Access file hosted in a Windows server and a VBScript ASP file, which had just been released. That's the original version, before ASP.NET. I was 13 or 14 years old at the time and didn't know better. It was no SQLite, so I had some weird concurrency problems. On top of that I ran into the some size limit (was it 2GB?)…

Fascinating that our stories intersect so much. I later converted that Delphi code to ASP/VBScript because native Delphi code ran really slow on a new DEC Alpha AXP server because of emulation on the RISC architecture. ASP code was much faster despite being interpreted :) I found ASP way more practical too. Access was also my native next choice of database. Not very scalable, but day and night difference compared to a text file :)
Post reply on HN