The Importance of XHTML Validation

When will I ever learn?

Miraz has told me again and again — validate your pages after making changes to your WordPress theme templates. She even advised readers in our book, WordPress 2: Visual QuickStart Guide. And every time I validate, I find errors, proving that it’s a step I really do need to take.

Yet I continue to skip this step when I tweak my theme’s template files on every single blog I run.

This morning, I got an e-mail message from someone named Tine who wrote:

I’m completely new to WordPress but found your site because of the book you have made and was curious.

Are you aware that your blog don’t look good in Explorer 6? Some of the text to the left is cut off.

I use Explorer 6 on XP Pro and 1024×768.

Uh-oh.

I fired up my PC and loaded up my home page in Explorer 6. The situation was worse than Tine reported. What appeared did not look much like my site at all. And in the status bar, Explorer was politely telling me that page had errors but didn’t offer any way to find out what they were.

My first instinct was to panic. But then I remembered the XHTML validator at http://validator.w3.org/. I ran the page’s URL through the validator and settled down to find and fix the 110 errors it found.

Sheesh.

The main culprit in this case was some code I’d inserted into my post.php file to display RSS links beside category names in each post’s header. This rather slick piece of coding, which I was pretty proud of, contained the dreaded unencoded ampersand error. That means I’d included & in the code when I should have included & in the code. That error was all over the place, but Explorer seemed to be choking on it in the new code. When I fixed its first occurrence and reloaded the page in Explorer, the page appeared fine, although the status bar smugly reported that there were still errors in the document.

