Live data from Hacker News

Ask HN: Learning to code, without a computer?

news.ycombinator.com

81–90 of 194 posts

Re: Ask HN: Learning to code, without a computer?

#81

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 h…

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

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?

Re: Ask HN: Learning to code, without a computer?

#82

Bell Lab's cardboard computer ( https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_... ) came to mind, but you are probably right that studying algorithms (and at least something about hardware) is probably the best starting point. As it is some time since I was in school, I am not sure what counts as a good introductory text these days. This does not give any experience in debugging, which is not taught in…

We used the CARDIAC as an intro to programming in my high school Computer Math class (Fall, 1980). Nobody that I knew in class enjoyed it, so I wouldn't recommend it.

Re: Ask HN: Learning to code, without a computer?

#84
A light introductory college text on "Symbolic Logic" with exercises and answers if possible.

The way of thinking that such a text gives is nearly identical to the thinking needed for coding.

Just one example: We coders sometimes forget that a conditional like "if (not (A and B)) or C then..." is utterly incomprehensible to the bulk of humanity. Go through a logic book and that stuff will be second nature.

Also it helps lifelong with clarity of thinking which is nice too.

Re: Ask HN: Learning to code, without a computer?

#85
A programmer is someone who puts himself above phenomena that he observes around him. So programming isn't intrinsically related to a computer.

He needs to find interesting things around him, and just make plans. Write it down. Without a computer he can use a paper and pencil.

Re: Ask HN: Learning to code, without a computer?

#86
A programmer is someone who puts himself above phenomena that he observes around him. So programming isn't intrinsically related to a computer.

He needs to find interesting things around him, and just make plans. Write it down. Without a computer he can use a paper and pencil.

Re: Ask HN: Learning to code, without a computer?

#87

Why are you not allowed a computer when incarcerated?

* Most facilities have really crappy electrical systems, so they are restrictive about appliances.

* Many appliances can be great hiding spots for drugs, makeshift weapons, etc - in Texas all of the allowed appliances were clear for this reason, and had to purchased from the prison

* Paranoia about Internet access (yes, I know a typical laptop can't connect, but try to get into the mind of undereducated, paranoid staff that has to answer to a frightened public)

* Use of computers for illegal activities in prison - like gambling rings, etc - anything in prison is searchable, and paper is inherently more searchable than GB of texts for low-end guards)

Re: Ask HN: Learning to code, without a computer?

#88
I'd strongly recommend The Little Schemer (Friedman and Felleisen). It's written without the expectation that you have access to a computer. It's also written in a very approachable way - it assumes no prior familiarity with programming or even math, and it's in a simple question and response format.

Re: Ask HN: Learning to code, without a computer?

#90
I want to echo the suggestion that several others have made, to start with a good book on just about any programming language that has a lot of sample programs in it, and learn to read that code and execute it with pencil and paper.

This will be much more productive than trying to learn to write code from scratch while also learning a language and learning how to execute the code with pencil and paper.

I would start by going through the exercise yourself: pick out a book and use one of the first sample programs, and set up a "debugger" on a pad of paper.

I used to do this kind of debugging myself: when I first learned BASIC back around 1969, I spent some time in my grandmother's basement with two pads of paper, one with my code and one for the debugger. The debugger pad had columns across the top:

  Line number    One variable    Another variable    Another one
Then I would step through my code, adding a row on the debugger for each line I executed, with the current line number in the first column and each new variable value in the other columns.

After going through this exercise with one program, send your friend the "debugger" pad along with the book, so he has a place to start with this idea. He can then go through the same example and follow along with your debugging steps.

That way he has a solid place to start when exploring the other sample programs in the book.

Please feel free to email me if you'd like to kick this idea around - address is in my profile. And I strongly suspect that everyone else in this thread would be happy to extend you the same offer.

I also heartily endorse the suggestion to read Charles Petzold's _Code_. It's a wonderful book!

Post reply on HN