Learning to code without a computer is what we all did, 40 years ago!
He may write programs on paper, and send them to you to type them in, compile them, and print out a listing with the errors. You then send back the listing, and he will correct his program and repeat.
He'll become a great programmer, since he will have to be extra careful to avoid losing one week on some typo.
Now, it's been a few years since gcc has been able to produce a real listing of the compiled source. You would have to write some script to combine the error output with the source file to produce a classic listing. Similarly for other common modern programming language implementations.
On the other hand, without direct access to a computer, he would not attempt to write any interactive or GUI application, only batch programs, unless the interaction is performed only by an external tester for him.
Another idea: some progress has been made on optical character recognition, so if he can write well enough, it may be possible that you may be able to scan his written programs, and convert them to source file easily, without having to transcribe them. So the process could be smooth enough.
If writing ustensils include typewriter, then even better for the OCR!
> Learning to code without a computer is what we all did, 40 years ago!
Comments like this reminds me of how much of a difference is to live in a 3rd-world country compared to a 1st-world country. I am still on my twenties and I can still relate to what the parent comment says, I learned the basis of my programming skills reading books around ~8 years ago because during that time having a personal computer in my home country was a luxury. Very often I joke with my friends that most of the innovative things that we find in the market are already +3 years old. I still remember the popularity of the BlackBerry when it was already obsolete in the US because of the iPhone.
One thing I did during that time to learn some algorithms was to buy a deck of cards — which I suppose is allowed in jail — which allows you to understand sorting algorithms and some of the basic data structures like queues and stacks. Writing things on paper might also help to visualize and memorize some concepts (I know, memorizing is not the solution, but what else can you do when you cannot run your code in a computer).
I hope it helps, and good luck to @givinguflac 's friend.
>> He may write programs on paper, and send them to you to type them in, compile them, and print out a listing with the errors. You then send back the listing, and he will correct his program and repeat.
I'd pay good money to know what the prison superintendent thinks of this cryptic communication.
I actually spoke with a person who works with a specific convict who wants to learn math and programming. They apparently ran into this problem. I don't have a reference, though.
>> He may write programs on paper, and send them to you to type them in, compile them, and print out a listing with the errors. You then send back the listing, and he will correct his program and repeat.
The guy could 'run' his hand written programs on his own.
On almost all of my tests for classes where I was learning a new language, I'd have to write the programs with a pencil on paper and execute them, step-by-step, to ensure proper output. I'd say this way of learning is way better than skimming over some Javascript blog.
Indeed, that's what people would do back in the day when, between the wait to get an available computer and the time to compile, it could take days to find out the result of your code. Can never be sure it works until you run it for real though, can you?
Unless, by chance, you were suggesting he set up some kind of turing machine where running is a different matter than reading your program over in your head?
You're not limited to "a machine that executes code" (even as simple as a Turing machine) and "reading your program in your head." Most 8-bit processors were easily comprehensible by people, and could be represented in a simple state machine. That state machine can be emulated by anyone with pencil and paper, albeit at a billionth the actual execution speed. But walking through assembler that you hand-compile to machine code, and then step through rigorously with a constant eye towards what the processor is doing and how it does it is probably far more valuable than any certificates.
> He may write programs on paper, and send them to you to type them in, compile them, and print out a listing with the errors. You then send back the listing, and he will correct his program and repeat.
"For years, Paul Modrowski has been writing a blog from inside a maximum security prison. Only thing is, he was arrested when he was 18 and has never seen the internet."
While I agree that its what we did 40 years ago, it's not generally how we do it now.
I would concentrate on the things that don't require a computer- algorithms and mathematical type stuff (the stuff I am not particularly good at these days because I am usually setting up servers, using a database and high level frameworks).
> Another idea: some progress has been made on optical character recognition, so if he can write well enough, it may be possible that you may be able to scan his written programs, and convert them to source file easily, without having to transcribe them. So the process could be smooth enough.
I was going to ask if he has access to a smartphone to take and send photos of paper?
Set up a server for it. Hell turn it into a business.
He may write programs on paper, and send them to you to type them in, compile them, and print out a listing with the errors. You then send back the listing, and he will correct his program and repeat.
He'll become a great programmer, since he will have to be extra careful to avoid losing one week on some typo.
Now, it's been a few years since gcc has been able to produce a real listing of the compiled source. You would have to write some script to combine the error output with the source file to produce a classic listing. Similarly for other common modern programming language implementations.
On the other hand, without direct access to a computer, he would not attempt to write any interactive or GUI application, only batch programs, unless the interaction is performed only by an external tester for him.
Another idea: some progress has been made on optical character recognition, so if he can write well enough, it may be possible that you may be able to scan his written programs, and convert them to source file easily, without having to transcribe them. So the process could be smooth enough.
If writing ustensils include typewriter, then even better for the OCR!