When I was a kid my parents bought me a programmable graphing calculator. I had started showing an interest in programming by bringing BASIC books home from the school library. The calculator let me take my burgeoning programming hobby on the go. I went everywhere with it, making little game programs and graphs and whatnot.
You might try something like Dringend - The development environment for your iPhone & iPad on the App Store
That seems like a very professional tool with a steep learning curve, but I hope you get the idea. You don’t have to use that one, there are others like it where all you have to do is tap the app and just start coding. Just do it on the go with time otherwise wasted on waiting for stuff. It’s how I get my reading done.