2012-12-30

Looking back on 2012

2012 has been a very productive JavaScript year for me:

2012-12-28

The problem with blogs

I’m a big fan of blogs. After all, I’m writing one, myself. They are the contemporary version of a specialized newspaper. Regularly having new content is exciting and reading blogs is well supported by various apps, thanks to standardized publication formats such as RSS and Atom.

2012-12-25

Two ways of clearing an array in JavaScript

Update 2012-12-27: Better example for aliasing in Sect. 1.

In a blog post, David Walsh mentions two approaches for emptying (clearing) an array. This blog post explains the pros and cons of both approaches. In order to understand them, we first need to know about aliasing.

2012-12-23

“Skyfall” plot holes

The latest James Bond movie, “Skyfall” was widely liked by critics and audiences. I left the movie a bit unsatisfied. There were also three plot holes that bothered me. All three have easy fixes.

[Warning: Spoilers ahead.]

2012-12-21

Language complexity: C++, Ruby, CoffeeScript and JavaScript

Alex Corban has written an article on C++ Rocks that diagrams the complexity of three programming languages: C++, Ruby and CoffeeScript. Here is the bird’s eye view:

2012-12-18

The future of JavaScript: a CoffeeScript-like workflow

ECMAScript 6 [1] will bring many new features to the language. However, it will be years before we can rely on it being supported in most browsers that are in use. This post examines tools that will allow us to program with ECMAScript 6 much sooner.

2012-12-16

New Samuel: a font derived from Morse code

New Samuel is a font by Aurelian Hallhuber that he derived from Morse code (Samuel is one of Morse’s given names).

2012-12-13

JavaScript puzzle: equal, but not the same

The following puzzle has been posted on Reddit by davvblack: What are the values of x and y, given the following interaction?
    > x === y
    true
    > 1/x > 1/y
    true

2012-12-12

A few thoughts on iTunes 11

Apple recently released a new version of iTunes, iTunes 11. In the words of John Gruber (for Daring Fireball):
There are redesigns and there are redesigns. This one’s the real deal. It’s not a rewrite though. Clearly, in its heart, under the hood, this is still the same iTunes. It’s what you see [...] that’s all new.
It was time. The old design felt bloated and cluttered. Two general thoughts:

2012-12-11

Using ES6 template strings for regular expressions

ECMAScript 6 template strings [1] give us multi-line raw (backslash has no special meaning) string literals and interpolation. But they can also be tagged, in which case a library can determine the meaning of their content. Steven Levithan has recently given an example of how they could be used for his regular expression library XRegExp.

2012-12-06

I’m the new JavaScript Weekly editor

JavaScript Weekly (JSW) is a popular JavaScript email newsletter. It is reaching 35,000 subscribers and published by Cooper Press (along with several other developer-related newsletters). Peter Cooper, its creator and editor, has hinted at passing the torch to a mysterious new editor for a while. We can now finally reveal who it is: Starting with this Friday’s (Dec 7) issue, I’ll edit JSW. Peter will remain active in the background, doing quality control, suggesting links, etc. But most of the editorial work will be done by me.

A new way of delivering Retina images on the web

Recently, high-resolution screens (Apple calls them Retina displays) have become popular – first on cell phones, then on tablets and now on laptops. I have been waiting for those for literally decades: all other computer components (memory, processor speed, etc.) improved predictably, but screen resolutions did not get much better over the years. The problem for web developers is that things look nicely on these displays if resolution-independent mechanism are used: fonts, vector graphics, CSS effects, etc. However, with bitmap graphics, you are forced to deliver images with many more pixels. That has the potential of greatly slowing things down on the web if you are using a Retina device.

Daan Jobsis has found an interesting solution: Use a high-resolution JPEG image, but but with an extreme compression rate (e.g. 75%):

2012-12-04

Arrays in JavaScript

Update 2012-12-17: New Sect. 3, “The Array constructor”.

This blog post goes deeply into how arrays work in JavaScript: they are much more like objects than you might think.

2012-12-01

Next for iOS: better sharing

There is one important area where Android and Windows 8 are ahead of iOS: sharing data between applications [1]. Interestingly the foundations for improving things have already been laid. There are two parts when it comes to sharing: offering data and receiving data. The offering part already exists [2]: many apps have a “sharing” button. For example, things that can be done with the current page in Safari include: Create a bookmark, send the URL via email, tweet the URL.