Dave's Blog

Search
My timeline on Mastodon

A whole Richard Feynman Talks collection by Brian Norgard...

2012 Feb 29, 10:19


A whole Richard Feynman Talks collection by Brian Norgard contains wonderful videos like this.

PermalinkCommentsrichard-feynman video science

See http://boingboing.net/tag/TED2012 for Mark’s other TED...

2012 Feb 29, 10:17


See http://boingboing.net/tag/TED2012 for Mark’s other TED 2012 videos.

PermalinkCommentsted video boing-boing 3d-printer maker-bot

paulftompkins: shahruz: Promo on IFC for the upcoming Comedy...

2012 Feb 29, 10:13
[Flash 10 is required to watch video.]

paulftompkins:

shahruz:

Promo on IFC for the upcoming Comedy Bang Bang TV show!!!

BE EXCITED.

I am excited Paul.

PermalinkCommentshumor video comedy-bang-bang

Glitch Helperator

2012 Feb 29, 3:05

I've been working on the Glitch Helperator. It is a collection of tools and things I've put together for Glitch. It has a few features that I haven't seen elsewhere including:

Favorite Streets
A notebook in which you can save information about interesting streets and later use it to find your way back to them.
Birthday
Find out how old your Glitch is and the date of your next birthday in Glitch time or Earth time.
API Update History
A history of changes to the streets, skills and achievements of Glitch noting when new ones are added and when existing ones are changed.
It also has an interactive skill tree, find nearest feature tool, and achievement display. If you play Glitch, check it out.
PermalinkCommentsglitch tool glitch-helperator game

