Tags: javascript

Broken Promises


Around 2012 I found out about Promises. I realized that they solve a lot of the pain points I have with async JavaScript, namely pushing error handling to the edges, elegantly making sure only one completion is allowed (preventing numerous accidental race conditions) and allowing composition of async operations in a unified interface. I was convinced and became a fanboy and advocate. Since then I’ve become disillusioned.


Posted 2016-02-02T05:00:00.000Z.

Multiple Inheritance in ES6 with Proxies

Inheritance in JavaScript

As you probably know, JavaScript features an inheritance pattern called prototypal inheritance. In simplified terms, it means that objects have a prototype, and when a property of an object is accessed, it’s first checked if the object itself has the property, and if not, the same is done for its prototype and so on. This is a very powerful model, not least because of its flexibility. You can even use it to simulate classical inheritance.


Posted 2012-11-28T05:00:00.000Z.

Ludum Dare 24

Yay I’m finally participating!

Yes, after observing for a few times I decided to participate in Ludum Dare myself this time. I had quite a few ideas based on the themes up for voting when I went to bed last night, I just kept wishing that the theme would not be “Companion”. I woke up in terror seeing that the theme was “Evolution”. My first few ideas weren’t even ideas, they were just memories. “Oh, right, that’s Osmos… Yeah that’s Spore, dammit…”. No original / plausible ideas whatsoever.


Posted 2012-08-26T05:00:00.000Z.

Vendor Prefixes - A Compromise

Vendor Prefixes: Good / Bad?

Vendor prefixes rock and suck at the same time. They allow browser vendors to experiment with new features and gather feedback from developers both for the implementation and the standard. This is Good(TM). The problem is they are experimental by nature, the features they expose are subject to change and the prefixed version is supposed to die when the feature is standardized and the implementation is no longer experimental.


Posted 2012-08-24T05:00:00.000Z.

JavaScript Green Threads

What on Earth are they?

For an introduction to green threads, I suggest reading this Wikipedia article. What they mean in this context is however a bit different, as in JS there is normally no threads at all, and because callbacks in JS are quite easy and event loops are usually controlled by things outside your control, you might feel that there’s not much need for scheduling control.


Posted 2012-07-05T05:00:00.000Z.



If you stumbled on this, you’ve probably read where this all started from. An issue was reported for Twitter Bootstrap, because JSMin failed at minifying the code in bootstrap, due to a combination of two simple lines. @fat responded that the code is correct and that the problem is with JSMin, and closed the issue. While I disagree a bit with that decision, since it’s breaking things, I acknowledge that he’s correct in saying so, and it’s his decision.


Posted 2012-04-17T05:00:00.000Z.