Over the years I've encountered a large number of graphic designers being required to write code. Generally this is because they're given responsibility for the user interface and this tends to encompass the code to drive the UI in addition to the look and feel. On the whole this has not been a great success, resulting in poorly maintainable, buggy code in the user interface layer. There is a tendency amongst developers to discount the importance of the user interface layer ("So you're saying this is two shades too blue? I care why, exactly?") but this ignores the significance of the user interface layer in the usability and acceptance of your application.

I tend to see less instances of developers being called on to be graphic designers, possibly because it's a lot easier for managers to see that a developer has produced an ugly design than to see a graphic designer has produced ugly code. That said, most people who've used a computer have encountered overly complex, confusing user interfaces put together by developers who fail to understand the needs of their users.

It's my opinion that the tendency to get graphic designers to code is, without suitable support and training, a discounting of the skills of both groups. Either you imply that coding is trivial and can be done by anyone, or you imply that the quality of the user interface doesn't matter. I don't accept either of these implications. It is important to have both solid, maintainable code and a well presented, functional user interface. This requires multiple skillsets and at some point there must be an overlap.

There are a number of possible solutions here. Some such as MVC or WPF attempt to apply technology to allow the user interface design to be separate from the code. I am skeptical that this is a problem with a purely technological fix, if only because there's more to user interface design that making things shiny and concepts such as the data to be displayed or the functionality made available necessarily bleed between layers. My preferred solution lies with people.

It is not necessarily true that graphic designers can't code or that developers can build user interfaces. What is generally lacking is training and experience. Graphic designers should be knowledgable about basic concepts like maintainabilty and fundamentals such as object-orientation. If they're working in a distributed system they should understand the costs of remote communication and methods for avoiding excessive overhead. Conversely developers should understand the fundamentals of building user interfaces.

The above should not be taken to imply that all graphic designers must code or that all developers must be user interface experts. Rather there should be an understanding of the skills of each individual present in the tasks they are assigned. Where there are tasks that may be outside these skillsets allowance for suitable training, review and mentoring must be provided to ensure that the final product has a high quality user interface and a solid codebase.