“javascript”
13 posts under this tag.
As I said on a previous post, I believe Spanish, my mother tongue, has a low status on the web. And as I laid there pondering the subjectivity of my assessment, I remembered Mihaly CsikszentmihalyiWP’s fascinating account of how (and why) he became a scientist (it appears in John Brockman’s excellent Curious MindsAM, a compilation of similar tales by top-notch scientists and a sure recommendation to anyone).
The particular anecdote that came to mind was when he and a friend quarrelled over whose neigborhood was the more communist (the matter was relevant because he was living in Italy and the country was then in political turmoil). Their brilliant analytic idea to try to settle the question was to count out the circulation of the left- and right-leaning newspapers in each of their neighborhoods’s newsstands. This of course sent them into all sorts of interesting statistical considerations, but it put them on the path of finding the subtle answers to their question, and it was certainly better than “the hocus-pocus most adults rely on to bolster their arguments”.
So I want to try to do something similar with my question—what is the linguistic vitality in the web of 14 languages?—and this post will be the beginning of my investigation. For reasons of practicality and personal bias, the 14 languages I’m going to settle to are: EnglishWP, GermanWP, FrenchWP, PolishWP, JapaneseWP, DutchWP, ItalianWP, SwedishWP, PortugueseWP, SpanishWP, FarsiWP, ChineseWP, EsperantoWP, and HindiWP.
It’s one of those moments when my head spins, twirls, swirls, and whirls. I’ve been seriously reading JS, CSS, and UI, since yesterday but it was just a couple of hours that it all came together. Let’s begin this Bushean trail with Ashley Pond V’s mindblowing, free web-book Developing Featherweight Web Services with Javascript. Then hop on to Sergio Pereira’s excellent Developer Notes for prototype.js. (Prototype.js, if you must know, is the JS framework.) Glen Murphy (recent googler) has a lot of interesting JS projects up his sleeve (say, this clock), and if you want clarity in this muddleheaded webworld, read everything you can find from Douglas Crockford (recent Yahoo)—all he’s written on JS is gobble-up-worthy, specially recommended are Prototypal Inheritance in JavaScript (it’s so short and yet it will change completely how you write JS) and Private Members in JavaScript (a wonderfully clear and short overview of JS object-orientedness). Did you know about JSON (Javascript Object Notation)? One last word on JS coding (and learning), please don’t do it without an HTML Real-Time Editor, a Javascript Shell, and a Javascript Development Environment—just don’t.
Yahoo! has a pretty nice UI blog going on (a couple of days ago, for instance, they did a nice post on the Patterns Behind the Yahoo! Home Page Beta) and they recently released an awesome Pattern Library (Yahoo! is becoming pretty cool lately… at least for developers). UI patterns seem to be all the rage these days and deservedly so. Jenifer Tidwell recent O’reilly, Designing Interfaces, looks set to become a classic (and some very worthwhile excerpts are available online). Out in the wild web, there’s even a pattern of how to build patterns, an interesting conversation on patterns here (intro, 1, 2, 3, 4), and Nine Tips for Designing Rich Internet Applications to which I wholeheartedly agree.
Doesn’t it just floor you how smart and fast things are becoming?
OK, back to work.
Since Javascript 1.2 and later there has been a cool and very powerful literal syntax for functions:
var sum = function(x, y) {return x+y}
A couple of weeks ago I found an interesting use of this syntax. Missing Ruby’s wonderful each function, I decided to implement something similar in JS, and, after some experimentation, ended up with this:
function each(a, f) { for(var i=0, l=a.length; i<l; i++) f(a[i]) };
The function syntax comes in handy when you use this each:
each([1, 2, 3, 4, 5], function(e) { alert(e) });
It may not be as satisfying as Ruby’s each, but it’s quite useful.
|