For the record, I think the ideal situation is to sketch out your design with pencil/paper and agree on a general layout before touching any code.
When dealing with clients though, unfortunately they may expect to see pixel-perfect photoshop mockups before agreeing that a design is what they want, which can complicate things.