Live data from Hacker News

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

news.ycombinator.com

231–240 of 510 posts

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

#231
Not particularly cursed, but my single-file Ruby-script APNS-notification-pusher with Redis ran for a couple years on the first try, and handled around ten million chat-app users on a single core with no trouble. I profiled to make sure it wasn't leaking when I wrote it and... yep, that's all it really takes. Bare-bones code is pretty effective at reminding me that computers are actually pretty fast nowadays.

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

#232
A couple years ago, I had an idea for convincing a filesystem to go faster using 2 compression steps instead of one. I couldn't see why it wouldn't work, and I also couldn't convince myself it should.

It seems to have worked out. [1]

[1] - https://github.com/openzfs/zfs/commit/f375b23c026aec00cc9527...

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

#233
We developed some early Windows 8 touchscreen programs. The desktop touch screens issued to us were early prototype garbage and locked up every couple minutes. So I wired up a MOSFET to interrupt the USB power lines at the touch of a pushbutton on my desk. It had to do so for a very specific length of time to ensure a proper monitor reboot. I used that for a year. Think I left it with a co-worker when I left. You could plug anything you wanted into its usb port if you needed a quick reset button.

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

#234

Earlier quoted context omitted.

> There were many posts about cats and their livelihoods and protection. Love that Turks have a wonderful relationship with cats, especially in Istanbul: https://en.wikipedia.org/wiki/Feral_cats_in_Istanbul There is a nationwide no-catch and no-kill policy for feral cats.

There’s a theory that cats mostly domesticated themselves; human settlements and their large grain stores proved to be a reliable source of rodents for them to hunt, and the humans tolerated the cats because they kept the rodent problem in check, but these cats would have lived a semi-domesticated lifestyle around human settlements without initially being kept as household pets. Maybe the feral cats of Istanbul are t…

Definitely in line with the axiom of sits where fits

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

#235
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…

Çok iyi :)

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

#236

Around 16 years ago, Wordpress security was just not up to snuff yet, and my popular Wordpress-based site kept getting hacked by pharmaceutical spammers and the like. After several such incidents, I wrote a "wrapper" that loaded before Wordpress to scrutinize incoming requests before a lick of Wordpress code was executed. It had blacklists, whitelists, automatic temporary IP blocking, and that sort of thing. There wa…

That reminds me of my terrible spam prevention hack. We kept getting a bunch of spammers signing up for our newsletters, so I made the form require a JavaScript based hidden input to submit. That worked for a while, but then new spammers started executing the JS and getting through. So I added new JS that just waits 15 seconds before putting the right hidden values in the form, and that’s done the trick (for now).

So CSRF?

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

#237
About 10 years ago I was working for a French bank, for a small regional team to develop internal tools.

The only way we could access the core database was through a mainframe terminal emulator only available on client PCs across the internal network. It was basically an old school terminal based UI where you had to enter specific codes and sequences of keys to navigate.

It was not supposed to be automatable, and we did not have permission to deploy any executable to computers on the network.

However, we found a way to plug into it by calling an obscure DLL via Internet Explorer's ActiveX. From there, we had access to only two functions: one to send a sequence of key strokes to the emulator, and another which was basically getString(x, y, length).

We built whole applications using this database, only via those two functions, which led to giant procedures for each query we had to do. It was terrible, unstable and slow, and broke at every update, but it did the work.

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

#238
post #213
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…

[flagged]

Got any problematic examples?

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

#239
post #223

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

>that took about 10 minutes to generate How?

I'm assuming:

    1. Generate a list of suburbs names separated by |
    2. Simplify the regex:
    2.1. Convert to a NFA
    2.2. Turn it into a DFA
    2.3. Merge redundant states
    2.4. Turn it back into a regex

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

#240
post #203

Earlier quoted context omitted.

User profiles are actually stored like https://eksisozluk1999.com/biri/{{username} }. "/@{{username}}" also redirects to "/biri/{{username}}". You shouldn't need numbers at all. The numbers are only at the end of topic titles. They are title id's (sequential integers assigned when they're created) to disambiguate conflicting Latinized forms of Turkish words.

back in 1999 or so, I wrote an online shopping site this way, all the data stored as text files (one per category, with many items in my case ... I was 18 years old and had no idea about databases). The site ran smoothly for almost a year until the customer used "*" in the name of a product... which was the character by which all the product data in the text files data was split...

That's why you always delimit your data fields in a text file with a unicode snowman

Surely noone will ever use that character!

Post reply on HN