Defining a coding style
I’ve been wondering recently about how to describe coding styles when talking about (X)HTML/CSS.
By styles, I mean seperating out those who still have a heavy reliance on table heavy code as opposed to those who on the most part avoid tables for layout, and have a good udnerstanding of CSS for positioning etc…
The problem being that I’m not going to take a black and white approach of, if it has tables it’s rubbish, or, it’s only good if it vaidates.
In some cases, tables end up being used, rarely I’ll admit, but there are cases.
For example, over the last 6 months, I’d done a lot of the work involved in launching about 40 blogs at work. To make it an easier process, I set up a fairly standard template at the start, which then just required new images/CSS, and a few hard coded bits changed.
It worked very well, the designers knew a bit of CSS, so they pretty much prepared the things like colour changes and the artwork, and all I had to do was insert it into the templating system, sort a few config things out, and we had a blog design ready.
But in that intial template, I used a single table for the overall structure of the site, knowing it was going to need to be resiliant enough to support over 40 designs with various thigns changing colour etc….
I felt that though it could be done without tables, they were actually going to help considering the time we had availible, and because it consists of pretty much 5 table cells, it’s not impacting the accessibility of the site like it might.
On the flip side, it’s perfectly possible to write valid HTML/CSS that is rubbish. It could be inefficient, difficult to maintain, break in new browsers (IE7 problems anyone?), and be completely unsemantic.
Good coding is about more than validation to the W3C specs. It’s about the ’spirit’ of the specs and guidelines, an idea any cricketer will be familiar with ;)
Now all this has come about after looking over some CV’s for ‘web developers’ recently.
At work we usually deal with tableless HTML and lots of lovely CSS to style and lay things out. Various sites in various states of good coding depending on various points, such as what the ‘client’ is like.
Generally though, most stuff written in the last couple years has reasonably good HTML behind it.
So when w’re looking at CV’s sent in from recruitment agents where people examples of sites includes loads of tables, but also profess to be XHTML1 transitional, I’m left wondering how I describe the difference between the coding style myself and most of my talented colleagues sue, and the coding styles these applicants have used…..
One was uses div’s, but filling them with tables, another was using tables, and filling the cells with div’s, there would be lots of inline styles, generally poor use of the tags, no lists for things like lsits of navigation for example. Dodgy JavaScript rollovers where CSS rollovers are perfectly acceptable and easy to do, and the lsit goes on a bit….
So when a manager asks me to look at the CV’s, I’m left trying to explain to him, so that he can explain to the recruitment agents (who ahve their own priorities it seems) what we’re after. And I’ve been struggling to define that really.
I’ve described several of the exmaples sites as ‘old fashioned’ HTML, which doesn’t really seem right. The fact several were using XHTML DocTypes suggests the people concerned had some idea of what they were doing to get that far, but I don’t think they understood the significance and reasoning behind it…..
I end up using words like tableless, when I don’t necessarily mean that, I use words like semantics, but if you know what that is, you’re probably doing it, at least to an extent, and it probably means bugger all to recruitment agents. And it’s not even a web standards thing, because it’s not just knowing how to write code that validates, it’s understanding why it should validate, and when it’s ok for it to miss the validation by a little bit.
Eventually you end up with a definition longer than that for “Web 2.0″ (though my definition for that is shorter than the ‘official’ one), which isn’t much help to anyone, and only makes sense to someone who already knows it properly.
If anyone has any ideas on a 1 sentance description that means something to people who aren’t already well into the web standards/semantic code thing, I’d very much like to hear it, and to share it