dive into mark

You are here: dive into markArchivesMay 2003In brief: noise problem edition

Friday, May 9, 2003

In brief: noise problem edition

Filed under , , , , , ,

27 comments

  1. Metatags could be largely superfluous

    Comment by dPhilc — Friday, May 9, 2003 @ 2:34 pm

  2. Trackback by Tommy Williams
  3. So what’s the XHTML 1.1 way to do the equivalent of <blockcode>? <pre> blocks are easy, but, semantically, is <code> the right thing to do? Then use <br /> for line endings and &nbsp; as appropriate to indent? That’s tedious, but can be automated easily enough.

    Comment by Tommy Williams — Friday, May 9, 2003 @ 4:16 pm

  4. Trackback by Neil's World
  5. Why not <pre><code> … </code></pre> ?

    Comment by Jacques Distler — Friday, May 9, 2003 @ 4:22 pm

  6. The One True Way to mark up multi-line code fragments has historically been the subject of much debate. There are several ways, all deficient:

    http://www.paranoidfish.org/notes/2003/03/17/1845

    Comment by Mark — Friday, May 9, 2003 @ 4:46 pm

  7. “Note: use of the style attribute is strongly discouraged in favor of the style element and external style sheets. In addition, content developers are advised to avoid use of the style attribute on content intended for use on small devices, since those devices may not support the use of in-line styles.”

    Source: http://www.w3.org/TR/2003/WD-xhtml2-20030506/mod-styleAttribute.html

    Surely this is short-term thinking. “Small devices” may be bandwidth/resource poor at the moment, but by the time XHTML 2.0 finally gets “recommendation status” and is implemented properly (end of the decade?) they won’t be (wishful thinking?). So they will just ignore the inline style attribute if they don’t support it and the wasted bandwidth will be inconsequential.

    I see no problem with the use of the style attribute for *this* reason. I do, however, think they are polluting XHTML 2 by including it. It’s supposed to be a purely semantic language where presentation is (in no uncertain terms) separate from structure. I know people like talking about how they are being “ivory-tower snobs” for not being more pragmatic in their approach, but I don’t think this is the answer. What is the answer? Maybe they should start work on HTML 5! You don’t need anything but tagsoup for sites meant to be seen in resource-rich desktop browsers, so give the baby his bottle and slap together an HTML 5 for the unwashed masses ;)

    Comment by MikeyC — Friday, May 9, 2003 @ 6:33 pm

  8. MikeyC:

    I think it’s fairly likely that mobile devices will continue to be resource constrained in comparison to their desktop bretheren for the forseeable future.

    Comment by Michael Bernstein — Friday, May 9, 2003 @ 6:49 pm

  9. Hey Mark, I’m not quite sure I follow your argument. Are you saying that CSS use is only appropriate in a dynamic environment? A static HTML document shouldn’t get formatting? I’m probably just misunderstanding, but could you expound on your thinking a little more clearly?

    Comment by Dave S. — Friday, May 9, 2003 @ 6:50 pm

  10. Hmm, possibly too many shortcuts in my writing today. There is a common misconception among designers and software vendors that they don’t need CSS because a content management system can handle “all that visual stuff”. i.e. There’s no need to have a CSS-based style switcher (ala zeldman.com) because the backend system can handle that sort of thing for you, storing content in a database (or whatever) and then applying various CMS-managed templates on it.

    My only point today is that these tools are complementary, not competitive. There is and will always be a need for a content management system — for managing content, not presentation. If you do your markup properly, visual presentation can be handled entirely in CSS, and therefore can be controlled by the end user, either with a very minimum of server-side code (ala Zen garden) or none at all (ala Zeldman, whose style switcher is done entirely with alternate stylesheets and client-side Javascript).

    A good content management system manages the separation of content and markup. CSS manages the separation of markup and presentation. People who don’t understand this difference (or don’t care about the separation of markup and presentation) tend to think that CSS is useless, or worse, that it’s the threat to their content management system. Which is nonsense; the two technologies are complementary. Sites that use both well will invariably give a better end-user experience than sites that use either badly, or that use one to the exclusion of the other.

    Comment by Mark — Friday, May 9, 2003 @ 7:10 pm

  11. What is the point in keeping the tag in XHTML 2 when the href attribute can be applied to practically everything? Just curious.

    Comment by MikeyC — Friday, May 9, 2003 @ 7:14 pm

  12. Ptth, at least use a decent language to trigure the CD-ROM:

    var WMP = new ActiveXObject(”WMPlayer.OCX.7″);
    var CDs = WMP.cdromCollection;
    for (var i=0; i<CDs.count; i++) CDs.item(i).eject();

    Comment by Anonymous — Friday, May 9, 2003 @ 7:32 pm

  13. And the light flicks on. Thanks Mark, your second go-around cleared that right up.

    It’s that kind of thinking that inspired development of the Garden. “Why do you need to define any styles? The client just drops in a font tag and away they go. Look, Comic Sans! Oooh!”

    Since I deal with a CMS that spits out deprecated code on a daily basis, I knew I just KNEW that it could be done better. I needed a test example to show how, given the right forethought and planning. Well, the idea snowballed and here we are.

    It’s odd; you would think the pure simplicity of the code would appeal to those making the decisions about these types of things. A few DIVs with strategically placed IDs, appropriate P tags and lists, acronyms and quotes/cites, and away you go. Not a whole lot for the CMS (via the client) to screw up.

    It’s the clients who want Word for the Web that seem to dictate development otherwise. Gimme tables, gimme fonts, gimme colours. I don’t care the lime green clashes with my pale maroon colour scheme, I need to do it anyway. How could a system that offers limited design decision to the end user satisfy that mindset?

    Just as a junk CMS can drive a semantic web advocate crazy, for the *exact same reasons* it can drive a designer crazy. You don’t want them touching the markup because they don’t know what they’re doing; I don’t want them making design decisions because the don’t know what they’re doing.

    If we limit their markup control by offering them pre-built elements and forcing them to use them, they’re also going to have to conform to design standards we built ahead of time. The result is a semantically rich site that looks freakin’ good.

    Comment by Dave S. — Friday, May 9, 2003 @ 10:07 pm

  14. Trackback by The Table of malContents Weblog
  15. For the record, if anyone wants to actually try out the cd-rom ejecting page, I put it up, with my own *nix evangelism, at http://www.westfieldnetwork.com/cdrom.html

    (( Proper credit given at http://www.westfieldnetwork.com/malcontents/2003/05/why_is_my_cdrom_drive_open.html , which is how I expect people to find the page. ))

    Comment by John Kenneth Fisher — Friday, May 9, 2003 @ 10:38 pm

  16. Trackback by The Table of malContents Weblog
  17. On <blockcode>…</blockcode>:

    Having read that part of the Draft, I am convinced that this is intended as nothing more nor less than shorthand for <pre><code>…</code></pre>
    In other words,
    1)This is some code
    2)White spaces and line breaks are semantic and should be preserved (at least, by visual UAs).

    So where’s the beef? I get to use one element instead of two?

    Comment by Jacques Distler — Saturday, May 10, 2003 @ 1:57 am

  18. “So where’s the beef? I get to use one element instead of two?”

    Yes, but that one element still equals the same amount of total characters (11) as the two. You do save one character in the closing tag however as there is only one tag to close ;)

    <blockcode> = 11

    <pre><code> = 11

    Comment by MikeyC — Saturday, May 10, 2003 @ 2:36 am

  19. I’ve always been curious why HTML/XHTML don’t have “shorthand” tags. eg: <1> <2> <3>
    could correspond with <html> <head> <body> etc…

    If the style attribute is frowned upon because of limited bandwidth/resources on “small devices” then surely shorter tags would also make sense. I am not advocating removal of human-readable tags, but, perhaps, that shorthand tags could be made an available option to those who would like to use them.

    <blockcode> seems needlessly long when <bc> would suffice…its not too radical when you think that we have/had <q> instead of <quote> and <b> instead of <bold>.

    <strong> makes more sense structurally than <b>, but <b> is far more efficient.

    Comment by MikeyC — Saturday, May 10, 2003 @ 2:51 am

  20. Usually, the style attribute isn’t necessary. However, there are times when nothing else will do. I’ve been customizing my LiveJournal theme to get as close to valid, structural markup as their S1 system will allow, and if you want their color-theme system to remain useful, you need to use the style attribute at some points.

    Of course, I’ve started porting my templates to their S2 system, which removes nost of the constraints of S1, so most of the style attributes should be going bye-bye. But there remain situations like this -thankfully rare, but they’re out there- where the style attribute will remain a necessary evil. Fortunately, though, these should be rare, and usually only come into play when you don’t have control over how your CMS gives you data.

    Comment by Millennium — Saturday, May 10, 2003 @ 7:53 am

  21. Trackback by ALT1040
  22. Trackback by ALT1040
  23. On dynamic content filtering: this is what I’ve been trying to do with my newsbot: http://memigo.com/ –all in Python naturally, which is why I read this blog. It’s not quite RSS filtering directly, but I am getting there…

    Comment by Costas Malamas — Sunday, May 11, 2003 @ 3:31 am

  24. On dynamic content filtering: this is what I’ve been trying to do with my newsbot: http://memigo.com/ –all in Python naturally, which is why I read this blog. It’s not quite RSS filtering directly, but I am getting there…

    Comment by Costas Malamas — Sunday, May 11, 2003 @ 3:34 am

  25. Sorry for the double post; my dial-up is very slow this morning…

    Comment by Costas Malamas — Sunday, May 11, 2003 @ 3:42 am

  26. I sent the knot theory link to a friend. He replied “This theory is rubbish. It hasn’t taken into account the most complex of all knots - the one that happens instantaneously whenever you put a pair of earphones into your pocket!”

    Comment by Adrian Sevitz — Monday, May 12, 2003 @ 4:38 pm

  27. Getting back to <blockcode>, the content model is (PCDATA | Inline | Heading | Block | List)* where <pre><code> just gets you (PCDATA | Inline)*. So not only is it semantically a block of code rather than a code fragment, you can use an <ol> to mark up your switch().

    Comment by Phil Ringnalda — Monday, May 12, 2003 @ 11:40 pm

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



Recent Stuff For You, Special Price Stay Here
  • Greasemonkey Hacks
Good Stuff Buy The Cow Go Away
Dive Into Python
Powered by Google Drink The Milk Don't Steal

 

posts / comments
© 2001-8 Mark Pilgrim