Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Learning to code, without a computer?
205 points by givinguflac on Oct 8, 2016 | hide | past | favorite | 185 comments
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?

Even if he'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.

I realize this is an unusual question, but I greatly appreciate any responses. It's sad that someone so badly wants to improve themselves and can'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!




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?


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


Similar to SICP, I'd recommend "How to Design Programs" (2nd ed.) [1]. It describes an "algebra of data" using Racket [2] (a modern lisp) as the vehicle.

[1] http://www.ccs.neu.edu/home/matthias/HtDP2e/index.html [2] https://docs.racket-lang.org/racket-cheat/index.html


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.


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


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.


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.


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.


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.


Given that the person is in prison, it seems rather improbable that s/he was on a course to be a first-year undergraduate or is particularly familiar with algebra. The average person doesn't know algebra all that well, you know.

Frankly, I do not understand the people who are attempting to push CS textbooks on this person. The original question does not contain the words "computer science" anywhere within it.


SICP is entirely focused on the practical aspects of programming. There's nothing in there about the halting problem, or the Church-Turing thesis. The discussion of run-time and space requirements divides everything into constant time/space and everything else. That's useful for figuring out when your recursive procedure evolves a process that needs only constant stack space. There's no study of algorithms or data structures (well, there's simple lists and tagged data, but no b-trees, red-black trees, etc).


SICP might be a good programming book, but I'm not sure it's a good book. If your friend doesn't have programming experience something like "Code: The Hidden Language of Computer Hardware and Software" might be an easier way to start. Here is the first paragraph from each for comparison:

SICP: "We are about to study the idea of a computational process. Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called data. The evolution of a process is directed by a pattern of rules called a program. People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells."

Code: "You're 10 years old. Your best friend lives across the street. In fact, the windows of your bedrooms face each other. Every night, after your parents have declared bedtime at the usual indecently early hour, you still need to exchange thoughts, observations, secrets, gossip, jokes, and dreams. No one can blame you. After all, the impulse to communicate is one of the most human of traits."


I don't think the prison superintendent will enjoy that last paragraph.


I have worked through SICP, and strongly recommend not using a computer for any of the exercises, at least until the large scale projects in the later chapters. This would be the perfect recommendation for someone who only has pencil and paper. However it is a bit intimidating if not impossible for a true newcomer without access to external resources and help. But with enough time and effort...


The Little Schemer, found the style delightful.


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.


A graphical calculator is an excellent idea if it is allowed by the rules!

I also did programming with my TI calculators back in school.


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.


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.


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


True, though you could also create lists freely. I remember writing an artillery game (using the equations learned in our physics class!) and storing the player information in a list each.


Hint: if you use more than 28 variables, you can still put some in matrices. (Naming is still awful, though).


The 85 was okay, but the 89 was much harder to program without the aid of the computer-based IDE.


The first programs I wrote were written in TI-82 basic language. It's possible to create simple interactive text prompt UI and even Gameboy-like GUI programs. Since the TI-82 memory didn't survive battery replacement, I'd "save" programs by transcribing them on to paper. Since memory was limited, it became a fun challenge to find concise ways to write programs.


> In the end I even created a clone of snake. It worked, but moving one block ahead would take 2 seconds.

Nice! I ended up creating a Minesweeper clone. I remember the program being really long, and really annoying to write without having access to actual recursion.


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.


Thanks for sharing.


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!


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 books, AFAIK. I am not sure what to do about that...


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


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.


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.


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


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.


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.


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


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.


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


I'm not even a great programmer, but I found learning formal logic, abstract algebra and category theory to be incredibly useful. That, algorithms and data structures. That's what I would study if I were in prison. Not, trying to learn Python or something, which could be a dead language by the time you get out.


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.


I came across CS unplugged a while ago. Looks like it might be useful http://csunplugged.org/


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/ Covers some of the same material at a much higher level, and more.


I'm reminded of one of Neil Fraser's blog entries "CS by Mail" https://neil.fraser.name/news/2015/04/13/, in which he received mail from someone inquiring how he could learn programming in prison and Neil recommended CS Unplugged. I wonder if that worked out.


This is the most comprehensive way to get it done. It's even useful to adults and really serves to understand the fundamentals of computer science


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.


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.


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

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/

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.


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


That's great! Chris, Beverly, & the rest of the team, have done an incredible job with The Last Mile. It's an awesome program and great to see the continued success.


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


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


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.


I couldn't agree more, he's told me stories of people there for decades to whom he has attempted to explain what computers or the Internet are like. But, it's basically like telling a fairy tale as everything, down to the concept of a mouse or GUI is imaginary to someone who hasn't seen real world technology in a long time. It's really sad.


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


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.


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.


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.


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


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)


Currently he's wanting to learn everything he can and specialize later, but we have discussed him building a web based platform for an idea he has. But generally he sees everything moving toward software and he wants to be prepared, which isn't wrong. Thanks!


Professor Tim Bell (University of Canterbury) is real big into this. He made CS Unplugged (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.


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.


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/


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

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) on what stacks/tools companies use (and how) are eye opening to say the least. Print outs of this.


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?


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!


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/

or

https://www.adams.edu/extended_studies/undergrad/prisoncolle...


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.


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


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.


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.


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.


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.


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

https://www.amazon.com/How-Design-Programs-Introduction-Prog...


This is exactly what I was thinking, thanks for the book title! This community is the best.


Also the little schemer series, which just expect you to work things out by hand.


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.


Try Bell Labs Cardiac the cardboard computer

https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_...


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.


> Send him PDF copies.

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


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


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.


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


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


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.


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.


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.


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.


I remember reading this here a while back - wonder what happened: 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.


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.


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.


Good call on chess, thank you!


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.


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.


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.


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.


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.


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.


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.


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.


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.


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


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.


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

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


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.


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.


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.


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


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.


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.


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.


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


As a teenager, my dad confiscated my laptop in the run-up to exams. Unperturbed, I wrote pages & pages of BASIC by hand, though I unfortunately never got around to typing them up...


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)


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


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


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.


Have a look on a similar thread on reddit: https://www.reddit.com/r/learnprogramming/comments/3rmioh/wh...


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


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.


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


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


Counterpoint:

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

- Commonly attributed to Dijkstra.


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.


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.


As cheesy as this sounds...

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


Thanks!


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.


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.


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


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/


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.


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.


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


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


Suggest him to invent his own language!


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


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


Study a program language and recite codes from memory.


Send him the turtle game to play


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


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.


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


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.


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.


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


Thanks.


What is happening in Italy? I thought you could speak freely there.


Thanks for comment, I'll write something soon :)


Unfortunately not everywhere.


Thanks.


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

I'd also learn SICP: https://www.amazon.com/Structure-Interpretation-Computer-Pro...

and algorithms from either CLRS https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press... or Skiena Algorithm Design https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...


Along with SICP, The Little Schemer would be a great book to work through on paper. https://mitpress.mit.edu/books/little-schemer

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


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.


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.


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


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.




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

Search: