Live data from Hacker News

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

news.ycombinator.com

391–400 of 510 posts

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

#391

We have a production service running for years that just mmaps an entire SSD and casts the pointer to the desired C++ data structure. That SSD doesn't even have a file system on it, instead it directly stores one monstrous struct array filled with data. There's also no recovery, if the SSD breaks you need to recover all data from a backup. But it works and it's mind-boggingly fast and cheap.

I've always wanted a Smalltalk VM that did this. Eternally persistent VM, without having to "save". It just "lives". Go ahead, map a 10GB or 100GB file to the VM and go at it. Imagine your entire email history (everyone seems to have large email histories) in the "email array", all as ST objects. Just as an example. Is that "good"? I dunno. But, simply, there is no impedance mismatch. There's no persistence layer, yo…

This is what Intel Optane should have given us.

Non-volatile memory right in the CPU memory map. No "drives", no "controllers", no file allocation tables or lookup lists or inodes. Save to memory 16GB and it's there even through reboots.

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

#392
I used to work as a Network Administrator, the team I was on managed something like 200-300 L2/L3 switches and half a dozen core routers.

Whenever a new device was connected, the people who ran the ethernet for us were nice enough to connect patch cables to the building switches. The on-site techs would go setup whatever was connecting and we'd go hunting through disabled ports for one that came up with the matching MAC. This could take up to 30 minutes depending on the size of the switch.

One day I had enough time to scrape together some VBScript in an Excel document we used as our day-to-day documentation of our management IPs. It would snag the list of disabled interfaces from your clipboard, run a simple regex, generate a command to select all the interfaces, and shove it back into your clipboard.

It was disgusting, but it also changed 30 minutes of mind-numbing work with the on-site techs sitting on their hands into around 5. It stuck around for about 3 years.

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

#393
post #373

Earlier quoted context omitted.

That is so wonderfully fascinating to me. You could just download a file into a variable and when that variable goes out of scope/has no more references it’d just be automatically “deleted”. Since there’s no longer a concrete “thing” called a file, you can organize them however you want and with whatever “metadata” you want by having a dict with the metadata you want and some convention like :file as the key that poi…

So, I've occasionally played around with a language that pretty nearly does this. Mumps is a language developed in 1967, and it is still in use in a few places including the company where I work. The language is old enough that the first version of it has "if" but no "else". When they added "else" later on it was via a hack worthy of this post: the "if" statement simply set a global variable and the new "else" statem…

That global persistence model across executions is very fascinating. If you don't mind, could you explain what line of work this is and how it helps the use case? I have encountered similar concepts at my old job in a bank, where programs could save global variables in "containers" (predates docker IIRC) and then other programs could access this.

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

#394
While working on an enterprise platform, one of its customers in the banking industry wanted to migrate from on-premises to running it on whatever cloud was popular at the time.

The migration was long, tedious, and overly complicated in its own right (i.e. one proposed solution for the "how do we migrate all data safely across the continent?" question involved armored trucks) but just as we reached the T-1 day mark, I realised we had forgot something.

The customer was regulated by various entities, and so it had to deliver periodic audit logs in a particular format. The raw logs (stored in a cloud hosted bucket) would not be sufficient and had to be parsed; in order to process the logs into the desired format, the customer wrote thousands of lines of code in the platform that I was in the process of migrating. This code could only run on the platform, due to some other esoteric privacy regulation.

So there I was on a Sunday, with :

- a few hours to deliver up-to-date, formatted audit logs to regulatory entities or risk legal action

- raw logs in a cloud bucket that required ingestion and processing

- a new cloud platform that could process the logs but was unable to ingest data from the other provider's cloud bucket (due to some temporary allowlisting ingress/egress issue and this being one of the first migrations onto the new cloud)

- an onprem platform being decommissioned and no longer allowed to process the logs BUT capable of ingesting them

The solution I came up with was to have the data flowing:

log bucket in cloud provider A -> decomissioned platform running onprem -> connector I wrote that evening and had no time to test -> platform running on cloud provider B

The ship was afloat the next morning and everything was in order despite cutting it close; I am now a big fan of exhaustive planning, months in advance.

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

#395
post #371
post #215

Earlier quoted context omitted.

For those without a pneumatic cannon, look for a "drain bladder" that attaches to a garden hose. Costs about $10. Mine has never failed me.

