
Ask HN: Learning to code, without a computer? - givinguflac
I have a friend who is incarcerated, and is dedicated to learning how to code, no matter how slow or arduous the process may be. He has no access to a computer, just books and writing utensils. While it may be very difficult, what are suggestions you have on how to give him the best chance for success?<p>Even if he&#x27;s not learning a specific language, what are some background concepts he can learn in depth that will help him understand coding? I recommended he study algorithms as a starting point but I am not a dev and am not sure how to proceed without a computer.<p>I realize this is an unusual question, but I greatly appreciate any responses. It&#x27;s sad that someone so badly wants to improve themselves and can&#x27;t easily do so because of our archaic prison system. I want to help give him a chance to have a real profession once released. Thank you!
======
informatimago
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!

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

~~~
savanaly
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?

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

------
llamaz
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 somewhere, to
learn theory:

Mano, M. Digital Design, 3rd ed. Prentice Hall, 2002

Mano, M and Kime, C Logic and Computer Design Fundamentals, 2nd ed Prentice
Hall, 2001

Gajski, D Principles of Digital Design Prentice Hall, 1997

Tanenbaum, A Structured Computer Organization, 5th ed Prentice Hall, 2006

Patt, Y and Patel, S Introduction to Computing Systems: From Bits and Gates to
C and Beyond, 2nd ed. McGraw Hill, 2004

Null, L and Lobur, J The Essentials of Computer Organization and Architecture,
2nd ed Jones and Bartlett Publishers, 2006

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

~~~
RandomOpinion
I cannot say I agree that the list of books provided by llamaz is good. The
suggestions given so far are college-level CS textbooks (like SICP) and may be
too difficult to start with for somebody without the necessary background
knowledge. Unless your friend was already a college student in a CS program, I
would recommend looking for books and instructional materials targeted at the
high-school level instead.

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

~~~
db48x
SICP is an introductory text, and is usually taught to first-year
undergraduates. We don't even know what sort of educational background this
friend has, but if he can do algebra, then he'll be able to do the exercises
in the first chapter and check his answers. Furthermore, because Scheme uses
the substitution model, doing the exercises on paper is possible. It'll take
care and attention to detail, but every Scheme expression can be expanded and
reduced according to simple rules, just like in algebra. The same cannot be
said for most other languages.

~~~
inimino
SICP is perfect for studying without a computer. I've done it that way and it
was a great experience. However, while it is presented as an introductory
textbook, it moves _fast_. It depends on the learner.

~~~
db48x
Hmm. The pages move only as fast as you turn them :)

It's probably safe say that it's more concise than others that I have read. A
sentence in SICP could become a paragraph in a lesser book.

~~~
inimino
Right. In a classroom with lots of bright students and lectures and Q&A it
works great. With access to supplemental online resources also great. With
none of that I think it would depend on the student and their patience,
aptitude, and background.

------
mbertschler
What is the most capable programmable device, that would not be considered a
computer by the rules? How about a graphical calculator like a TI-83?

While I was stuck in school and did not have access to a computer, I wanted to
challenge myself during classes. The most interesting distraction by far was
to play around with the programming functions of my TI-82 calculator that was
required for math classes. Even with almost no idea about programming I could
soon do interesting things with it, because it is programmed using a version
of BASIC. In the end I even created a clone of snake. It worked, but moving
one block ahead would take 2 seconds.

~~~
thaumasiotes
I don't get why people continue to recommend TI-83s. I showed up to Algebra II
with an 85, but 83s were weirdly prevalent until calculus "strongly
recommended" TI-89s.

In this context, the 83 is an awful, awful choice, because TI-83 programs only
allow for variable names to be one character long. I was lucky, when someone
asked me to copy my TI-85 blackjack program into their TI-83, that I had used
less than 28 variables.

~~~
khedoros1
I've never used a TI-85 or 86. From what I remember, we were told that an 83
or 89 had some particular feature that the 86 lacked (apparently some
statistics functions, or something?) People are more likely to recommend based
on what they know, and with school recommendations being what they've been,
more people know the 83/84\. I was envious of my friend's 89, but my parents
wouldn't pay the higher cost.

~~~
thaumasiotes
> People are more likely to recommend based on what they know

True, but very sad. I am given to understand, from an HN thread months ago,
that the state of the art in school graphing calculators now is the HP Prime.
But that never even gets mentioned in recommendations, because no one's ever
heard of it. (And there's very little incentive to learn what to recommend,
because the only value of a graphing calculator is that it's permitted on
standardized tests -- the HP Prime is $165; the HP Prime software for your
Android phone is $10.)

> I was envious of my friend's 89, but my parents wouldn't pay the higher
> cost.

Also sad. I read the manual for my TI-85 cover to cover; it taught me about
polar coordinates and euclidean vectors before my school covered them. For a
child interested in math, these calculators can be wonderful.

------
hn_felon
I did 6 years in Texas, but I was already a developer before I went in. That
said, I had some books sent to me to try to keep my mind fresh. I also helped
someone else who was released a few years after me get going and now they're a
junior dev.

Emphasize learning that will serve freelancing, since someone with a criminal
record will run into issues with traditional employment. (I've been out since
2009 and done very well) Ruby, PHP, Javascript are some of the best bets.

I'd recommend O'Reilly's Head First books. Even if they're a few years old,
really doesn't matter, given the situation. I think Sandi Metz's Practical
Objected Oriented Design in Ruby is great - she does an awesome job of
explaining OO principles even if you don't end up writing Ruby. The Manga
Guide to Databases is another good read that explains concepts well.

I'd also consider a book that shows a quick way to build web apps, like Agile
Development in Rails or maybe a book on ColdFusion. Without the ability to
write and run code, it can help plant seeds for those "aha!" moments for
understanding the code -> web request lifecycle without getting bogged down in
ceremony.

