Software As She’s Developed

Mahemoff’s Podcast/Blog – Web, Programming, Usability from the Author of ‘Ajax Design Patterns’ (AjaxPatterns.org)

Software As She’s Developed header image 4

Entries Tagged as 'Javascript'

Ten Reasons Why IE6 Development is Significantly Better in 2010 than 2001 (But Still Painful)

August 25th, 2010 · 1 Comment · SoftwareDev

This post mentions IE6 everywhere, but it’s not about IE6 at all. In my standard rant on the three ages of web development, a standard sub-rant is our improved ability to develop on IE6:

Although it was created back in 2001, we could do far more with it in 2004 (e.g. Google Maps) than we could [...]

[Read more →]

Tags: ···

CORS, Scraping, and Microformats

August 10th, 2010 · 6 Comments · SoftwareDev

Jump straight to the demo.

Cross-Origin Resource Sharing makes it possible to do arbitrary calls from a web page to any server, if the server consents. It's a typical HTML5 play: We could do similar things before, but they were with hacks like JSONP. Cross-Origin Resource Sharing lets us can achieve more and do it [...]

[Read more →]

Tags: ·····

A jQuery Inheritance Experiment

August 9th, 2010 · 2 Comments · SoftwareDev

I like jQuery a lot, but I often find myself re-doing my way of OO and inheritance each time I start a new app. And so, I just did it again of course.

I was starting to write a lame HTML5 game, where you have "AlienModels" (of the MVC, not Star Trek, variety), and each with [...]

[Read more →]

Tags: ·

Javascript WTFe3

August 4th, 2010 · 4 Comments · SoftwareDev

> parseInt(1000) 1000 > parseInt(1000.0) 1000 > parseInt("1000.0") 1000 > parseInt(1e3) 1000 > parseInt("1e3") 1

WTFJS

So how to actually parse it with Javascript built-in? Spoiler alert - select the following white text:

parseInt(parseFloat("1e3"))

(Thanks @CAIndy)

[Read more →]

Tags: ·

Video Sync with WebSocket and Node

June 18th, 2010 · 3 Comments · SoftwareDev

Wanting to explore WebSocket, I made a demo that syncs videos for all users looking at the page (See the Code). Any user can "take control", so that the other videos will follow the controller's video. Writing it was a cinch with the Javascript WebSocket API in the client, and the very straightforward Node WebSocket [...]

[Read more →]

Tags: ···

Using BrowserScope to Detect Geolocation Support

May 27th, 2010 · 1 Comment · SoftwareDev

About Browserscope

Browserscope is a very cool tool coming out of Steve Souders' performance efforts and being developed by Steve along with Lindsey Simon. It's part of a trend towards crowdsourcing browser info, in similar vein to TestSwarm, for testing specific code, and along the lines of what I did with WebWait, which is to support [...]

[Read more →]

Tags: ·····

Another HTML5 Tidbit: Web SQL Database

May 27th, 2010 · No Comments · SoftwareDev

I coded up a small demo of Web SQL Database. As the demo points out, notice you can hit reload and the data remains, being that it's one of the several techniques for offline storage.

There's not much to say about Web SQL - you either know SQL already, in which case it's fairly straightforward and [...]

[Read more →]

Tags: ····

Upcoming: UXCampEurope and SWDC

May 22nd, 2010 · No Comments · SoftwareDev

Google I/O is over and I'll post a bit about the HTML5 hack session I ran later, but here I want to highlight a couple of upcoming sessions in Europe:

UXCampEurope. If this is anything like the Bay Area and London UX camps I've been fortunate to attend, it will be huge, and being Europe-wide and [...]

[Read more →]

Tags: ········

Offline Apps with Application Cache: Quickstart, Tips, and Deep Dive

May 19th, 2010 · 5 Comments · SoftwareDev

I've been mucking with AppCache, aka ApplicationCache. It's the secret sauce that lets you build offline apps, which is great for performance and fabulous for pretending to be an iPhone app when you're not.

Quickstart an Offline App

As with most HTML5 technologies, the basic usage is quite simple:

Create a trivial trio of HTML, CSS, and JS [...]

[Read more →]

Tags: ··

Audio/Video Tag: Don’t Forget to load() before you play()

April 30th, 2010 · 2 Comments · SoftwareDev

This is a gotcha that will catch a lot of people out because it goes against the expectation that you just change an image's appearance by setting its "src", done. And also, it's a deviation from the more general convention that you change DOM properties declaratively to make stuff happen. Probably for good reason, given [...]

[Read more →]

Tags: ···