Watching the Earth breathe

The Earth breathes: When vegetation grows, carbon dioxide is consumed and oxygen is produced. That is, carbon dioxide breathed in (obviously, we breathe oxygen in). That process is reversed when plants lose leaves and they decompose or are eaten by animals. The NASA Goddard Scientific Visualization Studio has created an animation that visualizes the breathing by showing both the cycle of vegetation and the concentration of carbon dioxide in the atmosphere:


ECMAScript 6: classes

[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.


Why we wear pants and don’t wear hats

For a long time, pants were only worn in a few corners of the world. And as recently as 100 years ago, most men in the USA wore hats. This blog posts explains why those customs have changed.


Apply and arrays: three tricks

This blog post describes three tricks for working with arrays via apply.


Explaining to non-programmers what JavaScript is

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:


The third culture

The Third Culture is a movement that tries to bring two cultures together. Quoting “The Third Culture” by John Brockman:


Java’s Project Jigsaw (modularity): delayed

Project Jigsaw is about adding modularity to Java and about breaking up the currently monolithic runtime library. It was originally slated to be included in Java 8 (September 2013) and has now been postponed until Java 9 (September 2015).


Implementing a command line with eval in JavaScript

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).

[Sponsor] Cospired: mobile and web development

Cospired is a new and passionate startup from Munich for your most challenging tasks. Founded by three software engineers with a strong background in mobile applications (iOS), web frontend (jQuery, Cappuccino) and backend development (Node.js, Rails, PHP), as well as network engineering. They like to translate your ideas into code and to help you find those ideas.

And now imagine what they can do for you...

Cospired sponsors this week on 2ality.


Programming: initially a female profession

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:


Stan Lee: you’ve seen him in many movies

Stan Lee is one of the titans of comic book literature:
In collaboration with several artists, most notably Jack Kirby and Steve Ditko, he co-created Spider-Man, the Hulk, the X-Men, the Fantastic Four, Iron Man, Thor, and many other fictional characters, introducing complex, naturalistic characters and a thoroughly shared universe into superhero comic books.

Hence, even if you don’t read comic books, you’ve probably heard of his work. What you might not be aware of is that he has frequent cameos in movies:


Combining code editing with a command line

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

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

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:


Text message lengths

Several text messaging technologies impose character limits on messages. This blog post describes those limits and their advantages.