In Texas, the books had to come from a bona fide bookseller, so don't go to
B&N and try to mail the books yourself.

~~~
anarazel
Thanks for sharing.

------
Stratoscope
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!

------
mannykannot
Bell Lab's cardboard computer (
[https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_...](https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation)
) 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 books,
AFAIK. I am not sure what to do about that...

~~~
givinguflac
Thanks! That CARDboard looks really cool, I'd never heard of it. I'll look
into things like that; I really appreciate the response.

------
SiVal
I had to learn to program with pencil and paper, but I had occasional access
to a computer, so I have to ask for more info. How long until your friend gets
out? Will he have zero access to a computer while inside? Will he have someone
on the outside who can take handwritten code, enter it, run it, and send back
the results? If so, what will the turnaround time be? What does he want to do
when he gets out?

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

~~~
caffinatedmonk
> \-- 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, ...)

The field changes quickly but the fundamentals (data structures, design
patterns, data structures) not as much.

------
ajamesm
Sounds like a great opportunity to learn set theory, abstract algebra, number
theory, linear algebra. You could get a working comprehension of cryptography
or computer graphics. You could get a handle on category theory.

Those are topics that one could make progress on with only a pencil, paper,
and the occasional phone call to a mentor.

I cannot imagine submitting punch cards and reading JavaScript stack traces by
mail.

~~~
llamaz
He wants to learn to code, not how to become a mathematician.

As an EE student, there are plenty of engineers who know nothing about those
topics (except maybe linear algebra) that have successfully completed the
image processing/computer vision course.

~~~
ajamesm
> Mano, M and Kime, C Logic and Computer Design Fundamentals, 2nd ed Prentice
> Hall, 2001

"Featuring a strong emphasis on the fundamentals underlying contemporary logic
design using hardware description languages, synthesis, and verification,"

You mean to tell me that set theory is too abstract, but full-adders and VHDL
are right up his alley.

~~~
llamaz
Nothing is too abstract for a grown adult. It's expected that by that stage
you will struggle through whatever is thrown at you. In fact the book list
I've copied and pasted are the recommended texts from the "computer
engineering 101" class.

The problem is that most mathematicians don't have more than a surface level
working knowledge of set theory, because they don't think it's useful. It's
even less useful for computer scientists (who use type theory any way).

With the exception of set theory, I've taken the classes you've mentioned, and
while they've been very useful for electrical engineering, I don't believe
they're useful for software engineering.

~~~
ajamesm
> Nothing is too abstract for a grown adult.

SICP, dearth of practical experience... MIT? Any case, you live in a daycare.
Remember we're talking about someone incarcerated.

------
downandout
A word of caution: "Learning to code" is a pretty broad subject. You should
have him think about what he actually wants to accomplish with code when he
gets out and have him study topics related to that. He can pickup ancillary
things when he gets out; for now he likely wants to be working on something
that will help him hit the ground running. If he wants to develop web pages,
you should send him some books on JavaScript. If he wants to create mobile
apps, there are specific books on this subject for iOS and Android. Most
programming languages share concepts like OOP etc anyway, so by learning one
he is laying the groundwork to much more easily pickup others.

Also, you should give him realistic expectations. Learning to code isn't the
panacea that many think it is. There are many broke but talented programmers
out there, and most don't have the extra baggage associated with a felony
conviction. If he doesn't truly have a passion to create software, and is just
looking for a way to make money, there are more efficient things he can learn
about - like the psychology behind viral marketing (The Tipping Point by
Malcom Gladwell and Purple Cow by Seth Godin might be good for example). I
know someone that couldn't write a line of code to save his life, but makes 6
figures per month creating Facebook pages around ridiculous topics and using
them to drive traffic to affiliate offers and his own Adsense pages. Your
friend can always hire coders when needed if creating software isn't what he
actually wants to do.

