Wired has an interesting article that discusses the question “what makes an engineer an engineer?”
Programmers, Let’s Earn the Right to Be Called Engineers – http://www.wired.com/2015/11/programmers-lets-earn-the-right-to-be-called-engineers/
I think that it is not easy to answer this question, as there are many different programmers out there. A VBA programmer writing macros in Excel is very different from an embedded programmer writing plane controlling programs. It depends.