Should designers learn to code?

Yes and no.

There is not really a right answer to this question because it depends on several factors. If we are talking about understanding code but doesn’t necessarily living in it, then yes. If we mean coding as easily as we talk, then no.

Our focus should be in what we are good at, for example if you’re a good designer don’t waste your time learning how the DOM works, you just need to know what is possible to do, and how to communicate problems and solutions to the people who do know such things.
The more you specialize, the more you benefit the team. If you know the basic concepts of web programming you can make smarter decisions as a web designer.
As in our daily lives, communication is essential. It is necessary to use a common language to understand each others, to stay on the same page. That is what will allow the project to move further.

In fact, I believe that a designer should know how to code their own design. That’s the best way to ensure a consistent result. Hey, HTML and CSS are not that difficult.
This question does not apply if you are both a great designer and programmer. But there are only a few of those around.
As I said — you don’t need to be a great programmer but, if you can find the time, try and learn the basics, I’m sure you won’t regret it.
As the Portuguese proverb says — “O saber não ocupa lugar”.

Have a nice week and smile 🙂