Mr Speaker

Category: Javascript

The best kind of script

Conventional Interfaces: map/reduce and friends

I’ve had a few queries about some of the code in my Hacker News bookmarklet – which makes use of some JavaScipt 1.6 & 1.8 features: map; reduce; filter; and forEach (sorry, no love for some or every this post). Superficially these are just array methods that take a function and apply it to each […]

HackemUp: A HackerNews bookmarklet

Hacker News is a fantastic source for up-to-the-minute happenings in the nerd world. It’s highly dynamic – like a calm river of nerditry, in which items of interest ebb and flow unceasingly over the front page. Unfortunately it is also addictive – and the highly procrastinative or inquisitive (or worse still, both) individual can become […]

DOMTimeStamp fun

Here’s today’s fun-with-mobiles tidbit of pain. The extremely entertaining Geolocation API (entertaining to use, not to read) provides the current timestamp in DOMTimeStamp format along with geoposition responses. But it seems browsers and devices aren’t 100% in agreement on either what a DOMTimeStamp is, or what it is when it comes back from a geolocation […]

Accelerometer in Javascript

The super-cool Google Jules Verne demo that went up today reminded me that I made an accelerometer tester for the iphone ages ago. It’s an offline app, so don’t be afraid to “add it to home screen” – and if you don’t want to get dizzy, then lock the phone to portrait mode! GO HERE […]

Anonymous functions for inline event handlers

Inline event handlers… remember them?! Yes, they’ve gone the way of the blink tag and Adobe Flash, but recently I used one while debugging and realised: “Hey! I have no idea how to get the event object in an inline even handler!” and, shortly after “In fact, no idea how to write an anonymous function […]

SEARCHING FOR $ – a C64 Ajax loader

pretend to Ajax (5 seconds) Fullscreen RUN|RUNSTOP Golly gosh Ajax spinners (“throbbers” if you must use the correct term) are boring. They just spin. Not my Ajax throbber. It rocks.

iOS4 touchend to end all touchends

I went to play the ol’ Some Adventure Guy on the new iOS4 on my 3GS (sooo many TLAs!) – but alas, my already crappy controls had become even more crappier! And it looks like a crazy change (hopefully bug) in webkit’s touch handling is to blame.

Instant: coffeescript on the go

Life’s too short to not write coffeescript on the train. So I made a HTML5 offline web app for your iPhone that lets you (try to) do just that. Head over and add Instant to your iPhone home screen, then click on the “Run” button to see the example coffeescript go.