Other problems included

    and tags without

  • and tags. Oops. And

    tags without tags. (It appears that ecto was causing that problem in the way it codes Technorati tags. Good thing I’m not using tags in my posts anymore.) Of course, all my Amazon.com book cover links were missing alt attributes. And some of my rotating ads used IMG instead of img for coding. The list goes on and on.

    Of course, if I’d been validating the XHTML after each template change as Miraz recommends, I would have caught these errors as I introduced them. I wouldn’t have spent my Sunday morning debugging code.

    Have I learned my lesson? I think so. At least for a few days.

    The Lost Painting

    History that reads like a novel.

    Book CoverI saw The Lost Painting by Jonathan Harr in a copy of Bookmarks, a magazine full of book reviews. I added it to my Amazon.com wish list.

    The Taking of ChristThe book is an account of the finding of a painting by Caravaggio, a 17th century Italian artist. The painting, called The Taking of Christ, was found in the 1990s by a restorer.

    Evidently, many paintings from that time were lost — they’d be sold by the artist or a dealer to a wealthy patron or art collector to be hung in a home. Over the years, the paintings would be moved around, handed down to descendants, sold, and resold. The records regarding these paintings were not always complete, so paintings would disappear from the records and thus “disappear” from the art world. In some cases, a painting’s value would be understated and the painting, aged, dirty, and possibly damaged would simply be discarded by an owner. Many masterpieces were lost this way.

    The book tells the story of how two art history students stumbled upon some evidence that the painting had been sold to a Scotsman in 1802, who believed the painting was done by a different artist. The painting was then traced to an auction house where the trail went cold. Had it been sold? No one knew. And no one knew what had become of it.

    The book is written like a novel, complete with dialog and some characterization. But all the characters are real people, many of whom were interviewed by the author during his research. This keeps the book from being a dry history tome. Instead, it has life and is quite interesting to the average reader.

    The book was listed on the New York Times Book Review 10 Best Books of the Year for 2006. The edition I read included an epilogue by the author which covers the discovery of another version of the same painting.

    I recommend the book to anyone interested in art, history, art history, or the process of searching for lost artwork.

    Link Bait?

    Unintentional, perhaps, but very effective.

    I’m getting ready to upgrade my blog-based Web sites to WordPress 2.1 from WordPress 2.0.4. It’s a big task for some sites and the biggest hurdle I have to jump is the plugin compatibility hurdle. This site and wickenburg-az.com rely on plugins for many of their features. If a plugin were to unexpectedly stop working, the sites could be brought down by PHP errors. This is not something I want to deal with, so I started thinking about the plugin situation. And, as I often do when I’m thinking of something that might benefit other people, I wrote an article about it and published it here.

    Does that make the article “linkbait”? I suppose it does. But I’m willing to accept that label if it’s used in the context of “simply compelling content.”

    It took me about an hour to write the article. (Those of you who know me and my work know that I can produce original material at often alarming rates.) It was all fresh, out-of-my-brain stuff, inspired by the WordPress upgrade instructions and compatible plugins list, which I linked to in the article. It was better organized that a lot of the posts here — especially the long, rambling ones about flying and the things that go on in my life — and it included headings and lists to make it easier to read.

    It hit the site at 7:24 AM MST. Within two hours, it had been linked to by Weblog Tools Collection (thanks!) and the article with the link just happened to appear in the Dashboard for all WordPress users. That’s when all hell broke loose. Visitors swarmed over. The article collected 10 comments and pingbacks in a matter of hours. The pingbacks, in several languages, brought even more visitors. At one point, I had 29 visitors (including bots) online and 19 of them were reading that one article.

    Now that might not seem like a big deal to many of you, but it’s a huge deal here. My daily visitor count, which averages about 250 per day, jumped to almost 900. And my page hit count soared to over 1250 from a daily average of 400-500. Whew! And the trend is carrying over to today; at 8 AM, I’ve already reached my daily average counts.

    What’s So Special about This Article?

    So the question remains: why has this one article been such a boon to the site?

    In looking at the article and how it differs from other site content, I’ve come up with the following:

    • The article was 95% original. I based it on my own experience and knowledge rather than material I’d found elsewhere. This was new content — not something I read and regurgitated here. And given the 1/9/90 rule discussed earlier today, only 1% of what’s in blogs is original content.
    • The article was timely. WordPress 2.1 had been out for less than 3 days when I wrote it. (Oddly enough, two commenters said they wished I’d written the article sooner. Sadly, I have neither the time nor the inclination to work with software under development these days, especially when that software is based on a computer language I hardly know.)
    • The article provided valuable information. Anyone who jumps blindly into a major WordPress upgrade deserves all the grief he gets. To me (and apparently others), the plugin issue is serious business. My article explained why it was serious and listed things that should be done for a less troublesome upgrade.
    • The article was well organized and well written. Sure, it’s easy for me to say — I wrote it. But I can look at all of my work objectively and I can say without a doubt that among my blog posts, this article was one of my better efforts. In fact, if this post wasn’t so time-sensitive, I would have submitted it to Informit.com, which pays me to write for them. (If I had, however, it would not have reached the Web for at least a month. So yes, I gave up a few hundred bucks, but WordPress users need this information now and I didn’t want them to wait.)
    • The article was well presented. I’m talking here about readability, which I discussed in another blog post earlier this month. This post included headings and lists, which help break text into bite sized pieces and make it more scannable.

    It’s gratifying that the article was found by a “WordPress authority” who found it worthy to link to. I wouldn’t be writing this post if I didn’t get the support of the folks who linked to it. They brought visitors to the article, pumping up my daily numbers accordingly.

    Is it Linkbait?

    Does that make the article “linkbait“? I suppose it does. But I’m willing to accept that label if it’s used in the context of “simply compelling content.” After all, I didn’t write it with the goal of getting lots of links and readers. I wrote it because it was on my mind, is a topic my readers claim they’re interested in (33% of those who took the poll said they’re interested in blogging), and is related to a topic I co-authored a book about. The article was forming in my brain — why would I keep it there if others might find it useful?

    That said, I’m not one bit sorry that it has attracted all the attention it has. It’s given me a lot to think about — and more to write about here.

    Understanding the Rules of Great Content

    Somewhat related to my Three Types of Blog Entries post…

    In trying to catch up with the RSS feeds I subscribe to, I ran across an article titled “Understanding The Rules of Great Content” on ProBlogger Blog Tips, which says, in part:

    In your quest for creating excellent content, you may have come across the following dilemma: I would love to create something important for my blog, but how do I, as a “mere” blogger contribute to that conversation at large? If I don’t create something de novo, will it be worth posting?

    To answer that question, let me tell you about the 1 / 9 / 90 rule — and, in my humble opinion, its a rule that every blogger ought to live (and subsequently), die by.

    In a way, the three types of blog posts I wrote about correspond to each part of the “rule” discussed in the article. The 1 is for 1% creating content — that’s where my “full-length articles” come in. The 9 is for 9% enriching content — that’s my “analysis of Web content.” And finally, the 90 is the 90% consuming content — that’s my “link lists.”

    Although I’m not quite sure if I agree with the percentages — I’d rather see a 10 / 30 / 60 rule — I find it interesting that Tony Hung over at Problogger.net should come up with the same basic idea that I did, right around the same time. It’s as if we were both thinking about the kinds of entries a blogger could write but came up with different ways to say the same thing.

    If you found my post interesting, I highly recommend that you read Tony’s. He goes into more detail about how to stay in that 9 percent.

    As for this post, it falls into the 9 percent category. (Or at least I hope it does.)

    Publish & Prosper: Blogging for your Business

    A brief book review.

    I just got a copy of Publish and Prosper: Blogging for Your Business by DL Byron, Steve Broback. This 200-page book is a good beginners’ guide for business blogging that starts with the basics and expands from there. For example, some questions that are answered include:

    • What is a blog?
    • Why should you blog?
    • Why shouldn’t you blog?
    • What should the focus of your blog be?
    • What does it take to start and maintain a blog?
    • What features should your blog include?
    • Should you include ads on your blog?
    • How do you monitor your blog’s usage?

    Keep in mind that the book isn’t written for the average blogger. It’s written for business bloggers — people who want to use a blog to promote or otherwise market their business, products, or services.

    Oddly enough, the book reminds me of one of my old titles, Putting Your Small Business on the Web. (Although I’m providing a link here, I’m not suggesting that you buy the book; it’s horribly out of date and of little value at this point.) Both books take a very basic approach, explaining how a new technology (blogging in this book; the Web in my book) can benefit a business and how to get started. Both books appeal more to business people then tech-saavy people — in fact, if you have experience with the technology, you already know half the book’s content.

    Overall, I think the book is a good read for any business person who isn’t already a blogger — or perhaps one who has just gotten started and isn’t quite sure of what he or she is doing. Although there are lots of tips between its covers for all bloggers, it’s the newbies that will get the most of this book.