Let alone engineering, someone with background in communication and journalism studies can be a programmer also.
So, I think someone with mechanical engineer background have a potential to be a better programmer than someone with communication studies.
They only have to keep learning, passion in what they do (coding) and have persistence.