(via Music: Newswire: Hear two new songs that Radiohead debuted...

2012 Feb 28, 7:25


(via Music: Newswire: Hear two new songs that Radiohead debuted last night in Miami)

PermalinkCommentsradiohead video youtube music

Super Mario Bloco em Santa! (by only4crap) Also, great...

2012 Feb 28, 7:20


Super Mario Bloco em Santa! (by only4crap)

Also, great BoingBoing comment:

beemohCollapse

The slow pace of the initial march and the placards makes it look more like an Occupy World 1-1 protest march.

PermalinkCommentshumor video-game mario music video

Minimal Mac: TV Is Broken

2012 Feb 27, 1:58

minimalmac:

I say all of this to set up the fact that Beatrix has little idea of how traditional TV works and seeing her first real exposure to it was enlightening to say the least.

PermalinkCommentshumor technical tv netflix

Grace Hopper on Letterman! (by cistheta2007)

2012 Feb 27, 1:25


Grace Hopper on Letterman! (by cistheta2007)

PermalinkCommentssoftware history david-letterman grace-hopper video humor

Client Side Cross Domain Data YQL Hack

2012 Feb 27, 2:28

One of the more limiting issues of writing client side script in the browser is the same origin limitations of XMLHttpRequest. The latest version of all browsers support a subset of CORS to allow servers to opt-in particular resources for cross-domain access. Since IE8 there's XDomainRequest and in all other browsers (including IE10) there's XHR L2's cross-origin request features. But the vast majority of resources out on the web do not opt-in using CORS headers and so client side only web apps like a podcast player or a feed reader aren't doable.

One hack-y way around this I've found is to use YQL as a CORS proxy. YQL applies the CORS header to all its responses and among its features it allows a caller to request an arbitrary XML, HTML, or JSON resource. So my network helper script first attempts to access a URI directly using XDomainRequest if that exists and XMLHttpRequest otherwise. If that fails it then tries to use XDR or XHR to access the URI via YQL. I wrap my URIs in the following manner, where type is either "html", "xml", or "json":

        yqlRequest = function(uri, method, type, onComplete, onError) {
var yqlUri = "http://query.yahooapis.com/v1/public/yql?q=" +
encodeURIComponent("SELECT * FROM " + type + ' where url="' + encodeURIComponent(uri) + '"');

if (type == "html") {
yqlUri += encodeURIComponent(" and xpath='/*'");
}
else if (type == "json") {
yqlUri += "&callback=&format=json";
}
...

This also means I can get JSON data itself without having to go through JSONP.
PermalinkCommentsxhr javascript yql client-side technical yahoo xdr cors

(via The Many Samples and Sound-Alikes of Earthbound [Video])

2012 Feb 24, 5:35


(via The Many Samples and Sound-Alikes of Earthbound [Video])

PermalinkCommentsvideo-game music earthbound

(via Alcoholic Monkeys Stealing Cocktails from Caribbean...

2012 Feb 24, 5:26


(via Alcoholic Monkeys Stealing Cocktails from Caribbean Beach-Goers)

PermalinkCommentsvideo monkey

Anecdote on software usability. FTA: “… and suddenly...

2012 Feb 24, 5:24


Anecdote on software usability. FTA: “… and suddenly realized that it was a perfectly ordinary whiteboard felt-tip pen. The headwaiter just draw an ”X” over their booking, directly on the computer screen!”

(via “What’s the waiter doing with the computer screen?” (javlaskitsystem.se))

PermalinkCommentshumor software technical ux

(via School of Fail: Technically Not Inaccurate.)

2012 Feb 24, 5:22


(via School of Fail: Technically Not Inaccurate.)

PermalinkCommentshumor harry-potter school

Web Worker Initialization Race

2012 Feb 24, 1:44

Elaborating on a previous brief post on the topic of Web Worker initialization race conditions, there's two important points to avoid a race condition when setting up a Worker:

  1. The parent starts the communication posting to the worker.
  2. The worker sets up its message handler in its first synchronous block of execution.

For example the following has no race becaues the spec guarentees that messages posted to a worker during its first synchronous block of execution will be queued and handled after that block. So the worker gets a chance to setup its onmessage handler. No race:

'parent.js':
var worker = new Worker();
worker.postMessage("initialize");

'worker.js':
onmessage = function(e) {
// ...
}

The following has a race because there's no guarentee that the parent's onmessage handler is setup before the worker executes postMessage. Race (violates 1):

'parent.js':
var worker = new Worker();
worker.onmessage = function(e) {
// ...
};

'worker.js':
postMessage("initialize");

The following has a race because the worker has no onmessage handler set in its first synchronous execution block and so the parent's postMessage may be sent before the worker sets its onmessage handler. Race (violates 2):

'parent.js':
var worker = new Worker();
worker.postMessage("initialize");

'worker.js':
setTimeout(
function() {
onmessage = function(e) {
// ...
}
},
0);
PermalinkCommentstechnical programming worker web-worker html script

How Bots Seized Control of My Pricing Strategy (bueno.org)

2012 Feb 22, 6:54

Automated authors writing books and automated middle men trying to sell over priced books at a profit. The author of the blog post claims to be human, but I’m not so sure.

PermalinkCommentshumor technical amazon economics bots

Prime HTTP Status Codes

2012 Feb 22, 4:00
These are the prime HTTP status codes:
PermalinkCommentshttp prime technical useless

(via Listen to two full albums of Daft Punk songs, remixed as...

2012 Feb 21, 7:47


(via Listen to two full albums of Daft Punk songs, remixed as Nintendo soundtracks [Daft Punk])

PermalinkCommentsmusic chip-tune video-game daft-punk

Learn from Haskell - Functional, Reusable JavaScript (github.com)

2012 Feb 21, 3:32PermalinkCommentstechnical programming functional haskell javascript

Using CSS without HTML (mathiasbynens.be)

2012 Feb 20, 6:11

Implied HTML elements, CSS before/after content, and the link HTTP header combines to make a document that displays something despite having a 0 byte HTML file.  Demo only in Opera/FireFox due to link HTTP header support.

PermalinkCommentstechnical humor hack css http html

URI Percent Encoding Ignorance Level 2 - There is no Unencoded URI

2012 Feb 20, 4:00

As a professional URI aficionado I deal with various levels of ignorance on URI percent-encoding (aka URI encoding, or URL escaping).

Getting into the more subtle levels of URI percent-encoding ignorance, folks try to apply their knowledge of percent-encoding to URIs as a whole producing the concepts escaped URIs and unescaped URIs. However there are no such things - URIs themselves aren't percent-encoded or decoded but rather contain characters that are percent-encoded or decoded. Applying percent-encoding or decoding to a URI as a whole produces a new and non-equivalent URI.

Instead of lingering on the incorrect concepts we'll just cover the correct ones: there's raw unencoded data, non-normal form URIs and normal form URIs. For example:

  1. http://example.com/%74%68%65%3F%70%61%74%68?query
  2. http://example.com/the%3Fpath?query
  3. "http", "example.com", "the?path", "query"

In the above (A) is not an 'encoded URI' but rather a non-normal form URI. The characters of 'the' and 'path' are percent-encoded but as unreserved characters specific in the RFC should not be encoded. In the normal form of the URI (B) the characters are decoded. But (B) is not a 'decoded URI' -- it still has an encoded '?' in it because that's a reserved character which by the RFC holds different meaning when appearing decoded versus encoded. Specifically in this case, it appears encoded which means it is data -- a literal '?' that appears as part of the path segment. This is as opposed to the decoded '?' that appears in the URI which is not part of the path but rather the delimiter to the query.

Usually when developers talk about decoding the URI what they really want is the raw data from the URI. The raw decoded data is (C) above. The only thing to note beyond what's covered already is that to obtain the decoded data one must parse the URI before percent decoding all percent-encoded octets.

Of course the exception here is when a URI is the raw data. In this case you must percent-encode the URI to have it appear in another URI. More on percent-encoding while constructing URIs later.

PermalinkCommentsurl encoding uri technical percent-encoding
Older Entries Creative Commons License Some rights reserved.