Every skill is different. Teaching skill may be hard, if you do not have passionate in teaching. Same thing is applicable to coding or programming. If you have passionate of the work, that skill is not hard. As per my knowledge university professors and associate professors are not paid well. But still they are in teaching because they are passionate of their work. One of my friend (actually he is my class mates professor) worked as associate professor for 7 years. He has couple of master degrees in engineering and a PhD. He said earning 100K is not easy in teaching (university). He resigned and changed his career to IT. He passed 100K mark with in a year.