• Your Tax Dollars Delivering Good Design
  • Shorter George Lakoff: The Framing of Politics

    Its hard to hear this and not think of Howard Dean. And, indeed, Dean has credited Lakoff with helping him figure out his strategy: What you do is crank the heck out of your base, [] and youll win the middle-of-the-roaders. Democrats appeal to them on their softer side [] but the Republicans appeal to them on the harder side [] So the question is which side appears to be energetic [] That side is the side that gets the swing voters and wins.

  • Keep It Simple: The Behavior Layer
    1. The site should still work when the browser doesn’t support JavaScript, obviously.
    2. The script should still work when the browser doesn’t support CSS. A script may not rely on style changes alone to achieve its purpose. Creating a behavior layer without assuming the existence of a presentation layer to back it up can be tricky. I feel we should pay more attention to this problem in the coming year.
    3. Styles that hide content and are meant to be overruled by a script, should be set in JavaScript. If you add display: none to your CSS and rely on JavaScript to toggle it, your site will degrade fast when JavaScript is disabled but CSS is enabled.
  • moz-behaviors.xml

    An XBL binding that allows Mozilla browsers (Netscape, Mozilla*, Firebird etc) to use Microsoft DHTML Behaviors with little or no conversion. Mozilla and Explorer may then reference the same DHTML Behaviors (.htc files).

  • On Postel, Again – Tim Bray on exceptions to Postel’s Law
  • Mezzoblue: Standards – which camp do you fall into, nothing but standards or kludge? My current thinking is ‘yes’, that is to aim for standards compliance, accessibility in the base implementation (especially the markup), and then kludge properly for real life browsers (especially via behaviors; I still believe my stance against CSS Parsing Bugs to be correct). All this is easier said than done, of course.
  • PHP Look Back 2003 – a look back at the most interesting (and sometimes funny) happenings on the PHP mailinglist

I’ve decided to skip the Lawrence Arms show and instead hang around at work installing Solaris on an old Ultra 5 for testing. Wee. Class today was an interesting presentation (scroll down if you want to find out what I found interesting about it) by Michael Naimark.

I had started writing a custom MT plugin, but it turns out that Brad’s MT-SQL plug-in will let me do just about everything that I need (the latest version of MT-SQL [v1.6] isn’t linked, but can be gotten by changing the d/l link appropriately or grabbing it from Brad’s CVS tree – necessary if you want to use the MTSQLBlog tag).

Now, the first, simple thing I was trying to do was to write a last-updated blog-roll. I’m sure it’s been done before, I just couldn’t find code. I did learn a couple things. Doing something like:

SELECT DISTINCT entry_blog_id blog_id from mt_entry WHERE entry_status=2 ORDER BY entry_modified_on DESC

won’t work because DISTINCT functions like a GROUP BY and doesn’t let you order on another field. OK, so do a subquery like:

SELECT DISTINCT entry_blog_id blog_id FROM mt_entry WHERE entry_status=2 AND blog_id IN (SELECT FROM entry_blog_id FROM mt_entry ORDER BY entry_modified_on DESC)

that’d work fine, except that only MySQL 4.1 (alpha code) has subquery support (*sigh*). The final code that does it is using a MAX and GROUP BY and then ordering by that:

SELECT DISTINCT entry_blog_id blog_id, max(entry_modified_on) AS d FROM mt_entry WHERE entry_status=2 GROUP BY blog_id ORDER BY d DESC

Now, I’ll probably do a plugin wrapper for the multi-blog aggregation I want to do, since the SQL code will be quite messy otherwise.

(yeah, you’d think with all this MT programming I’ve been doing I’d switch my blog off vim, and onto, well, any blogging tool, really. At this point however, I think it’s pride/stubborness more than anything else.)