------
groundCode
I came across CS unplugged a while ago. Looks like it might be useful
[http://csunplugged.org/](http://csunplugged.org/)

~~~
jnbiche
I have to heavily stress the appropriateness of Computer Science Unplugged.
While technically oriented toward younger students, it's absolutely
appropriate for an older adult learner without a computer. If he can learn the
material in CS Unplugged front and back, and understand it perfectly, he'll be
_very_ well placed for starting a career in programming when he gets out. Many
programmer interviews are based on the materials that this book covers.

And it's just a book, and all exercises in it can (and should) be done with no
computer.

Once he works through this, send him a copy of SICP:
[https://mitpress.mit.edu/sicp/](https://mitpress.mit.edu/sicp/) Covers some
of the same material at a much higher level, and more.

------
exDM69
I have no idea about prison security and how things work, but are there
programmable gadgets that are allowed inside? Ie. something that is really a
computer inside but doesn't qualify as a proper computer when it comes to the
rules. Some pocket tetris or similar game that could be hacked to run some
kind of programming environment? Some old computing gadget that runs a basic
interpreter? Edit: TI calculator mentioned by someone is an excellent idea if
it passes the rules.

Apart from that... reading books and solving programming puzzles might be a
good way. Something that has a feedback loop, which you won't have in the
normal way without a computer at hand.

I must take my hat off for this kind of determination! I hope it provides your
friend with a way out and they have a better life ahead of them.

~~~
givinguflac
Unfortunately there is nothing close to that allowed; thanks for the thought
though. I'd love to see someone implement a product that would allow people in
this scenario to learn.

------
jeffmould
Depends on where he is incarcerated there may be options available and if not
he should find ways to bring them to the prison.

1) Edovo is a tablet learning solution that is in many jails
([https://edovo.com/](https://edovo.com/))

2) Another group The Last Mile, while they got their start in San Quentin, is
working to bring their program/model to more prisons.
[https://thelastmile.org/](https://thelastmile.org/)

Regardless, I would encourage reaching out to either program to explore their
options further. The people behind each are incredibly helpful and may be able
to assist you with additional details.

~~~
kzahel
The Last Mile is now up and running in 4 California state prisons. Folsom
Women's Facility, Ironwood State Prison, Chuckawalla State Prison, and of
course San Quentin.

We're going to be expanding into a few more in 2017. You can see some of the
details of how we setup the classroom here:
[https://github.com/thelastmile/intranet](https://github.com/thelastmile/intranet)

~~~
wiseleo
What happened with Last Mile and Quora? We liked those answers. :) (I am one
of Top Writers)

~~~
kzahel
Good question. I think it's just one of those things that takes a lot of time
to manage and update, and we are understaffed and somehow it's not
prioritized. I'll bring it up and see if I can get some more updates going..

------
VertexRed
I don't understand why they don't give inmates access to a computer for a few
hours per day.

When they're out the hard working ones will have programming skills which will
help with the job hunt.

~~~
DarthMader
The goal of our penitentiaries isn't rehabilitation or to prepare inmates for
a life outside of jail

~~~
krapp
And more to the point, taxpayers don't want their money to go towards
enriching the lives of inmates, only their punishment.

"Why am I paying to have rapists, killers and thieves jerk around on the
internet all day," they'll say, while voting out the party responsible and
voting in the party promising to take the computers away and make the inmates
break rocks in the sun until they drop.

------
S4M
If your friend plays chess - or any 1 vs 1 board game - he can implement a
chess program and execute the algorithm by hand to see how his program
performs. I haven't done that myself, I am sure it's tedious, but at least he
will be able to see his algorithm running.

------
jrochkind1
I loved The Little Lisper/Little Schemer. The edition I used, at least, would
work well to teach certain kinds of programmatic/computational thinking
without a computer.

But I feel like I saw an actual curriculum without a computer recently, but
now I can't remember what it was, curious to see if it shows up in this
thread. Great idea for the incarcerated! I'm going to see if I can figure out
what I'm thinking of.

Ah, I think I was thinking of the CS Unplugged that others have mentioned,
sweet!

Thanks for this post, I think I'm going to buy a few copies of Little Schemer
and CS Unplugged and ship them directly to a Books to Prisoners program I know
that sends books to prisoners in response to topical requests.

------
toomanybeersies
Professor Tim Bell (University of Canterbury) is real big into this. He made
CS Unplugged ([http://csunplugged.org/](http://csunplugged.org/)), a program
for teaching CS at school without using computers.

It is aimed at school children, but it's a place to start.

------
arikr
I remember reading an articulation that it is odd that we are taught to
program differently to how we are taught to play music.

With music, we are taught to read before we write.

With programming, we start out writing.

This seems like a great chance for your friend to try out the music learning
approach. Send them books of excellently written programs, and allow them to
read before they write.

[As a side note: What is their goal? To program to become a software engineer?
To program to build web applications for fun? To program to learn how to build
products to produce a profit for themselves? The goals will inform the
process.]

~~~
akkartik
I'd actually make your point even stronger. I think we're in a preliterate
state with programming: it's hard for anyone to quickly look at a program
listing and answer the basic sorts of comprehension questions we might test
school kids on for prose.

What we find easy is to read programs we wrote. Recently.

(I'm trying to help change this:
[http://akkartik.name/about](http://akkartik.name/about))

------
techplex
Neil Fraser wrote about getting a letter from a an inmate wanting to learn to
program. He sent two books and a problem to solve.

CS Unplugged: Computer Science without a computer and Nine Algorithms That
Changed the Future: The Ingenious Ideas That Drive Today's Computers. I've
also posed a problem for him to ponder:

"You have five fingers on your hand (usually -- a few people have more, many
have fewer). Each finger can be either extended, or curled up. So a fist would
be all fingers curled up, a high-five would be all fingers extended, and many
other combinations exist (including the obscene middle-finger gesture, and
probably a whole lot of gang signs). What is the total number of possible
combinations that can be produced using five fingers? Can you do them all?
What is the total number of possible combinations that can be produced using
ten fingers? Can you figure out a pattern so that you could calculate how many
possible combinations there would be if you had 16 fingers?"

[https://neil.fraser.name/news/2015/04/13/](https://neil.fraser.name/news/2015/04/13/)

------
daver0_0
Maybe the best use of his time would be to develop math skills. Probability,
Statistics, Calculus, Logic, perhaps a focus on algorithms (as you suggest)
will give a leg up in important areas of computer science and make it much
easier to jump in and do meaningful work when your friend gets out. Also all
those skills do not require a computer to develop - although they are
challenging. I hope there is some sort of support available in his current
institution.

------
samblr
Writing pseudo-code on paper by making use of data-structures would set his
aptitude levels. Its like building right muscles and reflexes for a sport.
Books like this will help (Cracking coding interview) -
[https://goo.gl/jSUylb](https://goo.gl/jSUylb)

One of the key things to also understand here is - what is missed out in this
type of training. Tools. Tools. Tools.

As developers we have come far away from limited IDEs. We rely on so many
tools that knowing-they-exist or sometimes mastering them is difference
between good-or-bad devs. I would recommend to read printed material about
IDEs, screen shots of tools.

Couple of other things I have found really helpful: * I had underestimated
Medium as a platform to rely for tech news till lately. There is so much of
latest developer/platform news and articles. Print outs of these definitely
help. * Stackshare posts ([http://stackshare.io/featured-
posts](http://stackshare.io/featured-posts)) on what stacks/tools companies
use (and how) are eye opening to say the least. Print outs of this.

------
x0x0
If your friend has free time, he may also enjoy _Code_ by Charles Petzold.
It's a layman-oriented explanation of how computers work.

Is he in state or federal prison? Are there no classes available that could
give him access to a computer?

~~~
givinguflac
Thanks for the book suggestion! He is in state prison, and there are some
courses but nothing to do with programming. To make matters worse, due to
having any form of external support structure, he is categorized as a "low
risk" of recidivism, and high risk people are given preferential treatment
toward enrolling in classes. I don't disagree with this in theory. But
unfortunately due to overcrowding, this means that ONLY high risk people are
getting to do classes, so he's on his own. Thanks for the response!

~~~
x0x0
Is there any chance you could just pay for him to take the classes? Or find
prison correspondence courses ala

[https://www.ohio.edu/ecampus/print/correctional/](https://www.ohio.edu/ecampus/print/correctional/)

or

[https://www.adams.edu/extended_studies/undergrad/prisoncolle...](https://www.adams.edu/extended_studies/undergrad/prisoncollegeprogram.php)

------
robert_tweed
In addition to the CS books already recommended by others, do not
underestimate the value of flowcharts.

You can draw a program on paper and follow it with a finger to "run" it. With
a bit of practise, it'll be possible to run such mental models without even
writing them down. At that point you're thinking like a programmer.

This skill is transferrable to any programming language.

~~~
huherto
yes. Good idea. Try to do them using structured programming. whiles, fors, and
subrutines

------
vargavince91
Agree with all the CS Basics book (would add the Code: The Hidden Language of
Computer Hardware and Software, great book and if he has time, I'd go for it).
I'd also consider giving him a couple of books, like: A) Clean Code by Bob
Martin, B) Soft Skills by Jon Sonmez. Books that doesn't require a computer,
yet teach the reader how a good developer should think while writing code and
working in a team. It's also less likely he gets stuck while reading this kind
of literature.

Would help if you shared the end goal. Get hired anywhere? Get hired by Top 4
Tech Company or Hot Startup of the Year? Start a business? Don't get bored?
How long is he going to be incarcerated?

I would greatly appreciate if you shared your experience.

------
Pulce
Me :)

I'm 'fighting' ('working' is a better definition) for civil rights in my city,
so I think I will be incarcerated in the future...

I think I will organize a 'paper' version of Scratch, with me as an
interpreter of lines of code.

edit: I'll miss Stallman's videos...

~~~
rukittenme
If you're being incarcerated for advocating civil rights, then you're doing it
wrong. There are plenty of ways to affect change without committing a crime.

~~~
Pulce
Nice comment. Come in Italy and I'll show you some way to be condamned while
acting in a ethic way :)

edit: I am a condamned and I didn't commit a crime.

~~~
i336_
I'm really sorry to hear that.

Suggestion: put _everything_ in an encrypted file (I think .7z is good, AFAIK
.zip is very bad), send that to lots of people. If anything happens to you, it
should be manageable to get the passphrase to somebody.

PS. HN is using HTTPS

~~~
Pulce
Thanks.

------
on_and_off
My first programming courses were all done with pen and paper.

Understanding how variables, loops, stacks and so on work was all done by
writing the algorithms, and our first contact with a computer was in order to
write some assembly code, after something like 2 months.

That's not ideal but you can already learn a lot without actually writing code
to a computer.

Having access to a programmable calculator or even better to a smartphone
would obviously be better.

Would he be able to get some kind of no-name android portable media player and
write code on that ?

A simple google search leads me to QPython, I am sure there are tons of other
IDEs running on Android. That might be the best option if he has access to
such a device.

------
tzs
Would he be allowed to have a calculator? If so, then maybe you could get him
a programmable calculator. Something like an HP-48gx, perhaps.

------
uola
I would consider if focusing learning CS or fundamentals is the right
approach. What is the plan when he gets out? I'm not sure there's a lot of
beginner CS or C jobs around without credentials. Is he going to try and go to
school afterward and is that actually feasible?

Otherwise I would suggest combining CS with more applied programming with
smaller scope (like a web stack), developer methodologies (designing,
methodology, testing) or design (interaction, interfaces, experience). Those
would be things that he could more easily be practice as he gets out, aren't
as focused on credentials and would more likely land him some sort of job.

------
veddox
Learning programming without a computer is going to be really tough, but if
he's dedicated enough, he should be able to make some good progress. (Although
he shouldn't expect to be employable as soon as he gets out.)

CS theory probably makes a good starting point, as a lot of it doesn't require
actual coding, but still lays a solid foundation for future work. I would
recommend SICP (Structure and Interpretation of Computer Programs, by Abelson
and Sussman) as a good starting point. It uses Scheme, which isn't exactly a
language he's likely to end up working in, but it will teach him a whole lot
about thinking like a programmer.

~~~
dzpower
For self-guided study, HTDP (How to Design Programs) is more accessible than
SICP.

[https://www.amazon.com/How-Design-Programs-Introduction-
Prog...](https://www.amazon.com/How-Design-Programs-Introduction-
Programming/dp/0262062186)

------
SixSigma
Try Bell Labs Cardiac the cardboard computer

[https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_...](https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation)

------
sAuronas
Be like Malcolm X and read every programming book he can get. Send him PDF
copies. I'm self-taught. I obviously had a computer but I spent a ton of time
just reading and studying other people's code. There was a time as a kid when
I wanted to play the Sax but my mom made me wait a year. I bought a book and
learned the fingerings and played by air for a whole year and took first chair
the next. If he is really motivated, he can do it. In fact... I'll contribute
and send him books as well as advise on how to get there. Send me a message
and I'll help you help him.

~~~
taneq
> Send him PDF copies.

Unlikely to be useful if he's not allowed to possess a programmable device.

------
amorphid
Hey! This is a topic I'm interested in, too. If you'd like brainstorming on
the idea, drop me a line. My email is in profile.

My first thoughts:

\- iterate more quickly by experimenting with non-computer users who aren't in
prison, as letters/email to a prisoner will have a slower feedback loop

\- learn what people consider to be more fun, and and try to structure lessons
within that

\- see if there are some existing resources that are close to, but not exactly
like, programming without a computer

\- set up an open source curriculum on GitHub, so people besides yourself can
contribute

------
hanakoWasNOCent
He needs to take it in stages, first learn the vocab of whta constitutes
whatever the syntax is of his preferred language.

I recommend C++ as it is useful for a LOT of different types of electronics,
embedded, pc, servers, you name it.

Also UNIX scripting is very useful.

Then he should write very small programs that he can use to build into little
functions for larger ones. Something like adding two numbers at first, really
simple, like almost blindingly simple, just to get comfortable with the
architecture of the language.

Then write something that is more complex, something like how to make a little
calculator that does all sorts of functions.

He'll need at least one reference book (which I heard you said he has, but you
didn't specify what type of book, so look into it... it's a bit of a tedious
process to get decent textbooks into the squares, but if you buy it new and
send it to them FROM THE PUBLISHER, he can get it, you probably know this, but
someone else might be reading and they might wanna help someone learn as well,
so they need to know)

Additional texts of note:

Data structures

Math books, especially linear algebra

Web Programming

Wireless Communications / Bluetooth

That'll last him at least a couple of years to really master. Beyond that, he
needs to get a system of writing so that he's not having to use English
constantly, as it will take a ton of time. I've seen people use something akin
to semaphore, but it's not _extremely_ important unless he's older, and has
used his hands a lot. Cramping sucks, and losing your ability to write is
nicht gut.

Alright well, I hope this helps. Best of luck to your friend, and if he
mentions a thank you, please tell him he's welcome.

God Bless.

------
sramam
I can't seem to find the reference to it, but there was a link on HN a couple
of years ago of a dad who taught kids (9 year olds IIRC) to program a robot by
creating a real world obstacle course, giving them a basic set of "commands"
that they could put together on post-it notes and a parent or another kid
being the "robot" that "ran these instructions".

I have used this to introduce my son to the basics - and call it "post-it"
programming. We built a few obstacle courses around the house. The most
advanced we got was to "unload the dish washer", that resulted in him
"inventing" functions.

It typically works better when some one else "executes" the program, since
bugs are easier to surface and debugging is a lot more fun.

That said, my son has since learnt to read and write. There is greater
enthusiasm to "type" on a computer than use post-it notes.

Hopefully this can be adapted to your friend's circumstance. Best wishes to
him.

------
bra-ket
I learned programming without a computer in the 90s with Kernigan & Ritchie "C
Programming Language", one of the best coding books ever written:

[https://www.amazon.com/Programming-Language-Brian-W-
Kernigha...](https://www.amazon.com/Programming-Language-Brian-W-
Kernighan/dp/0131103628)

I'd also learn SICP: [https://www.amazon.com/Structure-Interpretation-
Computer-Pro...](https://www.amazon.com/Structure-Interpretation-Computer-
Programs-Engineering/dp/0262510871)

and algorithms from either CLRS [https://www.amazon.com/Introduction-
Algorithms-3rd-MIT-Press...](https://www.amazon.com/Introduction-
Algorithms-3rd-MIT-Press/dp/0262033844) or Skiena Algorithm Design
[https://www.amazon.com/Algorithm-Design-Manual-Steven-
Skiena...](https://www.amazon.com/Algorithm-Design-Manual-Steven-
Skiena/dp/1848000693)

~~~
corysama
Along with SICP, _The Little Schemer_ would be a great book to work through on
paper. [https://mitpress.mit.edu/books/little-
schemer](https://mitpress.mit.edu/books/little-schemer)

Once that is worked through, _Godel, Escher, Bach_ would be an especially
entertaining and enlightening read.

------
joatmon-snoo
On a CS-theory level, there's a fair amount of stuff he can learn in terms of
just "thinking", but it won't come very close to being able to putz around
with code and watch it fail.

Suggestions for absolutely no computers:

* CLRS, the classic. (I just skimmed the intro, though, and if he has no background in uni-level maths, it might be a little tough to digest.)

* (maybe) __ __the Head First series (as someone else suggested). I 'm wary of suggesting it not just because I have no experience with the books (I only even mention it because I know they're ubiquitous), but also because bad habits are formed early, and this could do that.

* Patterson and Hennessy - Computer Organization and Design (5d.)

* Sebesta - Concepts of Programming Languages (11d.) (but only after finishing some of CLRS, and even then I don't know how appropriate this is)

=====

What kind of experience did he have with computers before he went in?

Depending, you may be able to make recommendations about stuff relevant to
what he's used.

=====

Can you get him something like a TI-84? Because even that will at least allow
him to go in and write TI-BASIC.

~~~
joatmon-snoo
It also occurs to me that something like Bruce Tognazzini's Tog on Design may
be very applicable to thinking about UI/UX if he only went in recently. (Not
strictly programming, but very relevant.)

------
Jugurtha
Well, we used to do that in college in... 2005, 2006, etc. We had a lab once a
week, but we wrote and debugged programs in Pascal, C, x86 ASM, Microchip ASM
by hand. We wrote stuff for the Intel 8251, 8253, 8255, 8257, 8259 (to handle
interruptions and do serial communication, etc).

We'd go line by line and change the relevant registers, arrays, pointers,
counters, etc. Exams consisted of doing that, too. Sometimes you're given a
piece of code and asked about the state at a certain break point. Sometimes
you're given a succession of register values an asked what the program is
doing. A missing semicolon had a direct influence on your grade, not on
stdout.

It's not guaranteed that it produces excellent programmers, but one can learn
a lot and it was almost a meditation to focus like that and ask yourself "Why
isn't it running?". It was cool (at least for me, I disassembled programs as a
teenager and I had a computer, but I still think this was useful).

------
jasim
I think Richard Bird's Thinking Functionally with Haskell will be an excellent
book to learn programming without having access to a computer. It'll teach him
how to think about programs as a set of simple equations, and also clearly
demonstrates that Data Structure + Algorithms = Programs, a notion that easily
gets forgotten to great detriment in imperative programming.

It is very much an introductory text to programming, something that can be
picked by someone who has an inclination to the craft but with no prior
experience. It doesn't even get into Haskell's powerful type system and sticks
to primitives and lists. The intention is to teach the building blocks of
programming through small, pure functions.

The text is very conversational, chapters are short and sweet, and have a lot
of bite-sized exercises along with their answers which will greatly help a
self-learner. It will also be easy to evaluate since functional code don't
tend to get very verbose.

------
rshm
I had few months of GWBASIC experience from high school. Relative living in US
mailed me Java the complete reference, i think the first editition with peter
naughton still as co-editor. It was not a dedicated effort but read the book
several times for two years during free hours without computer (could not
afford one). Finally after getting used pentium, the transition to real
programming was easy and fast. I remember having aha! moment of oop after year
and half but by the end of two years i had pretty much mastered the core java.

I was driven by courisity, no pressure of completion and had all the time in
the world. The book was thick with complete programs with outputs instead of
snippets. Book also had list of all core packages, class and their members. It
helped to grasp the core libs before hand.

I would suggest a comphrensive book. I have not checked any Osborne reference
series since then, but check if there are similar ones for python.

------
phes
I remember reading this here a while back - wonder what happened:
[https://neil.fraser.name/news/2015/04/13/](https://neil.fraser.name/news/2015/04/13/)

But like others in this post I would recommend CS unplugged.

And depending on how long he is in there for he might want to look at:

How to Design Programs - This is a good book, and although it's in Scheme, it
teaches how to create appropriate levels of abstraction, which seems to be
something many programmers struggle with.

Concepts, Techniques & Models of Computer Programs - Discusses the different
paradigms and how they are inter-related.

Also something a bit more vocational like The Pragmatic Programmer or Clean
Code / Clean Coder probably wouldn't hurt either.

If he can read all of those he will be very well prepared to do some actual
programming when he gets out.

SICP not a bad shout either, although I've not got past the first chapter.

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

------
LouisSayers
You could give him a pack of cards, and a book on data structures and
algorithms.

He can learn the algorithms and apply them to the cards in order to check his
understanding. He just needs to make sure that he acts like a computer would -
only ever comparing two cards at once.

He can simulate this by having all cards placed face down apart from the two
that he's currently doing the comparisons with. At the end he can flip all the
cards over to make sure he got the intended result.

I'm sure by doing this he could learn all sorts of algorithms this way, and
learn to code in the same way.

He may not have a computer, but don't they say that the greatest computers are
the ones in our heads?! He just needs to dumb it down a bit for the sake of
the exercise.

------
Theodores
This is a good question for old timers that learned to code by rote with a
home computer back in the day when you could learn a language and all of it
from a couple of manuals. But times have changed and nowadays I do not have
any books directly relevant to my current programming skill set - Stack
Overflow is my friend.

So what books do I have?

Books on usability and web accessibility are good reads, however no obvious
title springs to mind ('Don't Make Me Think!' would last your friend all of a
morning).

One thing though, chess. Chess is played in prisons and some prisoners get
rather good at it. Maybe encourage your friend to form a chess league if there
isn't one already. Perhaps get him a really good book on chess that can be
used by this chess league to be.

~~~
givinguflac
Good call on chess, thank you!

------
txutxu
I did a LOGO programming course before having a computer, but we did have
computers in the course. That did help.

One thing that did help me a lot when I didn't have computer or fast internet
connection, were: the computing and programming paper magazines.

Maybe you can research for your friend programming magazines (on paper) which
are available nowadays; and he can subscribe to them. Maybe he can even
redistribute or perform as internal reseller once done with the chapters.

They use to treat diverse topics on monthly steps, and is a convenient way to
assimilate knowledge. Ones are better than others and introduce less partial
views... you must view on your own.

I can't help, because I'm many years without buying one.

------
sanjamia
I can suggest a simple approach that worked for me. I learned to code without
a computer by reading interesting coding books and writing my programs on
graph paper. I did not worry about my approach because I did this for fun. I
made each decision about my learning based on whether it was interesting and
that it expanded and exercised my knowledge. Save written programs. Carefully
play the role of the computer and execute your own programs and use graph
paper for pixels. Copy and modify code from books. Know that you're building a
foundation and going to the great lengths that only a great coder would
attempt.

------
fallous
Start with learning symbolic logic. I'd then suggest learning something like
6502 assembler on a simple machine that existed (in order to attain
predictable results and in order to have reference materials based on the
programming results and tricks that real coders of that machine achieved).

I'd then suggest moving to something like SICP and/or NANDtoTetris.

If you learn the abstract fundamentals first, you will understand how they
apply in every increasingly complex system you encounter... and none of that
is syntax or frameworks but instead an ability to see and extract the
underlying problem domain, which will then guide you in the solution.

~~~
fallous
To be clear, I understand the student in question cannot have access to an
actual 6502-based machine but a simple 8-bit computer (without a lot of custom
chips for graphics/sounds/etc) is easily understandable by a reasonably
intelligent person and the CPU itself can be expressed in a simple state
machine. Given the documentation for a real machine, the student can run by
hand the system clock and understand memory latency, the instructions that can
be executed, the interrupts, etc. That's a level of fundamental understanding
that the vast majority of newly-minted "programmers" have not and will never
attain.

------
codingdave
In addition to all the other answers, doing some procedural thought exercises
may help. He can practice breaking down complex actions into more basic
instructions. For example, thinking through what steps he takes to walk to a
meal. He can start at a high level of just the turns and distances to walk,
then think through what he actually does to take a step, or make a turn, or
sit down or stand. It may not seem like much, but it will train him to think
about how to build out instructions at different levels of abstraction, which
will make a significant dent in the learning curve once he does gain access to
a computer.

------
caconym_
I remember that the book "Feynman's Lectures on Computation" has some
excellent descriptions of basic computing models (FSMs, Turing machines, ...)
as well as interesting exercises in constructing "programs" using those
models. It may not be as practical as he/you are looking for, but I think it
might be a great choice because it does an amazing job explaining the basic
theory of computation and the "programs" called for in the exercises can be
easily run by hand, on paper.

It might be a good place to start, at the very least. But it will only appeal
to a certain sort of person.

------
natewalck
Whenever I approach a new language, I read a book on it and go through the
code in my head. I am a very visual person, so I practice visualizing what is
happening as I read it. Once I have a proper mental model, I find I have a
much easier time writing it on a computer. Perhaps one gets faster at
visualizing code, but I've always found that I tend to be slower to learn new
languages, but have a solid grasp once a good mental model is made.

I'll definitely take a look at some of the languages mentioned in this thread
that are made to be done on paper. Sounds like a great exercise.

------
api_or_ipa
Most, if not all of introductory discrete math, logic gates, basic CPU logic,
data structures* and algorithms can be mastered without a computer.

Most (all?) CS students learn this early on in university anyways, so it's
natural to study if your friend is interested in computer science.

He can also spend the time to master math, especially linear algebra. Getting
a firm understanding on math never hurt any budding programmers and opens a
ton of doors.

* Once released, he can play with different DSs and experience their asymptotic performances for himself.

------
schoen
I thought of several books, but they've all been mentioned in the thread
already, so I'd just like to congratulate everyone on the wide range of
interesting suggestions.

OK, I guess I'll also mention Hillis's _The Pattern on the Stone_ , which I
feel has mostly been superseded by Petzold's _Code_. It's less technical and
less detailed than _Code_ and would be a much quicker read, where _Code_ gives
a more detailed understanding of these ideas.

------
franze
Google & Print or buy "The C Programming Language" Let him study every letter.
It simply is the best "start from zero" programming guidebook.

Then buy him a RasPi (+with instal guide).

------
Adam-Kadmon
Have a look on a similar thread on reddit:
[https://www.reddit.com/r/learnprogramming/comments/3rmioh/wh...](https://www.reddit.com/r/learnprogramming/comments/3rmioh/what_books_or_methods_can_i_use_to_study_computer/)

------
hackermailman
The Schemer's Guide was designed for paper and pen
[https://www.amazon.com/Schemers-Guide-Iain-
Ferguson/dp/09628...](https://www.amazon.com/Schemers-Guide-Iain-
Ferguson/dp/0962874523)

D is for Digital is a good survey and has some Javascript programming info,
Amazon has the second version draft already
[http://kernighan.com/](http://kernighan.com/)

------
heisenbit
Adding one aspect to this already comprehensive list of good advice: Read good
code.

There is a lot to be learned from writing code as it forces you to make
decisions. This can be done in part on paper and in batch programming mode.
There is also a lot to be learned from reading not just snippets and
algorithms but from studying complete works. Software is a lot about
architecture and integration. A stack of printed code and a #2 pencil is all
it takes.

------
dragandj
This is an excellent book from the pen and paper era, that is more than modern
(functional programming is popular now): [https://www.amazon.com/Introduction-
Functional-Programming-C...](https://www.amazon.com/Introduction-Functional-
Programming-Calculus-
Mathematics/dp/0486478831/ref=sr_1_1?ie=UTF8&qid=1476002462&sr=8-1&keywords=functional+programming+book)

------
ceterum_censeo
It's hard to say exactly at what point it would be an appropriate read, but
perhaps Knuth's _The Art of Computer Programming_ should be on the reading
list.

------
chvid
There are some good theoretical computer science (sciency) books out there. I
would recommend two of my favourites:

Gary William Flake: Computational Beauty of Nature

Douglas Hofstadter: Godel Escher Bach

They won't make you a programmer ready for a job at Facebook; but they will
entertain the part of your head that makes you a good programmer.

The two books are also very well written and quite entertaining which give you
the motivation you miss if you cannot try things out on your own.

Other than that: Study math at any level.

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

------
usgroup
Instruct him to learn system design and UML.

Maybe work on a conceptual project. E.g build a complete UML solution for a HN
clone for example.

That'll take care of the analysis part.

If he's enough time then move into discrete maths and algorithms.

That'll sandwich the actual coding , after which it'll be a short effort once
he's got access to a computer

------
sleepychu
[https://twitter.com/pigworker/status/784832688616243200](https://twitter.com/pigworker/status/784832688616243200)

We used to frequently emulate a machine by hand on paper I think it was 16-bit
but it might have been even smaller (not touched it since my first year of
undergrad) and you could/can write a lot of cool programs for it.

------
yarou
Try to teach him the lambda calculus. Church-Turing thesis still holds today,
so if he's able to learn the lambda calculus he will understand what functions
are indeed computable, and what functions are _impossible_ to compute,
regardless of hardware, software, etc.

You don't need to have a computer (Von-Neumann et al didn't have one!) to
invent a brilliant algorithm.

------
smegel
Does he have pen and paper? Get him to design user interfaces for programs,
and art to go with them. WAY harder than coding, at least for me.

------
Retr0spectrum
I used to write BASIC programs on paper as a child before I had access to a
computer.

There are plenty of algorithms you can learn without a computer too, and carry
out on paper.

I have no idea what kind of things are allowed in prisons - would a
microcontroller running a simple interpreter coupled with a small LCD and
keypad be allowed? If so, something like that would be really great for
applying programming concepts.

~~~
acqq
The magic is very old: in the earlier generations, from the students of my
university, some never had the opportunity to actually run their programs
directly on the university computer. They just punched the cards, gave them to
the "operator" and received the resulting printouts.

That were the old times: as the "bandwidth" was limited, everybody was
motivated to check as much as possible before executing only once. "Processing
in your head" was very important and people were really careful. It was
nevertheless, or maybe exactly because it was so, "addictive."

Richard Feynman, about one early example:

"“Well, Mr. Frankel, who started this, began to suffer from the computer
disease that anybody who works with computers now knows about. It's a very
serious disease and it interferes completely with the work. The trouble with
computers is you _play_ with them. They are so wonderful. You have these
switches - if it's an even number you do this, if it's an odd number you do
that - and pretty soon you can do more and more elaborate things if you are
clever enough, on one machine.

After a while the whole system broke down. Frankel wasn't paying any
attention; he wasn't supervising anybody. The system was going very, very
slowly - while he was sitting in a room figuring out how to make one tabulator
automatically print arc-tangent X, and then it would start and it would print
columns and then bitsi, bitsi, bitsi, and calculate the arc-tangent
automatically by integrating as it went along and make a whole table in one
operation.

Absolutely useless. We _had_ tables of arc-tangents. But if you've ever worked
with computers, you understand the disease - the _delight_ in being able to
see how much you can do. But he got the disease for the first time, the poor
fellow who invented the thing.”"

------
solotronics
Why are you not allowed a computer when incarcerated?

~~~
hn_felon
* 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)

------
z3t4
Computer science. While most self thought programmers started from the other
end, theres nothing wrong with learning theory first.

------
lifeisstillgood
Hmm, so uk rules seem different- allowing even non-internet enabled games
consoles.

At which point the possibilities expand ...

[http://www.bbc.co.uk/newsbeat/article/31089469/the-
surprisin...](http://www.bbc.co.uk/newsbeat/article/31089469/the-surprising-
things-youre-allowed-in-your-prison-cell)

------
the_watcher
Learning to code will be tough, although there are some great resources in
here that I might pick up myself. Doesn't mean he shouldn't try though, but my
recommendation would be to start with design, as there are a lot more offline
resources for learning the principles of design, which apply across a lot of
different disciplines.

------
glibgil
Honestly, it is probably better for him to become a computer engineer than a
software engineer. This might be a fun place to start
[https://sites.google.com/site/kotukotuzimiti/Paper_Processor](https://sites.google.com/site/kotukotuzimiti/Paper_Processor)

------
sfifs
When I was 11, I learned to code BASIC by reading a programming language
manual that came with IBM PCs by writing out programs in a notebook. It was
many months before I actually touched a real computer (which was a learning
experience in itself, but didn't change what I had picked up too much).

So definitely possible.

------
rezashirazian
That's like learning astronomy without a telescope: not as fun, much more
difficult but very possible.

~~~
toomanybeersies
Counterpoint:

"Computer science is no more about computers than astronomy is about
telescopes."

\- Commonly attributed to Dijkstra.

------
35bge57dtjku
Can you mail him books? There are plenty of interesting, free programming
books online one could print out.

------
protomyth
I would go with the unplugged books that were mentioned by many, or help him
learn introduction to digital electronics. When I went to school in 88 we
didn't use a computer for designing our circuits. Designing a vending machine
controller was the final project.

------
wordpressdev
My first coding language was GW-BASIC and, as the computer time was limited, I
did most of the coding on paper - it was called Dry Run. Used to write up to
200 lines of code on paper, test it on paper and then type in the computer
when I get into the lab.

------
samfisher83
I remember having to write assembly code (6800 series) for some of my tests.
That was no fun. At least we got to use cheat sheets with all the op codes. I
don't think its that unique having to write code without a computer.

------
abledon
As cheesy as this sounds...

the HEAD First book series, they have fill in the blanks programming
exercises.

~~~
givinguflac
Thanks!

------
wepple
Different angle: Possibly a great opportunity to start low with CPU
architecture, memory layout, and basic concepts in OS design. It'll really
help further down the line and doesn't require any computer to execute code
on.

------
K_REY_C
Computer science unplugged is great. Aimed at kids, but if starting out it may
provide a good framework. [http://csunplugged.org/](http://csunplugged.org/)

------
leekh
I had to teach CS in Africa with very few resources e.g. electricity and
working pc's.

The best thing I found [http://csunplugged.org/](http://csunplugged.org/)

------
runjake
Send him the book "Code: The Hidden Language of Computer Hardware and
Software", by Charles Petzold. It's often available used on Amazon for cheap.

------
neilsharma
Ask him for a list of concepts he doesn't understand well and post them here.
Maybe the crowd can find some good blogposts online that you can print out and
give it to him.

------
bikamonki
If you can get us a list of personal items that he's allowed inside, maybe we
can help you figure it out if it's possible to build a tiny computer ;)

------
houml
Study a language and algorithms. Recite those functions and algorithms from
memory, and then compare what he writes and those in books.

------
rhlala
Suggest him to invent his own language!

------
caffinatedmonk
I would recommend to start with the basics: logic, assembly, algorithms and
data structures.

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

------
EdwardMSmith
Any possibility of a higher-end TI or an old HP calculator?

------
houml
Study a program language and recite codes from memory.

------
cheez
Send him the turtle game to play

------
damptowel
He could build a mechanical computer :) you can build adders out of marble
tracks, use hydrolics or legos, etc.

------
icantdrive55
I would go through Hacker news past posts, and comments.

Print out the better ones.

Get him familiar with the lingo.

My biggest stumbling block was learning the ever changing language of all
aspects of computing.

Then buy him Learn to Program by Chris Pine. I would also want him very
comfortable with UNIX, and the command line.

When he gets out,if he has some support; he will do just fine.

