I'd recommend he read the "structure and interpretation of computer programs". It's written for audience who would, at the time, have found programming novel, but would be at home with math. Hence it's written in a language that allows you to expand out the program by pencil and paper, much the same way you would simplify an equation, to see if it works. Also the following books, which I've copied and pasted from som…
Wow, this is an incredible list. I think this is probably the best first step, and some of the other excellent responses I've got here would be a step two or three. I really appreciate you taking the time to provide these suggestions.
Also bear in mind that without access to a computer or external tutelage, it's going to be very difficult for your friend to know whether or not his code is working properly. Stratoscope's suggestion of hand execution (https://news.ycombinator.com/item?id=12668865) is a good suggestion to help combat this issue. However, this means most likely that your friend will need to start with a language that's simple in structure; this disqualifies most modern languages. BASIC, Pascal, C or other extremely simple languages will be most amenable to this type of hand execution.