-- If he'll be in for a year or two with essentially zero access (no computer inside, no computer buddy outside), he should learn something related to programming (math, web design with CSS, etc.), basically re-ordering a typical multi-year learning sequence to put the coding later
-- If he'll be in for ten or more years, he should learn something else. His learning will be so slow and the field changes so quickly that he might learn a few timeless fundamentals, but that's all. He could accomplish much more in some other challenging field that didn't require tools he wouldn't have (ex: math, physics, accounting, ...)
-- If he'll be in for less than five years with access to a computer (via friend outside, for example) every couple of weeks, it could work. It would be like my situation when I was a kid and kids didn't have computers (but I was able to sneak some access). I would do it differently now from what I did then. I would read programming books and get my hands on lots of small example programs. You read the lesson, do the exercise on paper, run it on paper, and only when you are SURE it works (or you're SURE you don't know how to make it work), you read the "answer" (code written by a pro) and study it. Use worked examples as feedback when you can't get it from an actual computer. As you do this, write simple things and send them to the partner on the outside as you continue to work examples on the inside. The turnaround time won't delay you as much if you have other things to do while you wait.
Now, take his real situation, consider the above scenarios, and craft one that will work for him.