Another idea is to take known things, so to attract people, say, an angry video game nerd platformer, with cursing and such. No need to make it long, just make it hard, and deliberately buggy....We can go crazy with the characters, introducing fuzzed sprites, choppy movements... you name it.

Polygon() existed back in the old 1.5 version. But there was no easy way to detect if one polygon was touching another polygon. There also is no polygon editor. And so, nobody really used it.Until I found a fast algorithm for http://www.visibone.com/inpoly/, published in 97 in the Linux Journal. In fact, the article contains several of these algorithms and puts them somewhat side by side. The code is small, fast and brilliant. And fortunately, still around. And worth the read, so check the URL out.

At that moment in time, I was more concerned with writing good interface code, than understanding the algorithm, that is why in the sources you still can see this comment:

Yes. It is not always easy to "understand" the code. The focus and effort was more on following all JS guidelines to not leak memory (it does not leak). And getting all glue functions, documentation, testing, etc. together to add a function. At a mere 173 lines of code, it was the stepping stone for the much bigger sfxr sound generator, that was added later on.