Friday, November 29, 2013

The 1st annual thanksgiving grey hoodie selfie.


The 1st annual thanksgiving grey hoodie selfie.

Tuesday, November 26, 2013

Nice

Nice
http://david.li/waves/
Also David Li Somebody stole your domain!
http://david.li/waves/

#shutupandtakemymoney


#shutupandtakemymoney

Although I would have preferred to sleep until the alarm rings :/

Monday, November 25, 2013

Scrolling at 60fps

Scrolling at 60fps

For a while people recommended to use a "noHover" class during scrolling to avoids paints that kill 60fps. Turns out that doesn't actually work because adding the noHover class causes a full style recalc which will likely completely annihilate your frame rate.

Today I saw this article, which tries to use pointer events instead to avoid the problems http://www.thecssninja.com/javascript/pointer-events-60fps
… and, indeed, it achieves great frame rates. Unfortunately it is even more broken, since it will block all clicks on your site within half a second after you stop scrolling. That might be quiet a few clicks. Fortunately we have found a way to avoid that problem:

The key insight is to use a cover div on which you toggle pointer events (or you just move it in and out of view using translate during scrolling). Then, when the user clicks the coverDiv during scrolling you can use document.elementFromPoint to get the real target:

var doc = e.target.ownerDocument;
var copy = doc.createEvent('MouseEvents');
copy.initEvent(e.type, true, true);
var realTarget = doc.elementFromPoint(e.clientX, e.clientY);
realTarget.dispatchEvent(copy);

Unfortunately there is one problem with this approach:
It doesn't work across iframes – it could be made to work in same origin iframes, but it can't be made to work with cross origin iframes. So, i.e. a click on the +1 button or a like button on your site may still be "eaten"

… which is why people should not use such hacks and instead ask browser vendors, to simply not paint during scrolling if they think that painting during scrolling is bad – which incidentally I did do :)

Saturday, November 23, 2013

#programmingliterature


#programmingliterature  
via Mike MacCana

Monday, November 18, 2013

Client-side MVC


Client-side MVC

I think this is the best slide I've ever made :)


I think this is the best slide I've ever made :)
Will be in a internal presentation at Google on the browser's event model and how it relates to the new framework we're using.
For context, the guy is Sven Marquardt (https://www.google.com/search?q=Sven+Marquardt) bouncer of what is probably the most famous club in the world, the Berghain in Berlin, and also awesome artist.
I definitely remember standing in front of him when I went to Berghain for the first time and I literally thought I was somehow transported into From Dusk Til Dawn. Luckily he didn't call malte.stopPropagation() :)

CC Joe McCann

Thursday, November 14, 2013

Really hard to imagine there used to be a freeway on San Francisco's waterfront.

Really hard to imagine there used to be a freeway on San Francisco's waterfront.
http://lostsf.wordpress.com/2010/11/07/the-elephant-obstructing-beauty-the-embarcadero-freeway/

You know I get terrorism and that stuff – I don't have to agree but there is an argument for secrecy in that area.

You know I get terrorism and that stuff – I don't have to agree but there is an argument for secrecy in that area.
What I don't get is why treaties regarding copyright have to be negotiated in secret. I suppose all the negotiating parties have modern parliamentary democracies where the usual law making process does usually come with transparency; inter-country treaties – especially on something civil as copyright – should be no different.
https://action.eff.org/o/9042/p/dia/action3/common/public/?action_KEY=9357
https://action.eff.org/o/9042/p/dia/action3/common/public/?action_KEY=9357

Wednesday, November 6, 2013

Tuesday, November 5, 2013

Duck typing


Duck typing

Monday, November 4, 2013

The German anti-artist alliance GEMA wins Youtube music award for most popular music video in Germany.

The German anti-artist alliance GEMA wins Youtube music award for most popular music video in Germany.

#theonion   #sadness  

http://www.der-postillon.com/2013/11/youtube-music-awards-gema-hinweis.html

Friday, November 1, 2013

Wow. Very accessible and thorough overview of the state of the NSA revelations by The Guardian.

Wow. Very accessible and thorough overview of the state of the NSA revelations by The Guardian. 
http://www.theguardian.com/world/interactive/2013/nov/01/snowden-nsa-files-surveillance-revelations-decoded#section/1
h/t Chris Williams 
http://www.theguardian.com/world/interactive/2013/nov/01/snowden-nsa-files-surveillance-revelations-decoded#section/1