I do it all the time, If you deliver poorly written code that is difficult to maintain, you're doing your customer a disservice and providing shoddy work. As a professional, I would expect to be paid to the job and for doing it right. The nature of software development is that you don't always get it right the first time. Sometimes I do get it right, sometimes not, because it takes time to fully understand the problem and the solution. Sometimes you don't fully understand it until you've gone the wrong path. My customer pays for me to learn about how to fix the problem and for the fix itself.
>"When you get the code working, rewrite it so it looks like you knew what you were doing all along"
>
> then try billing the client for that.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer