If you are hiring someone to develop code and you must pick one or the other, pick the person who knows how to code. If you can find someone with a degree in CS, math, physics, accounting, philosophy, a natural language, law, or anything else who also knows how to code then hire that person.
Especially if they have a degree in the subject matter and know how to program that's a bonus. Sometimes the actual subject matter really is CS. Sometimes it's accounting, medicine, physics, geology, or something else.
Saying one must hire a degreed person (with a specific degree no less) exclusive-or someone with skills is just silly. Don't weight the degree heavier than it deserves, but don't dismiss it either.