For a long time, JavaScript has been my go-to language. Of course, in the browser, but on the server too. When I started with JavaScript I spent a lot of time finding ways to reduce “callback hell”, but eventually I just gave in: code generators and systems that require a patched JavaScript engine are justContinue reading “Callback-Free Harmonious Node.js”
Tag Archives: JavaScript
Fixing Events in Javascript
Events are an integral part of Javascript programming. No matter if you use Javascript in the browser or on the server with [node.js](http://nodejs.org), you will be listening to, and perhaps trigger numerous events. Yesterday [I talked about Twitter’s Flight, which, I argued, might be pushing events too far](https://zef.me/5390/decoupling-events-vs-dependency-injection). Nevertheless, the fact that something can beContinue reading “Fixing Events in Javascript”
v8: a Tale of Two Compilers
Ever wanted to take a peek under the hood of v8, Google’s Javascript virtual machine, without having to check out the code and poke around? Here is a nice post that gives a look at what’s going on behind the scenes: V8 compiles all JavaScript to native code. V8 has two compilers: one that runsContinue reading “v8: a Tale of Two Compilers”
Objective-J and Cappuccino, with Francisco Tolmasky
280 North (bought by Motorolla) is the company behind the impressive 280 slides web-based presentation application (a la Keynote) and the framework it was built on: Cappuccino. Cappuccino is an oddball compared to other Javascript frameworks. First of all, it abstracts completely from HTML and CSS, and second of all: it’s not built using regularContinue reading “Objective-J and Cappuccino, with Francisco Tolmasky”
Microsoft to sponsor Windows version of node.js
From the node.js blog: I’m pleased to announce that Microsoft is partnering with Joyent in formally contributing resources towards porting Node to Windows. As you may have heard in a talk we gave earlier this year, we have started the undertaking of a native port to Windows — targeting the high-performance IOCP API. This requires a ratherContinue reading “Microsoft to sponsor Windows version of node.js”
Post-PhD Plans: Cloud 9 IDE
Starting September 1st I will be employed by Ajax.org, the Amsterdam based company that is developing Cloud 9 IDE — not to be confused with the similarly named Amsterdam-based soccer club. Why an IDE in “the cloud”? During the past decade more and more of the stuff we do every day has moved online: e-mail, word processing,Continue reading “Post-PhD Plans: Cloud 9 IDE”
Planning Ahead: the Async Javascript Problem
Yesterday [I posted about spaghetti-free Javascript code](https://zef.me/3715/three-routes-to-spaghetti-free-javascript). A [lot](http://news.ycombinator.com/item?id=2279862) of [reactions](http://www.reddit.com/r/javascript/comments/fvrhj/three_routes_to_spaghettifree_javascript/) [followed](http://www.reddit.com/r/programming/comments/fvrhf/three_routes_to_spaghettifree_javascript/). As it turns out, most people misunderstood my point. That’s probably my fault. Here is at again, more concisely: When you write Javascript you have to think ahead: in the code I’m about to write, is there going to be an asynchronous callContinue reading “Planning Ahead: the Async Javascript Problem”
Three Routes to Spaghetti-Free Javascript
_(If you are familiar with the problems of moving from synchronous to asynchronous programming, feel free to move to the next section.)_ **Update:** A lot of people misunderstood the main issue: [here is another shot at explaining it better.](https://zef.me/3753/planning-ahead-the-async-javascript-problem) Let’s build a script that determines the titles of a set of URLs. Let’s start simple,Continue reading “Three Routes to Spaghetti-Free Javascript”
Async Foreach in Javascript
Javascript comes with a nice method on `Array` objects called `forEach`, it takes a function as an argument and applies that function to eacy item in the array sequentially. It’s Javascript’s version of a for-each loop, allowing you to write code like this: for(var i = 0; i < ar.length; i++) { alert(ar[i]); } or, for theContinue reading “Async Foreach in Javascript”
Moving the Server to the Browser
I think that it’s well-established by now that the majority of desktop software will move to the browser at some point. It happened to e-mail, calendar, word processing and many more applications already. But here’s a crazy idea: what if we move the server to the browser as well? The past week I’ve been playingContinue reading “Moving the Server to the Browser”