November 3, 2005
MarkBernstein.org
 
Follow me on Twitter

CSS and Learning Curves

People sometimes say that Tinderbox has a steep learning curve. Sometimes, they really mean that the problem they're working on is difficult, and Tinderbox reveals how complex the problem really is. Tinderbox has lots of expressive power -- agents, links, rules, spatial hypertext -- and that power makes you want to express everything you can.

The 'advantage' of one big text file, or a small stack of 3x5 cards, is that you already know how little you can say.

Another problem, though, is the way we can easily get tangled up in other problems. You want to share notes? Easy enough: export to HTML, post 'em on a weblog, send 'em to your shiny new web service.

Now, want to make those shared notes look better? Easy again: just describe the way you want them to look in CSS!

But there was one thing they had forgotten: CSS is a real challenge to debug. Why? Are the CSS people idiots or fools or (gasp!) programmers? No! CSS is hard to debug for two simple reasons:

This leads to a variety of headaches that will be familiar to everyone who uses style sheets. The box model is terrific, but it's easy to get things just slightly wrong. And Microsoft's browser does just that -- s o now every glitch in the box model needs to be solved twice. Floats give you lots of power to describe flexible layouts -- but figuring out exactly where floating elements should go when things get crowded is, basically, rocket science.

Some thing are simply hard. CSS doesn't ask you to say, "how do I lay out this page today?" like we did with glue and scissors in the office of the old school newspaper. It asks, "How do you want to lay out all the pages this year?" That's a better question to ask, and answering it will save you time in the long run, but it means facing the difficult questions instead of hoping they won't come up.

That said, has anyone tried a constraint-based solution to Web layout, along the lines of Chris van Wyk's Ideal ?