You can learn how to program from books. Phone should be no problem either. But it is going to be much, much harder to learn how to program anything with any decent level of complexity. Writing everything in a single file? Sure. Writing a java app which has 20 classes? Sounds like hell. And while linux terminal isn't really programming, sending key combos like ^d sounds terrible on a phone keyboard. Something else th…
Terminal apps like termux supplement the phone keyboard with a pane atop it with tab,ctrl,pipe buttons. Should be usable.
>there isn't really any good IDE, or even editor out there.
Vim and others are available as packages in gnuroot, etc. A shell and editor split with tmux should work.
Still very uncomfortable programming on a phone ofcourse.