2013-06

Searching websites and evaluating JavaScript via Chrome’s omnibox

[2013-06-26] browser, computers, chrome
This blog post explains how to search several websites (not just a single search engine!) from the omnibox (address bar) in Google Chrome.

Basic JavaScript for the impatient programmer

[2013-06-22] dev, javascript, jslang
Update: This blog post has become a chapter in my book “Speaking JavaScript”. You can read it here: “Basic JavaScript”.

Kind words by Cody Lindley (author of “jQuery Enlightenment”, “JavaScript Enlightenment” and “DOM Enlightenment”):
“Basic JavaScript” … [is the] most complete and concise write up I am aware of.

This blog post enables you to get started with JavaScript as quickly as possible – if you already know how to program. It describes the smallest subset of the language that allows you to be productive. I call that subset “Basic JavaScript” and recommend to program in it for a while, before moving on to more details and advanced topics. Learning everything at once is too confusing. The post concludes with tips for what to learn next.

Video: An overview of ECMAScript 6

[2013-06-20] esnext, dev, javascript, video
On 2013-05-30, I held the talk “An overview of ECMAScript 6” at Fluent Conference, in San Francisco. The video is now publicly available (go there for a larger version of the video). And yes, I was slightly jet-lagged.

with makes it harder to evolve JavaScript

[2013-06-19] dev, javascript, jslang
JavaScript’s with statement has been deprecated for a while [1]: it slows down your code and is forbidden in strict mode. Additionally, it makes it harder to evolve the language, because code that uses it is more brittle.

ECMAScript 6: automatically binding extracted methods

[2013-06-14] esnext, dev, javascript
This blog post demonstrates how to use ECMAScript 6 proxies to automatically bind methods that are extracted from an object.

Freezing instances and the first invoked constructor

[2013-06-08] dev, javascript, jslang
Let’s say you want to write a constructor that produces instances that are frozen (immutable). One problem, you have to solve, is: when do you freeze this? If you always – unconditionally – perform the operation in the constructor then you can’t create sub-constructors that have their own instance properties. This blog post explains how to work around this problem.

Triggering events in vanilla JavaScript

[2013-06-06] dom, dev, javascript, clientjs
So you want to trigger an event for a DOM element, without using jQuery? This blog post gives you a quick recipe for doing so.

The running example is about sending a submit event to a form. I needed to do that for a demo of user interface testing via CasperJS. And, unfortunately, the Form#submit method does not send that event on most web engines.

Running code fast in web browsers: PNaCl versus asm.js

[2013-06-04] asmjs, dev, javascript, pnacl, webdev
The main point of the blog post “Thoughts on asm.js vs PNaCl” (by Gregg Tavares) is:
It just seems like asm.js and PNaCl are closer than people are admitting.
Some of the other points he is making are more controversial, so be sure to read the comments to get the complete picture.

2013-05

JavaScript quirk 8: array-like objects

[2013-05-30] dev, twelvequirks, javascript, jslang

The beginning of infinity in JavaScript

[2013-05-29] numbers, dev, javascript, jslang
Infinity begins relatively early in JavaScript:
    > Math.pow(2, 1024)
    Infinity
    > Math.pow(2, 1023)
    8.98846567431158e+307
What is going on here?