2011-11

Web technology stacks – from LAMP to Janos

[2011-11-11] dev, nodejs, javascript, webdev
The classic stack of small- to medium-scale web technologies is LAMP (Linux, Apache, MySQL, PHP). With the rise of JavaScript and NoSQL databases, another stack is poised to replace it: Janos (client-side JavaScript, Node.js, NoSQL database).

Load Node.js modules in browsers via lobrow

[2011-11-09] dev, javascript, jsmodules, jslang
Update 2011-11-19: Bridging the module gap between Node.js and browsers

Node.js has the advantage of letting you use JavaScript on client and server. Thus, it is a major nuisance that you can’t put portable code into a file that can be loaded on both platforms. This post presents a solution.

Improving the JavaScript typeof operator

[2011-11-08] dev, javascript, jslang
The typeof operator in JavaScript is partially broken. This blog post explains how to fix it and how to extend its use to objects.

Customize LaTeX output from a shell (Unix)

[2011-11-07] latex, hack, computers
This post explains how to influence LaTeX output via a Unix shell, including the insertion of a word that you pass to a script. It is partially based on an answer given by Will Robertson on StackOverflow.

Myth: JavaScript needs classes

[2011-11-04] esnext, dev, javascript
Updates:
  • [2012-03-17] I completely rewrote this post and changed its name (which previously was “JavaScript does not need classes”).
  • [2012-07-29] Classes have been accepted for ECMAScript.next.
  • [2012-10-03] Since this article has been written, it was decided that ECMAScript will have the special property __proto__ instead of the <| operator.
  • [2013-10-21] Instead of the extension operator, ECMAScript.next will have the function Object.assign().
A popular JavaScript myth is that JavaScript’s prototypal inheritance is complicated and that to fix it, we need classes. This post explains that that opinion is not completely wrong, but misses some important points.

Uncurrying “this” in JavaScript

[2011-11-02] dev, javascript, advancedjs, jslang
Update 2011-12-17: New section “Making uncurryThis() safe to use in the presence of untrusted code”.

This post explains applications of uncurrying and currying this in JavaScript. It has been triggered by a tweet of Brendan Eich’s.

2011-10

A quick overview of JavaScript

[2011-10-30] dev, javascript, jslang
Update 2013-06-22:Basic JavaScript: an introduction to the language” is an improved longer version of this post.

This post gives an overview of JavaScript that is as short as possible, but explains every major feature. Give the language a chance! You have to learn its quirks, but then it is fun to program in.

Real-world Twitter

[2011-10-29] mobile, app, iphone, computers
“Big Words” is a very simple iPhone app idea: Use your mobile device to display Twitter-style messages to other people, in the real world. Fittingly, one of its creators is a Twitter co-founder.

JavaScript: Why the hatred for strict mode?

[2011-10-28] dev, javascript, jslang
There seem to be people who hate ECMAScript 5’s strict mode. This post shows that this hatred is not justified and provides work-arounds for features that are missing.

String concatenation in JavaScript

[2011-10-25] dev, javascript, jslang
There are two ways of doing string concatenation in JavaScript. This post demonstrates them and explains which one is faster.