Weborandom – Now With Snapshots

This mashup was just obvious. You’ve probably seen these snap.com website previews that hover over links on TechCrunch and various other sites. Can be useful and can be, well, a bit annoying, depending on the site in question. For Weborandom, though, there was no question. It just made eternal sense and I kept imagining it was there, so it was high time I added it in. Admittedly, Weborandom already provides a preview, so this is a kind of preview for a preview. Works for me anyway. With thanks to snap.com for providing their easy-to-integrate API, it’s now live.

Go visit the new, new, Snapshots (TM)-enabled, Weborandom.com!!!

The main challenge was to make the previews refresh dynamically, which was achieved with a little On-Demand Javascript magic:


  1. function refreshSnapshots() {
  2.   var head = document.getElementsByTagName("head")[0];
  3.   var script = $("snapshotScript");
  4.   if (script) { head.removeChild(script); }
  5.   script = document.createElement("script");
  6.   script.id = 'snapshotScript';
  7.   script.type = 'text/javascript';
  8.   script.src = "http://shots.snap.com/snap_shots.js?ap=1&key=d2e3ec72c47f90dc1ccf4c25de818ed2&sb=0&th=silver&cl=0&si=0&po=0&df=0&oi=0&link_icon=on&shots_trigger=icon&size=large&lang=en-us&domain=weborandom.com";
  9.   head.appendChild(script)
  10. }

I daresay the next installment will be the big one: search. It was originally intended to do that, but mysql fulltext queries crawl with several million records. I’ll need to experiment with ferret and friends.

Weborandom Has a Practical Use!!!

Paint me Melbourne Blue and call me a serial straw clutcher, but I just discovered a practical use for Weborandom, the Web Bling-Point-Oh app that shows random websites in an Ajax carousel and has accrued no less than eight, yes that’s a superb EIGHT-point-oh Diggs :/.

Have you ever found your net connection a little slow? You start typing in web addresses that pop into your head – “google.com” “yahoo.com”, etc. You want to ensure the content isn’t cached, so you keep switching web addresses or type random queries into the Google. After a while, this gets pretty tired. You’d rather concentrate on the content and stop coming up with random things to tell Google. So, no more randomising…let Weborandom choose random websites all day. Funny that this actually ties into Weborandom’s sister website timer.

Anyway, one even better step would be to just send random queries to Google, which as we all know comes back insanely fast. Maybe I’ll do that sometime. I could extend WebWait to do that, so you get the load time displayed for each random query.

So I never knew Weborandom had a practical use. I feel like the 17th century mathematicians who delighted in the purely theoreticalism of their prime number research, only to discover it would dictate every credit card transaction 200 years later. Although I don’t feel Weborandom is quite as important as PKI. Not yet…


New Website: Web-O-Random

I made a new Ajax toy. Web-O-Random is a random website finder with some Ajaxy goodness:

  • Sites load into a carousel (slider) component. Thanks to Bill Scott and Yahoo! for providing the original component and Sebastien Gruhier for the prototype port which is used here.
  • Pages load into an IFrame (as with WebWait).
  • User can re-randomize, which leads to a JSON payload of new random sites.

If you hunt for it, you’ll find there’s a way to search too, but I had to de-emphasise it as mysql full-text search takes 1-2 minutes to crunch through 4M (indexed) rows (each representing a website). If I have time, I may set up a reverse index table to cache results.

Initial reactions:

  • “…?” This is the typical reaction. It may be interpreted as a polite version of Cartman’s “Dude, this is pretty **** right here?” as in “Who would ever use this?”. Sometimes people forget that not everything has to be as popular as Google…apps like Weborandom and Webwait can be coded in a few days and hosting costs are pretty trivial nowadays. As development time trends downwards to zero, it’s the long tail of web apps! See What Happens When t Approaches Zero?
  • “So I get a new site by clicking Randomize?” (You’re meant to use the carousel first. I added some initial animation to the carousel, which looks cool and shows people there’s more than meets the eye. I also made the carousel default to start in the middle instead of on the left.)
  • “Are those your ads?” (He thought the carousel was adsense. I refactored by showing a boldfaced website title instead of a blue link).
  • “How do I click the arrow key? I can’t see the cursor.” (Confusing to have keyboard bindings in the absence of a textarea/input control. Changed the instruction text.)