I know little about plumbing, don't you risk breaking something by exerting pressure on the installation?

I've broken 2" PVC pipes by using a plunger, baking soda, and vinegar. You can easily get way above rated pressures doing that... doubly so if the PVC is older.

After doing that, NOT fixing the problem, and still having a massive plug, I did the next best thing. I cut the run of offending pipe out (clog included), used PVC primer/glue with a fixed joiner, and then bought a thick rubber joiner with 2 screw retaining rings, and joined the other side that way.

In hindsight, I absolutely should have rented a power auger and chipped at the clog and freed it. But I didn't.

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

#396
post #358

Earlier quoted context omitted.

It should be pretty straightforward for you to show you have any moderation whatsoever, I dont believe you do. The whole of the site is full of rubbish. If I were the Turkish government I would never even do the favour by banning the site, cause that draws attention the site doesn't deserve. I dont care if it's most visited site whatever, it's just useless.

Well, whenever we enter an evidence war like this we must go back to the old standard. The burden of proof is on the accuser. It has to be. If the burden of proof is always on the defendant, all you need is 30 people making accusations and it becomes impossible to defend against. It's basically a legal DDOS. Also, i think every logical person can see that its much much easier to provide a single example of a lack of…

Lol no need for an essay, I didnt mean the service provider has to prove they have moderation to the officials. I meant just here, it would be easy to just say the site has moderation. I don't believe there is, which means it's a dumpster ground with everyone posting all sorts of trash. Which, by the way, is another reason the site shouldn't even warrant any attention, but obviously government officials are stupid to even bother.

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

#397

I had a database that was in a boot-crash loop because it had a corrupted innodb_history_list for a given table. Everything would be ok if we could just delete the table, but that would involve opening a session and that wouldn’t be possible because of the immediate crashing. On a whim I thought, “well what if I just have a really short amount of time to connect before it reboots?” So I opened up 5 terminal windows a…

This is why remote work is so important. You could have been home the entire time.

This actually highlights a negative aspect of remote work. When you work from home, it is easy to lose track of time and ending up working the whole night. Here GP had a clear motivation, solve the problem in time to get back home and presumably disconnect.

That's why I actually like to work on site on Fridays. Because I know that when I leave the office, I am done for the weekend. And if I stay for too long, security will kindly remind me that the office is closing and I should leave. So laptop turned off, in the bag, and it stays there for the weekend. Even better if Monday is also on site, since I can just leave the laptop in the office, locked away.

It is a psychological trick, but it works for me. Your mileage may varry.

On a more technical note, don't assume the database can be administered over the internet/VPN. Real private networks still exist.

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

#398
I work on an ETL service that interacts with a good few, semi diverse third party systems. We organize these by individual jobs that get run and a job will process certain types of data and spawn different sub jobs in specific situations.

We wanted to have a compile time map of this data and a graph of the sub jobs. To do this, I tossed together a thirty minute script that took the source of our job functions and then ran a few regular expressions on them to extract the data we needed. It was filthy. Regex on source files just feels wrong. Problem is, it's worked great for the last six months and it's still going strong, so we can't justify changing it. The generated data has been extremely valuable for optimizing data fetching paths for customers.

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

#399
post #200
post #182

Earlier quoted context omitted.

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…

I never really stopped to think about it, but ASP was indeed quite performant, considering it was all interpreted, running in late 90s shared-hosting hardware with very little RAM and super slow hard disks. The site got a few thousand active users and worked quite well, apart from the DB size limits.

Fast forward 10, 20, almost 30 years and I frequently encounter websites that struggle to work under the same load, even with expensive AWS bills, especially when working with Rails.

Perhaps ASP was performant because the site was a few orders of magnitudes smaller than anything you'd see today, even though it was full featured. Probably 1000x or 10000x smaller if I also include third-party libraries in the count. It was quite comparable to serverless/edge computing actually.

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

#400

This regex that took about 10 minutes to generate was amazingly effective and helped me earn my highest ever daily rate https://gist.github.com/dr-kd/d43c884fbac0089d8523

How is that better than just checking against a list of suburb names?

The regex is a compressed representation which saves memory, and it's also likely to be quite a bit faster which saves cycles. I consider it a clever bit of optimisation.
Post reply on HN