Title: Backbone.js Testing
Author: Ryan Roemer
Rating: ★ ★ ★ ★ ½
Publisher: Packt
Copyright: 2013
Pages: 168
Keywords: programming, testing, javascript, backbone, mocha, chai, sinon
Reading period: October 2013
Backbone.js Testing is a short, dense introduction
to testing JavaScript applications with three testing libraries,
Mocha, Chai, and Sinon.JS.
Although the author uses a sample application
of a personal note manager written with Backbone.js
throughout the book, much of the material
would apply to any JavaScript client or server framework.
Mocha is a test framework that can be executed in the browser or by Node.js,
which runs your tests.
Chai is a framework-agnostic TDD/BDD assertion library.
Sinon.JS provides standalone test spies, stubs and mocks for JavaScript.
They complement …continue.
Another Cozi Tech Blog post:
Generating UUIDs in JavaScript
Exuberant Ctags is an essential complement to Vim:
it generates an index of symbol names (tags) for a set of source files.
In Vim, just place the cursor on a function name
and type C-] to go to its definition.
Ctags works well for most of the languages that I deal with,
but falls down badly on modern JavaScript.
Its built-in parser simply doesn't handle declarations like these:
Sizzle.selectors.filters.animated = function(elem) { // ...
ajaxSetup: function( settings ) {
I came across Unbad's workaround earlier tonight.
His code didn't work for me, so I hacked on it until it did:
--langdef=js
--langmap=js:.js
--regex-js=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\{/\1/,object/
--regex-js=/([A-Za-z0-9._$()]+)[ \t]*[:=][ \t]*function[ \t]*\(/\1/,function/
--regex-js=/function[ \t]+([A-Za-z0-9._$]+)[ \t]*\(([^)])\)/\1/,function/
--regex-js=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\[/\1/,array/
--regex-js=/([^= ]+)[
…continue.
Title: JavaScript: The Good Parts
Author: Douglas Crockford
Rating: ★ ★ ★ ★
Publisher: O'Reilly
Copyright: 2008
Pages: 153
Keywords: programming, javascript
Reading period: 27 May–15 June, 2008
Crockford is one of the world's leading JavaScript experts.
In this slim volume, he explores the features of the core language,
both the good parts and the warts.
JavaScript has been redeemed since 2005
with the explosive proliferation of Ajax websites.
Long regarded as a toy language,
suitable for little more than generating popups,
we have come to learn that in the hands of experts like John Resig
(of jQuery fame), JavaScript can be a powerful, expressive language.
Anonymous functions, duck typing, and dynamic objects are all good …continue.
Preloading Ajax data as JSON has helped
improve the load time and perceived performance of our family software application.
Most of the pages in our web client are dynamically generated
in the browser from a complex set of JavaScript and CSS,
so we're always looking out for ways to make them appear more quickly.
More at the Cozi Tech Blog.
It's not at all obvious how to use Visual Web Developer 2008 Express Edition
to debug JavaScript in Internet Explorer.
So I wrote it up at the Cozi Tech Blog.
The JavaScript engines in Firefox 2 (Windows) and IE6
can't handle the new Daylight Savings Time rules in the U.S.
The Date() function returns a value that is off by an hour
if the system time is between the second Sunday of March
and the first Sunday of April.
More at the Cozi Tech Blog.
Update 2008/03/14: Mea culpa.
This is not a widespread problem.
It is caused by the presence of set TZ=PST8PDT
in my C:\AutoExec.bat.
Per KB932590, the existence of the TZ environment variable
will cause the CRT to use the old DST rules.
(I can't remember why I set TZ several years ago.
It's part of the accumulated mess of …continue.
Title: Pro JavaScript Design Patterns
Author: Ross Harmes, Dustin Diaz
Rating: ★ ★ ★ ★
Publisher: Apress
Copyright: 2008
Pages: 269
Keywords: programming, javascript
Reading period: 4 January–? ???, 2008
Title: Ajax Design Patterns
Author: Michael Mahemoff
Rating: ★ ★ ★
Publisher: O'Reilly
Copyright: 2006
Pages: 352
Keywords: web, ajax
Reading period: 29 October-?? November 2007
I've been meaning to play around with Greasemonkey for a couple of years.
Greasemonkey is a Firefox extension that allows users to install
scripts that make on-the-fly changes to the look and feel of third-party websites.
For example, adding price comparisons to Amazon
or thumbnail images to Google search results.
UserScripts.org has a large repository of Greasemonkey scripts.
I finally built my first script the other day.
We're putting together a new feature at Cozi that integrates
partner websites with our site.
Since the feature is not yet announced, I'll just say that partners
will add a link to Cozi on many of their database-driven pages.
That link has a complex, …continue.
Previous »