Learning to code, with no Internet access.

11 points by exicer ↗ HN
I have a friend who recently asked me for some advice about resources for learning to code. The catch is, he will have no access to the internet, as he will be in the mountains of Nepal for 6 months.

The topics of interest are Python, Linux, and html/css/js, with the eventual goal of being able to create websites. He has some background programming in Java, so basic concepts shouldn't be a problem, but no real background in Linux.

Usually my advice would have been to work through some tutorials, and then just try building something, learning as you go. However, this approach relies heavily on access to the internet.

Are there any textbooks that are particularly self contained? Is there anything I can suggest beyond just taking a copy of the relevant docs? I would also welcome any ideas for appropriate projects.

12 comments

[ 2.9 ms ] story [ 39.8 ms ] thread
I don't have advice but all I want to say is that your friend's project ROCKS!!! I'm going to be taking notes on the advice you're going to get. Thanks for the post.
First: What an amazing opportunity! If he is working in near-isolation and he is very focused, he can come out of that experience with some serious skills.

The answer you seek is iTunesU, IMO.

https://itunes.apple.com/us/itunes-u/hands-on-python-tutoria...

I learned to build iOS apps from Standford's Paul Hegarty in iTunesU. Now, I'm going back through the material because he talks about some master-level things that I probably couldn't parse on the first go-round.

learn python the hard way[1] is available as PDF with instruction videos if you buy it. He could download all the resources before going away.

Don't know about Linux, but there are a lot of beginner html/js/css books available.

[1] http://www.learnpythonthehardway.org/

If he manages to grab a printed copy of Stack Overflow, that'd be great :D (for non programmers: this is an internal joke)
(comment deleted)
Will he have access to power and a laptop? Or will be compiling in his head?
Power and a laptop only. Any material on the laptop has to be loaded prior to leaving.
I kind of did something vaguely similar, except less cool. I wanted to learn a little python except there was problems with getting internet access at my house. I was only without internet for like 3 weeks but that didn't cause too many problems with learning (and could always go to a friends house if I really needed internet). The best thing that helped me when learning was the python docs.

I highly suggest downloading documentation. Just going through little sections of the documentation was a great way to learn. Not having internet was also sometimes a good thing as there was very little distraction.

(comment deleted)
Not really got the best advice on learning sources but this should make the situation more manageable without internet access.

I have a set of resources for when our internet goes down (rarely but weeks at a time):

- Set of Ubuntu linux ISO images, server and desktop

- Apt-mirror dump, I think this is about 30GB.

- SQL Dump of wikipedia and mediawiki source. Wikipedia has a lot more info on linux/programming/CS topics than I expected.

- Local package manager repository clones, NPM etc.

- Installer disks for your OS.

- Disk with any needed installers for your setup; virtualbox, vagrant, sublimetext etc.

Most of this just sits on an external drive using vagrant and nfs shares.

This would obviously require some linux knowledge but is well worth it, it is pretty easy to get together and manage with vagrant.

This should cover any resources you need to get hold of while learning, there's nothing more annoying than being stuck without a single package.

Bring a few thumb drives for backup.

In addition to LPTHW and dbond's very complete suggestions:

$ sudo apt-get install python-doc

This is not installed by default. It will install the entire python.org documentation site, probably at /usr/share/doc/python/html/index.html

Decide whether you want to use python2 or python3. Python 2.7 is probably what's installed by default on your linux distro (unless you use Arch). The following is not in the installed docs, it's an external site:

http://wiki.python.org/moin/Python2orPython3

Read PEP 8

http://www.python.org/dev/peps/pep-0008/

$ aptitude search python |grep framework

Pick a lightweight framework or two to install before you leave (unless you've packaged up the repository as dbond suggests). bottle, flask and pyramid come to mind. When in doubt, install it. Don't start off using a framework though, learn the basics of plain html, then css, then javascript, then a lightweight framework (or the framework first then javascript).

$ sudo apt-get install sqlite3

Install a database. sqlite is lightweight and more than good enough for learning, and won't bog you down with learning how to run a database server. Alligators and swamps ...

I wouldn't bother installing a web server, python comes with a rudimentary web server module.

General background on python web programming: (skim it)

file:///usr/share/doc/python/html/howto/webservers.html

The module you'll likely use to play around:

file:///usr/share/doc/python/html/library/simplehttpserver.html

Learn the python debugger, it's rudimentary but very helpful when you're learning.

file:///usr/share/doc/python2.7/html/library/pdb.html

Learn the python REPL, or the interpreter as they call it in the docs.

file:///usr/share/doc/python2.7/html/tutorial/interpreter.html

Install, learn and use a better python REPL:

sudo apt-get install ipython

If you can afford it, Oreilly has some good ebooks.

http://oreilly.com/python/

http://search.oreilly.com/?q=html

http://search.oreilly.com/?q=css

http://search.oreilly.com/?q=javascript

http://shop.oreilly.com/product/9780596805531.do

http://shop.oreilly.com/product/9780596517748.do

If you can't afford it, but you can afford the weight, search for books you like on AbeBooks: (used or internation edition books)

http://www.abebooks.com/

Dive Into Python is available online and downloadable: http://www.diveintopython.net/

Eventually you'll want to know more about sql: http://news.ycombinator.com/item?id=5087439

Learn you a shell:

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

http://www.tldp.org/LDP/abs/html/

Install vim and emacs and decide which one you like, but any simple arrow-key-based editor that comes with your desktop is good enough to get started.

Install git, eventually you'll lose some work and you'll see the light. Just go real basic with git if you haven't done much source control before. Don't get bogged down in learning git, you want to learn python and web programming. As you go, you'll eventually want to know more; you'll know when that is.

$ sudo apt-get install git

http://git-scm.com/