Tag: JavaScript

How to Pronounce JSON

Reading this will probably be a waste of your time. It’s not an official document. It’s a preference.

Some time back I wrote a little ditty on how to pronounce MySQL. The article, having lived on a UW server during my tenure there, is now gone. The gist: It’s “My S-Q-L,” not “My Sequel.” Yes, that’s how it’s pronounced, even if they’re flexible about it.

Arbitrary? Yes. Truth? Yes.

Normally I don’t write about things like this because they get me into trouble and they tend to start the worst type of flame war: one that is based solely on preference. I love language and the pronunciation of language. My rules for pronunciation are fairly arbitrary but I like to adhere strictly to those rules. Does that make sense? I’m irrationally rational.

NASA = nă-sŭh
Tron = trŏn
Megatron = mĕh-gŭh-trŏn
JSON = Jason = jā-sŭn (not jā-sŏn)

Clear? It’s Jason, like the boy’s name, like -and-the-Argonauts.

Why? Because of the obvious similarity in spelling to the boy’s name and the ease of pronunciation that similarity affords. The “O” in JSON stands for Object. Fine. That’s still not a good enough reason for me to change the way I say it.

When possible, acronyms are created in such a way as to ease their pronunciation. Why? Because it makes them memorable, even catchy, which aids in their adoption. Remember the Ajax story? The reason why XMLHttpRequest became such a big hit all of a sudden in 2005–even though developers had been using it for quite some time–is because 1) Jesse James Garrett wrote about it and 2) he used a catchy name.

The name itself is arbitrary. There is no reason why this data format that we label JSON could not have been called JSOLDTF: JavaScript Object Literal Data Transfer Format.

So why didn’t Douglas Crockford call it that? Because it’s unpronounceable.

LASER is not pronounced lă-sēR, even though the A is “Amplification,” the S is “Stimulated,” the E is “Emission,” and the R is “Radiation.” It’s pronounced like ley-zer. Why? Because it sounds better.

Arbitrary? Yes. Truth? Yes.

Now, saying all of that, I promise not to correct you or make fun of you if you pronounce JSON like you’re trying to name a new Transformers character, even if you are Douglas Crockford. Just please don’t try to correct me, either, and everything will be yacht rock.

Dynamic Breadcrumbs with JavaScript, Revision 4

Updates from Revision 3:

Continue reading …

Dynamic Breadcrumbs with JavaScript, Revision 3

And here they are again. This time I’m using an unobtrusive, object-oriented approach. The same customizations apply. The major difference between this version and the others is that you no longer need to add any script tags to the body of your web page.

Continue reading …

Dynamic Breadcrumbs with JavaScript, Revision 2

What a difference a few years makes. The new script is much cleaner than the old one. The source with comments is below. Below that is the source without comments. Below that is the source without comments or the character replacement feature. With a few modifications you could whittle it down even further to fit only the parts you need for your site. I hope you find it useful.

Continue reading …

Dynamic Breadcrumbs with JavaScript

Note: This script has been updated. You are free, of course, to use any version.

Update 11/6/2007: In updating WordPress I have apparently borked the display of the code. It is in such disrepair that I can’t remember how to put it back together. Given that this is outdated code (and now broken) and given that I have no intention of rewriting it in its original state, I don’t recommend using it.

I wrote this in 2002. I think this was the first time I used JavaScript to solve a real problem. It works well and it’s still in use on a few web sites, including HealthLinks, the site I currently work on at UW. I plan to refactor and publish an updated version soon. For now, feel free to try it out.

Continue reading …