2011-03

JavaScript: how it all began

[2011-03-23] dev, javascript, jslang, jshistory
This post presents a brief history of how Brendan Eich created JavaScript and what influenced its design decisions.

Mac tips (not only) for switchers

[2011-03-22] apple, hack, computers, mac
If you are new to the Mac, everything can feel a bit off. This post tries to help. And might even teach you something new if you are already familiar with the Mac. I am also mentioning some advanced things which should be interesting for programmers and people coming from Linux.

Make node.js code pretty via a generator-based library

[2011-03-19] esnext, dev, nodejs, javascript
The JavaScript server environment node.js has an intriguing approach to coding: Do other things while waiting for results from, say, a database. But don’t use threads to juggle those things, use continuations. This is similar to what client-side JavaScript code (such as Ajax calls) already looks like. Not having to create threads saves a lot of overhead when loads are high. Multi-core and multi-processor systems can still be supported, by scheduling one “instance” of node.js per core/processor.

The only problem with node.js code: You get one nested function expression for each outside request you make.

Mac tip: remount an ejected storage device (without unplugging)

[2011-03-17] apple, hack, computers, mac
If a storage device is connected to a Mac via USB or Firewire, you can eject it so that it disappears from your Mac. This post explains how to remount it, without unplugging it and then plugging it back in. This is mainly of interest if you use an external (non-SSD) hard drive with Time Machine: After a backup, if you don’t want it to make any noise, you can eject it and it spins down. Then the problem is how to remount it for the next backup.

JavaScript values: not everything is an object

[2011-03-14] dev, javascript, jslang
Update 2012-08-14: Rewrote most of the post, added Sect. 4 explaining typeof and instanceof.

This blog post explains that JavaScript has two main kinds of values: primitive values and objects. There are several things one needs to be aware of when working with them.

Lightweight JavaScript inheritance APIs

[2011-03-05] dev, javascript, jslang
Creating objects via constructor functions is fairly straightforward in JavaScript. But as soon as you want to do inheritance, things become complicated. This post examines how inheritance works in traditional JavaScript. It then presents four APIs that make things easier, without adding too much bulk to the language: ECMAScript 5, YUI, Prototype.js, and John Resig’s Simple Inheritance.

Web sites: dynamic page extension versus paged navigation

[2011-03-03] dev, hci, webdev, computers
Recently, more and more web sites are showing their content via dynamic page extension instead of paged navigation.
  • Dynamic page extension: New content is appended to the current page. Examples:
    • DZone and normal Twitter recognize when you are close to the end of the page and add new entries.
    • Mobile Twitter has a link at the end of the page to “show more”.
  • Paged navigation: New content is shown on a new page. Example: Google’s search results.
But good old-fashioned paged navigation has several advantages:

Gender-neutral pronouns in English

[2011-03-01] english, life
Fill in the blank, with a possessive pronoun such as “my” and “your” to express that it’s the user’s name:
The user has to click on _____ name.

2011-02

Commit messages indicate what programming languages make people swear the most

[2011-02-27] programming languages, dev
Cussing in Commits: Which Programming Language Inspires the Most Swearing?” is a great read. It refers to someone who has analyzed commit messages on GitHub to determine which programming language caused committers to swear the most.

Die zweite Stammstrecke: schlecht für München

[2011-02-25] politics, life, münchen
Anmerkung: Überzeugt von den untenstehenden Argumenten? Dann bitte weitererzählen!

Update 2011-08-09:S-Bahn: Das Aus für die zweite Stammstrecke!”. Bei der Lektüre genau darauf achten, wer gegen den Abbruch des Projekts protestiert.

Ich war vorgestern auf einem Vortrag über die zweite münchner Stammstrecke, gehalten von Martin Runge, dem Fraktionsvorsitzenden der Grünen im Landtag. Da bei diesem Thema Parteiinteressen eine relativ geringe Rolle spielen (OB Ude ist für die zweite Stammstrecke, ebenso die Staatsregierung), war ich mir relativ sicher, objektiv informiert zu werden. Dieser Blogeintrag ist meine Mitschrift des Vortrags. Als Münchner ist es wichtig, die folgenden Tatsachen zu kennen, denn momentan besteht noch die Möglichkeit, die zweite Stammstrecke zu verhindern und die in vielerlei Hinsicht bessere Alternative des Südrings zu ermöglichen. Zusammenfassung: Die zweite Stammstrecke ist weit teurer, als wir uns momentan leisten können, bringt erstaunlich wenig, und würde erst sehr spät fertig werden.