Monday, July 31, 2006

Where are the bugs?

.. or are they typos on a weird keyboard?

In one of his articles John Dvorak explains why CSS bugs him. It is a relatively short article but it stirs up quite a vivid list of comments (five pages and counting).

And rightfully so, the article is a very bad piece of writing considering the aeons of experience the man has in the computing industry. It seems that he has taken a stab at CSS and couldn't get it to work for him. Or not in every browser.

This no big surprise as the learning curve is quite steep and you need quite a bit of time first understanding the styling options and after that all the weird ways various browsers render these. Finally you will have to learn the hacks to fix these inconsistencies. A little too much to grasp on rainy Sunday afternoon before tea.

Let's dissect

Now let's pull some quotes out of context and try not to laugh but stay positive and objective. Well, hardly objective.

John Dvorak
The first problem is the idea of "cascading." It means what it says: falling as in falling apart. You set a parameter for a style element, and that setting falls to the next element unless you provide it with a different element definition. This sounds like a great idea until you try to deconstruct the sheet. You need a road map. One element cascades from here, another from there.

Using the DOM inspector in Firefox or Netscape Navigator will help you to keep track which rules apply to an element and even in which order. Also some basic understanding of CSS is handy. And BTW this is not cascading but inheritance that is discussed here.

John Dvorak
One wrong change and all hell breaks loose.

That is programming for you. One wrong change and all hell breaks loose. When you can then put out that fire again you show programming skill.

This is hardly a problem or bug of CSS it is an inevitable part of any programming language. If you can make it, you can break it.

John Dvorak
If your Internet connection happens to lose a bit of CSS data, you get a mess on your screen.

John, are you still using a good old 14K4 modem with occasional static? I have not yet experienced this problem and have never heard of any one who had this. So you are the first to report the problem.

John Dvorak
That's not the worst thing. You can live with the basic cascading mess; it's a matter of debugging. The real problem is that no two browsers, let alone no two versions of any one browser interpret CSS the same way! ... Can someone explain to me exactly what kind of "standard" CSS is, anyway?

Hello John, this is not the problem of CSS but rather of the different interpretations or lack there off by different browser manufacturers. You can not blame CSS for this.

My conclusion

The lack of understanding of CSS and the problems presented by the different browser in rendering that CSS is what most struck me. I was disappointed to read an article by quite a big name in the industry.

Some comments are worse

Although many people have commented on the article in much the same way as I now do there were also a great many people who blindly follow John Dvorak. Or had even stronger opinions against using CSS.

The arguments for sticking to tables astound me as there are so many reason to getting rid of all these useless <table> <tr> <td> tags. The simplest being a complete waste of bandwidth and also making the page more accessible and maintainable.

It amazes me how many people just stick to the trick they know and just do not want to learn new stuff. I think learning new stuff is one the great challenges but also satisfying pleasures of working in IT. You'll never stop learning in IT! I don't mean to say that you should learn ALL the new things out there. There is simply too much. No, one should take a look at the toolbox one has and then look to see if there are newer and better tools around and use the tools what they are intended for. You can hammer a nail in with the handle of a big screw driver but a hammer works way better.

It's wrap up

When you type with two or three fingers like I do you should not write an article about the special Dvorak keyboard and comment on the awkward places the keys have gone. But when you take the time to properly learn to type on it, it might be different story and then review can be valuable. Otherwise stay well away from it.

When you know little of CSS and browsers rendering it then you should not write an article about the CSS and comment on the awkward things happening to your page layouts. But when you take the time to properly learn to code in it, it might be different story and then review can be valuable. Otherwise stay well away from it.

UPDATE: I have written a new, longer post on what is and what isn't wrong with CSS.

1 comment:

  1. Anonymous21/7/06 16:58

    I think you've missed some of the points. While I often find Dvorak misses the mark, he hit pretty true on this one, even if he did it accidentally.

    Several people, myself included, made strong arguments against portions of CSS. There is a lot to CSS and getting content to look the way you want. CSS does text formatting well. It does layout badly.

    Attaching the layout properties to the elements themselves and not to a global layout section requires one to decode or map out all the properties. This can be incredibly time intensive and error prone. It's also a cause for bad design. Even if you know CSS incredibly well, it doesn't help you here.

    When it comes to text formatting, CSS abides by several rules for good technology. It's easy to learn and it's easy to use. It's easy to say what will happen when you make a change.

    This is not true of layout. Layout requires attaching interactive rules to elements throughout your CSS structure. Hence the map comment.

    Also your comment about having to learn IT always is circular. If you say something will always be true because it's always been true, you're using circular logic.

    While it's highly likely some level of learning will be involved, what Dvorak and myself are looking for is a more usable CSS when it comes to layout and positioning.

    ReplyDelete

Thanks for you comment. I will probably have to moderate it, so it could take some time to see it appear on the blog, but I am usually quite fast at that.

When I feel that you are commenting just to get some link spam to your own site,you will probably never see it appear ..