Live data from Hacker News

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

news.ycombinator.com

331–340 of 510 posts

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

#331

All of these other anecdotes are (understandably) sysadmin or developer-related, though I have a couple very stupid ones that are completely physical and mechanical. My first residential plumbing fix was a simple unclogging of a shower drain, which was accomplished by putting a couple inches of water in the tub and blasting repeatedly into the drain with a pneumatic cannon. The splatters hit the ceiling, but it was t…

Unclogged a toilet once by lifting the seat, wrapping its bowl in kitchen plastic wrap and then using the resulting "membrane" to pump enclosed air volume down the drain. To my complete astonishment it worked on a second try!

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

#332

Earlier quoted context omitted.

I think it was meant as a joke, so for anyone else reading it, no it is not actually double-buffering.

Half a joke, because the concept is very much the same. You "paint" to an invisible buffer and then you swap.

Yeah, but the concept of double buffering is to swap every frame, for performance gains.

Here nothing gets swapped, and just temporary the screen gets hidden. So vaguely similar ... but not very much the same in my opinion.

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

#333

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…

Wow. Out of everything, this is the most impressive.

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

#334

Earlier quoted context omitted.

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!

You can also encode the special characters when writing to file and decoding after read.

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

#335
post #315
post #296

Earlier quoted context omitted.

Back in the day terminals under Linux did that to fake transparency: they just copied a chunk of the root window (where you put some wallpaper) as the terminal background and applied an alpha layer if the user wanted a translucid color.

Fake transparency is still a thing, for desktops without compositor. Not only in terminals, but also in docks.

But docks work in a different way, such as XRender or just a PNG with an alpha layer. Much less expensive than copying a chunk of the backdrop and then "pasted" at your terminal background.

Often docks will be able to show you the underlying windows behind it, even without compositing. But under the terminal with fake transparency you couldn't see another window behind it, just the backdrop part.

I think X11 had some extensions to allow translucency too for software like oneko, xroach or such.

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

#336
post #261

Earlier quoted context omitted.

The thing (screenshot and all) was routine done in the 90s with all those fancy non-rectangular applications/demos/launchers [usually available on CDs that came w/ magazines]. They had transparent/alpha zones that copied the screen under them.

Maybe some incompetent people did it that way, but 1-bit transparency was very well possible with native Windows APIs in the 90s (see SetWindowRgn). Later on (starting with Windows 2000 IIRC) it was also possible to have semi-transparent (alpha-blended) regions.

Not exactly. With 2000/XP you can set the entire window opacity. Still no gdi+ native. So regions were still just shapes(1bit mask). Trying to set a pre-multiplied bitmap to a window will just give you a brightened version(the multiplied version).

Though there was some support for cursor shadow at this point, and the improved GDI heap really helped, making faking a window drop shadow actually pretty feasible. Vista and Aero is the first native support for Windows with alpha channels.

I actually liked Vista. It worked just fine and wasn't unnecessarily reorganized. Plus the improvements to the OS threading model were excellent, which is why 7 is so incredibly rock solid, probably peak Windows.

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

#339

Fixing a CD drive with Polish Kielbasa: The CD drive in my first computer broke. We couldn't afford to get a new one, and after almost a year of using floppies I got a bit tired of having to carry them across the mountains every time I wanted play a new game. (context: I lived in a small village in southern Poland at the time -- imagine Twin Peaks, but with fewer people and bigger hills). Sometimes getting a copy of…

This is glorious.

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

#340
post #335
post #315

Earlier quoted context omitted.

Fake transparency is still a thing, for desktops without compositor. Not only in terminals, but also in docks.

But docks work in a different way, such as XRender or just a PNG with an alpha layer. Much less expensive than copying a chunk of the backdrop and then "pasted" at your terminal background. Often docks will be able to show you the underlying windows behind it, even without compositing. But under the terminal with fake transparency you couldn't see another window behind it, just the backdrop part. I think X11 had some…

Why is it less expensive? Sounds like the exact same operation, except the OS is doing it.
Post reply on HN