JSON+Comments

/* UPDATE: */
Found this old (from late 2005) post from Douglas Crockford himself on comments in JSON which I think validates the thinking I have presented here in this blog post. He says:

A JSON encoder MUST NOT output comments. A JSON decoder MAY accept and ignore comments.

This is exactly what I am advocating with this [...]

console.log() in the wild

I ran across something the other day at work, and figured it would be good for a quick little blog post. Raise your hand if you’re accustomed to using console.log() (or the other more exotic console{} methods) in your development process. Now raise your hand if you’ve ever left that code in, either intentionally or [...]

Apple vs. Today’s Web

Regarding Apple’s recent iPhone/iPad SDK TOS update sneak-peek, the signal-to-noise ratio of logical reasoning amidst the sea of self-inflated opinions and FUD has become unbearable.
So what am I going to do? Compound that mess with my own opinions, of course! And they are just that, opinions. Take them as you will. I only ask [...]

Posted in: JavaScript, Misc by getify No Comments , ,

Grab UI by the Handlebar

A couple weeks back, I talked about HAML and why I’m not a fan of its approach. I promised in that article that I would be following up with some discussion of how I think UI templating should work. I intended to post earlier than this, but then I dove into a fun new coding [...]

Simulated Chaining in JavaScript

What I have to talk about here is not going to be earth shattering, but it is a technique that has proved useful in a few different sites and scenarios for me. In fact, I regularly get questions regarding advanced use cases for LABjs (a parallel JavaScript loader), and invariably it comes back to something [...]

HowTo: Custom “Error” types in JavaScript

There are lots of patterns for various styles of object-oriented JavaScript. They range from the simple few-liner patterns to the complex libraries with lots of syntax sugar. Also, this great book on OO JS by Nicholas Zakas is a must-read.
However, I have to admit that I am typically not a fan of most Object-Oriented JavaScript [...]

Switch to our mobile site