Codebitch : Click to return to MacEdition homepage

Bad Slash: SlashCode cutters don’t know HTML?

December 3, 2001

Feedback Farm

Have something to say about this article? Let us know below and your post might be the Post of the Month! Please read our Official Rules and Sponsor List.


Want to dig even deeper? Post to the new MacEdition Forums!

In an earlier column, I noted that L-shaped navigation was everywhere. One alternative layout seems to be taking hold for certain kinds of sites: the SlashDot-style sequence of boxes with abstracts of stories or comments, with vertical strips of other links down both sides of the page.

Whether it’s SlashDot itself, TechDirt or our good friends at MacSlash, this is a good layout that presents a lot of information very efficiently on typical computer screens. No wonder it’s so popular. Unfortunately, the underlying engine, SlashCode, is a piece of crud. Sure, it has lots of features and generates customisable, attractive pages. However, its HTML output is garbage.

I’m not just talking hideous nested tables and too many FONT tags. The Slash software generates tons of kiddie errors, like URLs without quotes around them, color directives without the #, list items (LIs) that aren’t inside lists (see the sidebars in SlashDot itself), nested anchor (A) tags and the occasional bad nesting.

The SlashCode people know that their product doesn’t generate valid code, but they act like their customers should fix the problems. Their FAQ says:

Can you make Slash compliant with HTML x.x?

No, but YOU can! Slash is fully customizable. You can edit the templates to suit your taste. See the HOWTO documents for themes, plugins, and templates.

Well, horse-puckey. I find it astonishing that SlashCode can’t even get links right. It says right here in the HTML spec that attributes need to be quoted if they contain characters that aren’t alphanumeric, like, say, a slash. (Ooh, do you think slashes might appear in URLs? Gee, I dunno.)

It’s also way too hard, or at least not easy enough, for users of the SlashCode system to include CSS-based information into their sites. SlashCode puts each story into a table. And if you want a border, that’s a nested table. And the page’s three-column layout is another table. Three nested tables for what ought to be a very clean layout – that’s a lot of markup bloat. Indeed, a couple of months ago I worked out a CSS-based version of MacSlash to see how much I could condense the file size. Even leaving all the comments and indentations in, I was able to reduce a 68KB page to a 36KB one, plus a 5KB stylesheet. Moreover, the number of images loaded per page went from 205 to 52. Sure, they’re mainly the same image over and over, but it’s still an extra HTTP request. Do the developers of SlashCode think that everyone has a fast connection with no latency problems?

The irony is that this markup-heavy tables-based approach to layout doesn’t even guarantee that the pages will look the same in standard desktop browsers. For example, the grey box at the bottom of each story indicating the number of comments is not as wide as the story box when viewing MacSlash in Opera or OmniWeb, but it is in IE.

I’m not blaming the users of SlashCode for these problems. And before anyone jumps to the wrong premature conclusions, let me reiterate that I am not criticising any of the SlashCode-based forums.

Indeed, I’ve already had e-mail discussions with Les from MacSlash, and he agrees with me. It seems that to fix up all the problems introduced by the SlashCode engine, you pretty much need the same amount of time as you would have done to write something from scratch. People use SlashCode and other free content management systems because they don’t have time to write their own. Nor should they have to. I think people are entitled to expect syntactically correct HTML from tools produced by communities that place a high value on programming ability. After all, HTML is not even programming, it’s markup.

Fortunately, there are alternatives, including other free offerings such as Zope, which uses Python; and the PHP-based PHPWebSite from Appalachian State University and associated volunteers. Both are committed to standards compliance. If you want to run a discussion-oriented Web site and you’re looking for a suitable codebase, have a look at these other packages and see if they serve your needs.

If the developers of SlashCode are not incompetent programmers, they can prove it to me by revving their product to ensure that all URLs are quoted in links. They could prove to me that they are halfway decent programmers by also adding a check that color directives have the # mark, and are also quoted in attribute values. They could prove to me that they know something of four-year-old Web standards by making it easier for users to incorporate CSS formatting into the templates, instead of spraying nested tables and FONT tags every which way.

And finally, they could prove to me that they actually care about users of non-standard browsers by ensuring that the standard templates that they provide validate as, say, HTML 4.01 Transitional.

Until then, I think we are entitled to assume that they are typing out their code with just one hand.

— Right after posting this column, CodeBitch ( left to go to a conference for the remainder of the week. She’ll get to your emails on the weekend. CodeBitch is the grumpy cow who does most of the HTML production for MacEdition. Read other articles by CodeBitch

E-mail this story to a friend

Talkback on this story!