2012-11-27

Coercing objects to primitives

This blog post looks at how JavaScript coerces objects to primitives. If you don’t know the difference between primitive values and objects, I suggest you consult my article “Categorizing values in JavaScript” at the Adobe Developer Connection. This post was triggered by the following tweet by David Bruant:
!!(new Boolean(false)) #wtfjs
The result of the above expression is true. Let us first learn about coercion in JavaScript. We can then use that knowledge to understand this result.

2012-11-26

Greg Smith on Goldman Sachs’s culture

Goldman Sachs executive Greg Smith resigned via an article in the New York Times, on March 14:
It might sound surprising to a skeptical public, but culture was always a vital part of Goldman Sachs’s success. It revolved around teamwork, integrity, a spirit of humility, and always doing right by our clients. [...] I am sad to say that I look around today and see virtually no trace of the culture that made me love working for this firm for many years.

[...] It makes me ill how callously people talk about ripping their clients off. Over the last 12 months I have seen five different managing directors refer to their own clients as “muppets,” sometimes over internal e-mail.

2012-11-21

Jed – a JavaScript internationalization toolkit

Internationalization is still a tricky problem: we are still figuring out how to encode text properly, let alone store content in a manner that lets us translate it easily. In contrast, in other areas of web development, tools and technologies are in place so that even non-technical users can be productive. One example is content authoring – you don’t have to know how to write HTML or how to set up a server in order to publish a blog.

2012-11-19

JavaScript inheritance: beyond the basics (video)

The video recording of my JSConf EU talk “JavaScript inheritance: beyond the basics” is online (you can also download the slides). Outline:
  • JavaScript inheritance basics
  • Object exemplars
  • ECMAScript 6 classes
  • Super-references
  • __proto__

2012-11-18

A proposal for using Canvas in web workers

Ian Hickson, editor of the HTML spec, has proposed a way to let web workers use Canvas.

2012-11-13

Nokia HERE (maps etc.): coming to iOS, Firefox OS and Android

Today, Nokia introduced a new brand for its location and mapping services: HERE. HERE applications will be available for several operating systems:

Variable declarations: three rules you can break

This blog post mentions three rules that are commonly given for using var statements. And then tells you when you can break them. To make things easier to understand, I somewhat disparagingly call the rules “conventional wisdom” and breaking the rules “unconventional wisdom”. But I will also explain why the rules have been created in the first place.

2012-11-12

Four talks on ECMAScript 6/ECMAScript.next

Recently, there have been several good talks on ECMAScript 6: Additionally, you can take a look at the guide to my blog posts on ECMAScript.next.

2012-11-09

A guide to 2ality’s posts on ECMAScript.next/ECMAScript 6

This blog post gives an overview of the 2ality posts on the next version of ECMAScript, ECMAScript 6 (code-named ECMAScript.next). All of those posts have the label esnext. Consult the sitemap for a list of all guides.

2012-11-08

Daylight savings time

A few days ago, daylight savings time (DST) ended again in Germany (we call it Sommerzeit, literally “summer time”). Changing the time twice a year is a silly thing to do – it brings few savings and quite a bit of cost and inconvenience. The Pirate Party has now started a European initiative (page in German) for abolishing DST. The complicated thing in Europe is that all states have to participate, otherwise changing regulations does not make sense.

Dirk Haage pointed me to a nice visualization of daylight savings time. The visualization makes it obvious how we should change time – we should always have DST. I’d rather have slightly longer afternoons than early mornings. As a complementary measure, schools could start later. There is even evidence (page in German) that starting at 8 o’clock is too early for children (it certainly is for parents).

2012-11-07

Property assignment and the prototype chain

This blog post examines how the prototype chain of an object affects assignments to its properties. It provides a more detailed look than the previous, more comprehensive, blog post “Properties in JavaScript: definition versus assignment”.

2012-11-06

The text “__proto__” can break a webapp

[This post is part of a series on the special property __proto__]

The text “__proto__” can still break webapps if it appears somewhere in the content, as I was reminded of today, via Domenic Denicola and Peter van der Zee.

2012-11-04

What is the best display aspect ratio for tablets?

One marked difference between current tablets is the aspect ratio of their displays. This blog post explores the pros and cons of the different aspect ratios, along with the question whether one of them is best overall.

2012-11-02

Why aren’t there more women in tech?

We should never forget that programming was initially a female profession. It was only later that women were slowly driven out of the industry. I’ve always been surprised that there aren’t more women in tech. I suspect that it is partially an image problem – especially computer jobs are much better than their reputation. Case in point: at the university of Munich, many more girls study “Bioinformatics” or “Media Informatics” than plain ”Informatics”. (Valid) reasons I’ve heard were: seemed more interesting and contains less math. The interesting part is that, in my experience, students of Bioinformatics and Media Informatics are just as good at Informatics as Informatics students and often end up in “normal” computer jobs. Yet, prior to these degrees, these girls might not have studied anything computer-related.