Twitter bookmarklet tip: associate a name with a web page

Twitter’s Share Bookmarklet tweets the URL of the current page. This post explains how to automatically add a Twitter name to the default tweet text.


How to write and unit-test universal JavaScript modules (browser, Node.js)

Update 2011-11-19. This post is now mostly superseded by “Bridging the module gap between Node.js and browsers”.

Node.js has a very nice module system that is easy to understand, yet distinguishes between the exports of a module and things that should be private to it. This post explains how the code of a Node.js module can be modified so that it works on both Node.js and web browsers. It also explains how to unit-test such code.


Team sizes: webOS versus Android versus OS X

webOS: une équipe de développement de 600 personnes!” by Christophe Laporte for iGeneration [via @k33g_org] compares the sizes of the teams working on the following operating systems:


Spreading arrays into arguments in JavaScript

Update 2012-02-01: Complete rewrite of the section on spreading constructor arguments.

Sometimes, one needs to spread the elements of an array, to use them as the arguments of a function call. JavaScript allows you to do that via Function.prototype.apply, but that does not work for constructor invocations. This post explains spreading and how to make it work in the presence of the new operator.


Firefox’s extensions get a security review, Chrome’s don’t

Mozilla checks Firefox browser extensions for malicious behavior, Google does not check Chrome extensions.


HP lost its way

Quoting Losing the HP Way (Robert X. Cringely).


Google’s options for Motorola in light of its Android profits

Two recent steps by Google make it seem like the company is moving Android closer to Apple’s model: First it controlled the software more tightly [1]. Second, it bought the hardware vendor Motorola Mobility [2]. The post concludes by summarizing a counter-argument to this hypothesis by Joshua Topolsky.


HP will spin off PC division, stop making webOS hardware


The press release

Quoting the official HP press release [via MacRumors]:
  • HP confirms that it is in discussions with Autonomy [Corporation, see below] regarding a possible offer for the company.
  • HP will consider a broad range of options [for its Personal Systems Group (PSG)] that may include, among others, a full or partial separation of PSG from HP through a spin-off or other transaction.
  • In addition, HP reported that it plans to announce that it will discontinue operations for webOS devices, specifically the TouchPad and webOS phones. HP will continue to explore options to optimize the value of webOS software going forward.
Autonomy Corporation provides enterprise software for automated analysis of unstructured data (text, audio, images, video).

Firefox: the disappearing version number

Interesting development: Mozilla de-emphasizes Firefox version numbers.

TV: Alphas

Zak Penn, Ira Steven Behr And David Strathairn Talk Alphas” is a report by Bryan J. Daggett for Spinoff Online on a session at Comic-Con 2011. Quote:


An introduction to JSDoc

Check out my book (free online): “Speaking JavaScript”. Updated version of this blog post: chapter “JSDoc: Generating API Documentation”.

Update 2011-08-19. Tweet from JSDoc’s creator, Michael Mathews:
Awesome article about JSDoc. I learned (er remembered) a few things from reading it myself! via @rauschma 2ality.com/2011/08/jsdoc-intro.html

JSDoc is the de facto standard for documenting JavaScript code. You need to know at least its syntax (which is also used by many other tools) if you publish code. Alas, documentation is still scarce, but this post can help – it shows you how to run JSDoc and how its syntax works. (The JSDoc wiki [2] is the main source of this post, some examples are borrowed from it.)


What is the correct media type for JavaScript source code?

Question: What media type should you use for JavaScript source code? Answer [via Brendan Eich] and explanations after the break.

Press review: Google buys Motorola Mobility

Update 2011-08-19: Google’s options for Motorola in light of its Android profits

The news in a nutshell:

  • Motorola recently spun off its mobile division into Motorola Mobility.
  • Google has purchased that company for $12.5 billion.
  • Probable main reason for purchasing Motorola: to get patents for defending Android against attacks.
This post will be continually updated, as I find interesting tidbits in various articles.


Bluetooth low energy – two years on a coin-cell battery

Bluetooth low energy (BLE) is part of the Bluetooth 4 standard and enables new devices such as watches and sensors that consume very little power while being able to communicate with general-purpose computing devices such as cell phones and notebooks. Quoting Wikipedia:


JavaScript’s JSON API

JSON is a plain text data storage format. This blog post describes what it is and how to work with it via an ECMAScript 5 API.


Patents: Google versus Microsoft

This post describes an ongoing dispute between Google and Microsoft regarding the recently sold Nortel patents.


Preventing the next Breivik

Quoting “Friedensforscher Galtung: ‚Wir müssen verstehen, wie Breivik denkt‘”:
Die Helfer müssen mit Menschen, die extremistisch denken, in Dialog treten, sie müssen sie im Gespräch herausfordern. Ich selbst habe viel mit Radikalen gearbeitet, mit Rassisten in den Südstaaten der USA, die ähnlich realitätsferne Gedanken hatten wie Breivik. Meine Freunde haben immer gesagt, das bringe doch nichts. Aber das stimmt nicht: Diese Leute wollen, dass man ihre Ideen in Frage stellt, sie lechzen danach, als Gesprächspartner ernst genommen zu werden.
Loose translation:
Social workers have to seek out a dialog with people with extremist thinking, they have to challenge them in a conversation. I myself have worked much with radicals, with racists in the southern states of the USA whose thoughts were similarly removed from reality to Breivik’s. My friends have always told me that that’s no use. But that’s not true: Those people want their ideas to be questioned, they long to be taken seriously in a conversation.
Having these kinds of conversations is not easy, but it is necessary, because it provides a reality check to their thinking.

What’s next for our economy?

During the last decades, the burden of maintaining society has shifted towards the middle and lower class, away from the upper class [1]. The article “How Our Economy Was Overrun by Monsters and What to Do About It” [via @michellegallen] frames the problem as follows:


iCloud icon versus classic Mac icon

The graphic design of the very first Macintosh lives on. Compare:


Adobe Edge: a Flash-like tool for HTML5

Adobe Edge is a Flash-like tool for HTML5. This is an important step for that technology, because it is still lacking in good tools. Quoting the post “Adobe Edge: completing the Flash/HTML cycle”:

JavaScript performance: Array.prototype versus []

Array.prototype contains many generic methods that can be applied to array-like objects. [] is a popular shortcut for accessing these methods. This post examines the pros and cons of using that shortcut.

Update: Inspired by a comment from Kevin Roberts, I’ve added a third way of accessing generic methods, and a conclusion.

Water reservoir in space: 140 trillion times our oceans

NASA’s article “Astronomers Find Largest, Most Distant Reservoir of Water” reports on some truly staggering numbers:

Eight words not to use in your Twitter bio

The post “8 Words That Should Never Appear in Your Twitter Bio” contains good ideas. The two words that I agree with most are: