April 9, 2008 - Comments Off on Upgrading to WordPress 2.5

Upgrading to WordPress 2.5

Just got finished with my first WordPress 2.5 upgrade and I'm happy to report that everything (except a !@%$#%@ spotty internet connection which made the process take at least three times at long!) went smoothly. Contrary to my expectation, none of the plugins broke!

The admin interface certainly is different—it's better, but still odd after so many years with the old one. However, I love the new one click plugin auto-upgrade feature. It downloaded, unzipped, and installed the latest version of Akismet without any problems.

Update 2008-04-06: I also like the new "modal" window approach to file upload. While the old file upload tab on the "Write Page" page was definitely usable thanks to an <iframe> and JavaScript, the interface was still a bit clunky. The new UI is definitely faster and slicker.

Update 2008-04-07: While doing another upgrade (from 2.0.9 to 2.5) I broke my first plugin: Category Visibility. However, since I'm not sure what version (other than the 2.0 series) it was last compatible with, this may not be a 2.5 issue.

Update 2008-04-07: It appears that query_posts() (or at least the way I've always used it!) is broken in 2.5. More on this to follow…

Update 2008-04-09: query_posts() is not broken, but the Adhesive plugin is.

Jeffrey Barke is senior developer and information architect at theMechanism, a maxi-media firm in New York City and London.

Published by: jeffreybarke in The Programming Mechanism

April 7, 2008 - 2 comments

“HTML validation” is a tool

I'm curious what other standardistas think about this essay by Jukka "Yucca" Korpela that I stumbled upon this weekend. I thought it was pretty interesting, particularly having recently read Martian Headsets and Understanding HTML, XML and XHTML.

This is a rant that promotes validation and puts it down. The point is that if you don't know what validation really is, it won't be of much use to you, and could even be waste of time. Validation is simply a way of getting reports about complying with some formal rules. What would you do with the results if you don't know those rules?

While the whole document is probably of interest, there were a lot of things I already knew and that seemed fairly basic. However, the things I didn't know seemed particularly choice, such as:

Although there is really not much to be gained from using XHTML at present, many people have started using it. Then it becomes relevant that validation means different things for XHTML. The reason is that the metalanguage, XML, is considerably less powerful than SGML. For example, the XML DTD for XHTML 1.0 declares the tabindex attribute as CDATA, which allows virtually anything. In the SGML DTDs of "old" HTML, the attribute is declared as NUMBER. This means that in validating against "old" HTML, tabindex="-1" is reported as an error (as it is), in XHTML validation it passes. On the other hand, XML imposes restrictions that forbid constructs that are formally correct in SGML-based HTML but not actually supported by browsers, such as the shorthand <em/text/ for <em>text</em>, and this means that XHTML validation is pragmatically more useful in some ways.

And Korpela's conclusion comes down hard on the use of "Valid HTML" icons put out by the W3C:

It's useful to write valid markup, in most cases. But it's hardly useful to make a noise about it.

Analogously, it's useful to use proper punctuation when you write in English. This makes texts somewhat easier to read and understand, and it adds to the literary quality a bit. There are slightly different styles of punctuation, and you should choose one and stick to it. But it's hardly useful to make a noise thereof. Would you like to include an icon like "Checked SGUFDFY 42.5!" onto your pages and expect users to decipher that SGUFDFY 42.5 means some particular convention on punctuation?

So what do y'all standardistas out there think?

"HTML validation" is a good tool, but just a tool. Jukka "Yucca" Korpela

Published by: jeffreybarke in The Programming Mechanism

April 6, 2008 - Comments Off on ajaxload.info—A very cool service

ajaxload.info—A very cool service

For we non-designers out there, ajaxload.info offers a very cool service: automated creation of animated loading .gifs in three easy steps. Simply choose your indicator type (35 options!), set the background and foreground color, and generate it. View the preview and then download your .gif, ready to use.

Loading…

Very simple and useful. Thanks for designing this, Kath

Jeffrey Barke is senior developer and information architect at theMechanism, a maxi-media firm in New York City and London.

Published by: jeffreybarke in The Programming Mechanism

April 4, 2008 - 6 comments

Easy legend generation for the Google Charts API map chart type

In an earlier post, I wrote "I agree with Bjørn that the lack of an API-generated legend is problematic, though one could be constructed via HTML adjacent to the chart." However, it turns out that creating a legend is a bit more difficult than I initially thought. The difficulty was brought to my attention via a post to the Google Charts API Google Group that requested help in writing a PHP function to determine the hex value of interpolated colors. Since I figured this would be a common problem, I wrote a PHP 4 class that will hopefully solve it. You can see the tmMapLegend class in action below with the map produced in the earlier tutorial. Learn more about the class and download it here: http://themechanism.com/barkode/code/tmmaplegend/.

Red States and Blue States, USA

  •   States carried by the Republicans in all four elections
  •   States carried by the Democrats in all four elections
  •   States carried by the Republicans in three of the four elections
  •   States carried by the Democrats in three of the four elections
  •   States carried by each party twice in the four elections

Jeffrey Barke is senior developer and information architect at theMechanism, a maxi-media firm in New York City and London.

Published by: jeffreybarke in The Programming Mechanism

April 4, 2008 - Comments Off on theMechanism looks forward to Google I/O

theMechanism looks forward to Google I/O

I'm totally stoked about my first trip to San Francisco for Google I/O, a two-day "developer gathering focused on pushing the boundaries of web applications using Google and open web technologies."

Today is the last day of early bird registration, so if you're going to go, register quick and save a hundred bucks.

I'll definitely be writing more about this as the date approaches…

Jeffrey Barke is senior developer and information architect at theMechanism, a maxi-media firm in New York City and London.

Published by: jeffreybarke in The Programming Mechanism

March 30, 2008 - 6 comments

Thematic mapping with the Google Charts API: A brief tutorial

This brief tutorial assumes a basic knowledge of the Google Charts API, but no knowledge of the new map chart type. This tutorial will cover all of the required and optional Charts API parameters for the map chart type and will culminate in displaying a US map of red states and blue states.

Producing the base map

United States of America

To produce our base map using the Google Charts API requires a URL similar to the following one:
http://chart.apis.google.com/chart?chs=350x200&cht=t&chtm=usa&chd=s:_

Read more

Published by: jeffreybarke in The Programming Mechanism

March 28, 2008 - 6 comments

IE 8, version targeting, and conditional comments

As promised at last night's NY Web Standards meetup, this morning I tested to see if IE 8 would recognize IE 7 conditional comments when set to render in IE 7 standards mode. The unfortunate answer is no. You can review the test here: http://themechanism.com/barkode/demos-tutorials/ie8-version-targeting.php

Aside—I installed Safari 3.1 (525.13) on my PC (Windows Vista Home Premium Service Pack 1) this morning and, for the first time in months, it runs!

Published by: jeffreybarke in The Programming Mechanism