Everyone on this forum that was able to learn how fly and operate large aircraft is more than intelligent enough to be able to learn how to code. If you get treated like crap at an airline, you go do something that pays better. It always helps to have a plan B.
Indeed I went from a Computer Science degree to a well paid IT Consultancy position, that funded a CPL/IR after resignation, then 737-300, and then back to IT/Government consultancy. I recall many Captains after I stated my previous pre-airline salary look at me as if I were crazy to give it up, and more than one told me I was foolish.
There are youtube videos of a recent BA A320 captain in his early 30's give up flying to code... starting from his last days up front to his new career.