2012-08

Properties in JavaScript: definition versus assignment

[2012-08-08] dev, javascript, jslang
Did you know that defining a property is not the same as assigning to it? This blog post explains the difference and its consequences. It has been triggered by an email from Allen Wirfs-Brock on the es-discuss mailing list.

ECMAScript.next: TC39’s July 2012 meeting

[2012-08-03] esnext, tc39, dev, javascript
TC39 (Technical Committee 39) works on the upcoming ECMAScript.next [1] standard. They have several meetings per year and in July, there was another one. This blog post summarizes the most important decisions. It is based on the following minutes by Rick Waldron:

2012-07

ECMAScript 6: classes

[2012-07-29] esnext, dev, javascript
[Update 2015-02-15] Newer version of this blog post: “Classes in ECMAScript 6 (final semantics)

During the July 2012 meeting of TC39 [1], classes have been accepted for ECMAScript 6, the upcoming version of the JavaScript language standard. This blog post explains how those classes work. It is based on Allen Wirfs-Brock’s annotated slides.

Apply and arrays: three tricks

[2012-07-24] underscorejs, dev, javascript, advancedjs, jslang, jsarrays
This blog post describes three tricks for working with arrays via apply.

Explaining to non-programmers what JavaScript is

[2012-07-23] dev, javascript, computers
When I tell non-programmers that what I do professionally involves JavaScript, I most commonly get the reaction: “Isn’t that that thing that you have to install and that makes the browser slow?”. This answer surprises me in two ways:

Implementing a command line with eval in JavaScript

[2012-07-16] eval, dev, javascript, jslang
This blog post explores JavaScript’s eval function by implementing the foundation for an interactive command line. As a bonus, you’ll get to work with ECMAScript.next’s generators (which can already be tried out on current Firefox versions).

Programming: initially a female profession

[2012-07-13] society, life, computers
In the 1940s, the first computer programmers were all women. That only changed later. Quoting “Researcher reveals how ‘Computer Geeks’ replaced ‘Computer Girls’” by Brenda D. Frink for the Clayman Institute for Gender Research:

Combining code editing with a command line

[2012-07-10] dev, hci, javascript
Update 2012-09-05: separated input and output.

Currently, you are forced to work with JavaScript code in either of two modes: You can either use a code editor and edit multiple lines or you can use an interactive command line and work with one line at a time (editing, evaluating). With jsrepl [GitHub project, live demo], I have prototyped a combination of both modes – no need to chose, any more.

Working with large integers in JavaScript

[2012-07-05] numbers, dev, javascript, jsint, jslang
In JavaScript, one has at most 53 bits for integers. This blog post explains how to work with large integers, by encoding them in strings.

amdefine: use AMD modules on Node.js

[2012-07-04] dev, nodejs, javascript, amdefine, jsmodules, clientjs, jslang
James Burke’s npm module amdefine lets you write AMD modules [1] that also work on Node.js. To do so, you need to perform the following steps: