Working quick, getting dirty (but in a good way)
In a previous post, 'Do and don't do on web pages' I described a set of things you shouldn't do in a web page.
Last weekend I had to remove my self from that project, and return to one of my own's.
Given the new circumstances, Shay, the project's manager, had to resume his work on the mark-up and CSS using his own team (and his own 10 fingers). The tight time frame made him work quick and dirty, which is the complete opposite to my ideas and methodologies.
But he was absolutely right (which make me wrong, of course) and the project managed to be on air, on time.
What does it mean to work quick and dirty?
My method was to replace classes in a methodological way, writing correct CSS classes and files, and fixing the HTML.
Shay fixed HTML on the fly, added inline styles every where he saw a design error, and nothing methodological. Very dirty, but very quick.
He used images as buttons instead of using CSS classes that will design table's elements as a button.
And so on, and so forth.
When should you do it that way?
Basically, you shouldn't. Having said that, there's no rule that doesn't have exceptions.
When you have a tight project, and the code is massy, you might just not have other alternative (or choice).
In that particular project, the UI is going to be redesigned, and re-written in Asp.Net 2.0 any way. If that's the case in your project, that is a good reason to work dirty, to get the job done quickly.
To summarize this paragraph, time frame, and time tables, are the main motivator to drop the tidiness and move to dirty. When you know for sure that this code wouldn't last, it'll give you the final confirmation.
Methods that will make you quicker (and probably dirtier).
I think that the most effective method, in a quick and dirty development, is "search and replace". The standard search and replace is good enough, but you can also get a more advanced tool to use regular expressions.
Use search and replace to replace all the background colors, or all the fonts, and so on.
Search for classes' names using tools such as IE Developer Toolbar.
Then remove them from the CSS file to stop them from effecting.
Use inline styles, at the end of the tag, to over-ride everything that was before (the last style/CSS directive is the one that counts). This is something you can achieve, in a way, using search-and-replace.
I guess there are many other ways, many other tips, I'll be happy to hear yours.
The most important thing to remember is, your client probably don't care about the code, as much as he want the project done on time.
Although tidy HTML is easier to maintain, if you don't need to do that (maintain your code), there's no reason to be that tidy.