Categories
JavaScript Writing

Future proofing books

The downside of the recent flurry of activity regarding JavaScript/ECMAScript is that I’m in the middle of tech editing Learning JavaScript, second edition, and not sure what to include.

On the one hand, it’s extremely important to me that the book be accurate, so my inclination is not to including anything that isn’t implemented in all four of my target test browsers (IE8, Firefox 3.x, Safari 3.x, and Opera 9.x). However, we plan on the book having a two year shelf life, and the discussion around Harmony notes implementations of ES 3.1 as early as next spring.

It used to be, at one time, companies and organizations would work with tech book companies and authors in order to ensure the accurate representation of information. What’s happened, though, is that many of the people working these issues on the committees are now writing their own books, and don’t particularly care about the accurate dissemination of information in other books. This in addition to everyone and their brother (rarely sister) having their own weblog, wiki, email list, Twitter, ad nauseum and if books like mine have inaccurate information, they can just publish The Truth in their own spaces.

So, now I’m left with a decision: don’t include anything at all on ES 3.1, and face emails and book criticisms about why I didn’t include coverage of such and such; or try to decipher what will eventually be implemented from this new effort, and run the risk of the pundits carefully pointing out everything wrong with the book, and how can O’Reilly publish a book by an author who is too stupid to know what she’s talking about.

Categories
Stuff

Four shorts make a long

Categories
Critters

Squid Friday

Lots out of Australia about squid this week:

From ABC:

New Zealand’s mysterious colossal squid, the largest of the feared and legendary species ever caught, was not the T-Rex of the oceans but a lethargic blob, new research suggests.

At least it’s not a costume filled with possum road kill.

To answer last week’s question, as to why the giant squid is a reasonable proof there is no bigfoot:

The giant squid exists in a world alien from ours, 3000 feet below the surface of the water, with ammonia rather than blood running through its veins. Our world is as deadly to it, as its world is deadly to us. Yet we have several specimens to study, and have for over a hundred years.

Bigfoot, on the other hand, is supposed to live in communal groups, stand 7 or 8 feet tall, is practically our next door neighbor…and we have no actual physical proof of their existence.

Uh huh. Right.

Categories
Places

Cheap gas

Recovered from the Wayback Machine.

You can tell when the gas prices are lower: the stations are filled with big SUVs and trucks. And today we find out that Missouri has the lowest gas prices in the country. For now, that is.

I used some of the lower gas prices to fuel a trip to see Johnson’s Shut-Ins before it closed this year. I’ll have pictures in a later posting, but for now, it was good to see the park, and good to see how much it has improved.

I’ve been critical of both Ameren and DNR (Department of Natural Resources) in the past, but they both did a good job cleaning up the shut-in area, and restoring the Fens. I’m looking forward to the full opening of the park next year, when we’ll be able to walk around the entire park. I’m also looking forward to a fully restored Ozark Trail.

The park is still fragile, though, and use is severely restricted. Rightfully so—such devastation won’t be cured overnight. Food and drink are strictly forbidden, as are dogs. I was therefore irritated to see a couple of ladies carrying their food hamper and McD’s soft drink cups to the shut-ins, and even more at the couple letting their dog piddle on some of the newly growing rare and endangered fens. How quickly people forget how close we came to losing a natural treasure.

I want to save the world, but can we save it for just some of the people?

Categories
HTML5 Semantics

Separating presentation from semantics

After all these years, we have finally reached the point where we’ve separated page organization from presentation, and now we’re about to embark on the same mistakes again, but this time with presentation and semantics.

I’ve been following the issues associated with the vocabindex Drupal module, including one where the person submitting the bug stated the vocabindex use of UL was incorrect. We’re supposed to, MXT writes, use definition lists rather than unordered lists for any lists of terms with associated definition.

At first glance, it does seem as if the vocabindex module is using the unordered list incorrectly. After all, look at any of my category pages (such as the one for the Semantic Web)—what you see is a list of “terms” and their associated definitions. An obvious candidate for definitions lists.

Look more closely, though. In my sidebar menu I list the vocabindex terms as links to web page URIs, but there is no definition attached to any item. The description, if one is given, is, instead, added as a title attribute to the item and displayed only when the item has cursor focus. Yet, it’s the same data. Does this mean, then, I’m somehow not properly displaying my menu items? Should I have a huge sidebar, with the item description given underneath?

More importantly, whether I have a given text description for each item is purely optional, some do, some don’t. Yet the items in the list have meaning without any associated description. In fact, each item in the list is really nothing more than a label for a bucket to hold content. I could just as easily use foobarsillyputty as labels, except that I’m trying to use “meaningful” labels in order to enable you all to better find past content.

In the absolutely ancient W3C page where lists are covered a list of ingredients is given as an example of an unordered list:

  • 1 cup sugar
  • 1 cup oil
  • 2 cups flour

However, I don’t see that anyone would have a problem with adding parenthetical information to this list in order to further clarify the items:

  • 1 cup sugar (light brown granulated by C & H)
  • 1 cup oil (canola or corn, but not olive)
  • 2 cups flour (white or mixed white and whole wheat)

This is really nothing more than what the vocabindex is doing with the vocabulary index terms within both the index pages and my sidebar menu: a listing of items and a (parenthetical) description to clarify what that item is. However, it’s only when the description is displayed as a “tooltip” that one sees the item as a clarification phrase, only. When presented in the index pages, it “looks” like a definition list, and so we want to have it marked up this way— mixing up semantics and presentation.

A definition list is assumed to have two pieces of information; the term or phrase and an associated definition. Even when not present, the definition is still assumed to be forthcoming at some point— not having it is the exception, not the rule. An unordered list is just that: a list of items. They can be a list of items to buy at the store, select from in a form, or click on in a web page. There’s no assumption that any additional information is necessary for the item. If there was, Drupal would make this information mandatory rather than optional. The application and associated developers would definitely discourage the use of the items in a tag cloud or other format where only the term is given because the term, by itself, would be meaningless.

Yet we look at how the terms are portrayed in a page like the vocabindex page I linked above, and that’s enough for us to say we should use one form of markup over another because it’s more “semantical”. Further exploration online at other sites who attempt to define the differences between unordered lists and definition lists shows the same thing: if we see two pieces of data, we’re assuming a definition list, because that’s what it looks like—not what it is.

The HTML5 document adds another key element to the discussion of definition lists by stating that definition lists are name-value pairs. From this can we deduce, then, that the name has no meaning without the value. That’s my interpretation: that a definition list is the proper semantic markup only when data is defined within a context of names and associated values, both of which are meaningless without the other. If, however, *HTML5 allows us to list the names without values, or the values without the names, then the HTML5 document is imprecise, and we should just use whatever we want to use— semantics can not be derived from imprecision.

Currently, in Drupal, vocabulary terms are discrete labels, nothing more. Any description is for clarification not definition, and isn’t essential to the meaning of the term. Forget how the vocabindex pages “look”, and focus on what the data means. If we can’t do that, then this whole semantic markup thing is a bit of a farce, really.

*Confirmed: it doesn’t