Archive for the ‘Uncategorized’ Category

Anyone know of a supplier of fresh pistachio nuts?

April 6, 2008

Recently I purchased some pistachios from the grocery store.  After tasting a few, I threw them out.  They tasted horrible.  It was clear that the pistachios were harvested a long time ago, and had been sitting around.

I would like to find a place (in the U.S.) which actually grows pistachios.  I have heard that some suppliers will actually Express Mail the pistachios the very same day that they are harvested.  That’s what I want.  I want to be eating the pistachios within a day or two of being harvested (and I’ll freeze the rest).

Does anyone know of a supplier of fresh pistachio nuts?

Why JSON is Important to You!

April 5, 2008

WHAT IS JSON?

JSON stands for JavaScript Object Notation. (JSON is pronounced like the name Jason)

It is a data format. (XML is also a data format)

The JSON data format is ideally suited for consumption by a JavaScript program. (In fact, JSON is JavaScript!)

WHY SHOULD I CARE ABOUT JAVASCRIPT?

Because Ajax applications use JavaScript. (And because JavaScript is very cool)

BUT AJAX APPLICATIONS CAN PROCESS DATA FORMATTED AS XML, SO WHY BOTHER WITH JSON?

If the data is formatted as XML then Ajax is limited to fetching data from the same domain (website) that the Ajax application came from.

If the data is formatted as JSON then Ajax can travel across domains. That is, Ajax can access data from anywhere. Think of the power of this: a single Ajax application, running in your browser, can reach out and grab data from an unlimited number of web services, and present it in your browser in a coherent fashion. Awesome!

WHAT DOES JSON LOOK LIKE?

Here’s information about a person, his website, and his email, all structured as JSON:

{”person”: {
“name”: “John Doe”,
“website”: “http://www.example.com/”,
“email”: “jdoe@example.com”
}
}

HOW IS THE DATA IN JSON EXTRACTED?

Very easy: (suppose the variable “data” holds the above JSON data)

data.person.name returns “John Doe”
data.person.website returns http://www.example.com
data.person.email returns jdoe@example.com

ARE THERE WEB SERVICES THAT SERVE UP JSON?

Yes. For example, all of Yahoo’s Web Services can return JSON if it’s requested. Here’s an example:

http://api.search.yahoo.com/NewsSearchService/V1/newsSearch?appid=xyz&query=Obama&output=json

SHOULD MY WEB SERVICE SERVE UP JSON?

I think that it would be good for your web service to be capable of serving up both XML and JSON. You might implement it in the same way Yahoo does, e.g.

http://www.example.com/web-service?output=json

http://www.example.com/web-service?output=xml

WHO DISCOVERED JSON?

JSON is the brainchild of Douglas Crockford, one of the preeminent JavaScript coders in the world today (http://www.crockford.com).

WHERE CAN I GET MORE INFO?

See the excellent book: Bulletproof Ajax, by Jeremy Keith, p. 77-87

How to create a good domain name

March 13, 2008

Which is the best domain name?

  1. www.webstandards.org
  2. www.web-standards.org
  3. www.web_standards.org

Answer: www.web-standards.org

Search engines read a hyphen in a domain name as a space. Thus the above domain names are read (and indexed) by search engines as:

  1. webstandards
  2. web standards
  3. web_standards

Most likely, someone interested in learning about web standards will type in this at a search tool: web standards

Most likely a person will not type in: webstandards or web_standards

So, with www.web-standards.org as your domain name the keywords that a user enters at a search tool match your domain name.

Furthermore, all inbound links are reinforcing the idea that your web site is talking about “web standards.” Each inbound link is essentially saying, “Hey, that web site has information about web standards”

Recap: a user types in “web standards” at a search tool. Your domain name is read and indexed by search tools as “web standards.” All inbound links say, “That web site is talking about “web standards.” Wow! That’s a lot of confirmation that www.web-standards.org is the place to go for information about “web standards.”

How to Create a Good Domain Name

  1. Determine the most common keywords a user would enter at a search engine.
  2. Take those keywords and arrange them in a form that is memorable (you may need to add some “filler” words).
  3. Connect the words by hyphens.