Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


As an interesting side note, it turns out books on programming that include chapters on encryption are not allowed in prisons.


Do you have a link to any reading about this? I'm curious.


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.


Is this an argument of sneaking in a book on elliptic curves that tangentially talks about cryptography?

(I kid, of course.)


I'd imagine the job prospects for ex cons specializing in cryptography aren't that great anyway.


Probably depends on the conviction


>> 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.

Reminds me of this Reply All podcast episode https://gimletmedia.com/episode/64-on-the-inside/

"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."


Too bad they can't have offline computers, teach an electronics class or something.


A few years ago I used to print out programs using this little tool: http://linuxcommand.org/man_pages/enscript1.html


"Now, it's been a few years since gcc has been able to produce a real listing..."

Can you share with readers the version number for the last gcc that can do this satisfactorily?


GCC 4.9 was a pretty big step forward.. well, atleast `g++` was.


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).


I had considered the mailing method and I think we will probably get there once he has the basics down. Thanks for the response!


What is 'listing of the compiled source'?


This page gives a pretty good rundown on how to create a listing: http://www.systutorials.com/240/generate-a-mixed-source-and-....

Basically it's a listing that intermixes the original C code with the generated assembly.

It worked fine on my Ubuntu 16.04 system, running GCC 5.4.0 so I don't understand what was better before.


In junior high we had a couple Apple IIs and a lot of IBM Selectrics.

We learned to code by typing out programs on the selectrics...


> 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.


If he has access to a smartphone, there are some coding environments that run on the phone. No need to run the code in such a roundabout manner.


Is access to a smartphone in any way a possibility while incarcerated?


If this is a typical american prison, smartphones (any phone for that matter) is considered contraband.


Would a programmable calculator be allowed?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: