this WASN’T on my planned list of writings for this weekend, but i HAD to get this out in the open.
i just read a column from pc magazine, a publication which i havent read in ages..except for the occasional linked-to online article, like the one in question. Dvorak is yammering on about how CSS is annoying to him. Obviously, he’s never built a scalable web site, or web application. CSS is a godsend, and despite its downfalls, is the best thing to hit web since…well…since I’ve been a part of it.
His points are as follows:
let me take his points one at a time. First, the concept is good in theory, and in practice…if you know what you’re doing. If you want to style each and every element as you create it, thats fine with me…you obvoiously have more free time, not enough work, or longer deadlines than I do. Forget semantics for a second (i know…only for a second). The fact that I dont have to chuck a font tag with attributes around every bit of text in order to style it appropriately is a GOOD THING. oh, and what about wanting to change something…not just in one place, but everywhere? search and replace only goes so far.
cascades break. sure they do…if you’re writing shitty xhtml. use IDs and classes semantically (oops, back to that buzz word) and cascades will not only break, but they will be easy to follow. And continue. Oh, as far as managing a stylesheet…one of the projects I’m working on (the one keeping me at the office for 12+ hrs a day) has a ~1000 line stylesheet. And it’s still super-managable. Why? because its a)well commented b)ordered and organized elegantly c)tabbed cleanly (as is all of my source) and d) semantically accurate ids and classes make things easy to find and search for. so sorry john, my cascades don’t break. and when they do, its MY fault…not CSSs. What happens when you’re building something in….i dont know….C++, and forget a line of code? the app breaks. duh. why shouldnt css be allowed the same fault, that of user fuckup. the same argument applies to the “missing bit theory”. don’t blame CSS for not being able to interpollate missing information. obviously, John cant do that, why should a language that isn’t even “programming” be able to figure out that kind of logic?
and browser compatability. don’t even get me started. I posted the time breakdown for web developers, and believe me, it’s true…but if you’re coding to compliance…debugging should be minimal. my development technique is as follows: develop in FF 1.5. test in IE6 along the way…every task-milestone. If padding is avoided, which is easy, box model issues strike very rarely. Any other issues are feature-specific, but again…are far and few between. Once every few days, depending on the timeline and size of the project, I swing over to safari just to double check. i can think of a SINGLE instance where something that worked in FF DIDNT workin in a current version of safari. Most of my development even works almost flawlessly in Mac IE5.2, and IE 5.5 for windows. The point is: yes. you have to debug along the way. just like ANY development. this is not the fault of the language, its the fault of the human trait of mistake, or else general stupidity. And, when it comes down to it…supporting legacy browsers should be a priority, but only as far back as necessary. do some market research. go abck a version or two, just to make sure nothing is breaking SO severely that the content is inaccessable. because, after all, thats the most important part of your website.
so, john c dvorak, take that and suck on it for a little bit. pull your greasy fingers out of microsoft frontpage or visual studio design mode, get into a text editor, and LEARN a language before you bitch about it. I look forward to your response here, or anywhere publically.