Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pretty good. The source code [1] is also clean and commented. The randomized increasing velocity was a nice touch.

[1] http://stewd.io/pong/lib/pong.js



Can anyone explain this a quirk line of the source code to me? (In the framebuster portion at the top of the file):

window.location.href = 'ht' + 'tp' + ':' + '//stewd'+ '.io/' + 'pong';

Why has he written 'ht' + 'tp' + ':' etc instead of just the URL as one string? My suspicion is something to do with preventing framebuster-busters from working, but I'm not sure. I've never seen that before.


There are sites out there that attempt to offer a service that protects your privacy by fetching websites for you through their servers and then pass you the content afterward—so your IP isn’t part of the request chain. That sounds like a nice service. Unfortunately I found there were 3 problems with a particular company offering this service:

1. From what I’ve read these guys just pass your info on to interested agencies anyway, entirely defeating the purpose. 2. In order to offer the service for free they insert adverts into the content—I assume to cover their operational costs. 3. This particular agency was able to get a pretty high search engine result—rivaling my own URLs—by just copying my stuff, Browser Pong being a prime example.

At the time this meant if someone liked what I did and searched for it there was a good chance they’d end up visiting a boxed in version of Pong with adverts on it. Aside from some tongue-in-cheek exceptions I’ve been firm about not putting ads on my sites. (And for the most part this doesn’t matter because they don’t get a ton of hits, but when something blows up like Pong or Jed there’s you know ... like maybe a whole $29.95 to be made there.) I made these things for the enjoyment of it and didn’t want to dilute them with ”a word from our [randomly selected] sponsor.” So I started experimenting and figured out how this company was parsing the HTML, CSS, and JavaScript to patch the links so everything would go through their servers. The code snippet you pointed out was just a quick way to hide the URL from their parser and get them out of my hair.

I don’t have anything against ad-based models or referencing someone else’s work (obviously). But in this particular case I felt it crossed a line so I pulled the trigger. I hope that answers your question ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: