Warning

This book is new. If you'd like to go through it, then join the Learn Code Forum to get help while you attempt it. I'm also looking for feedback on the difficulty of the projects. If you don't like public forums, then email help@learncodethehardway.org to talk privately.

Exercise 0: The Setup

You are going to need to set up and configure some tools to do this book. Chances are that you may already have many of these, but let's just make sure.

A Programmer's Editor

You need a programmer's text editor, not an IDE. Vim, Emacs, and Atom are all programmer's text editors. They're not simplistic text editors that can only do text, but instead are designed for you to manage whole projects and work with lots of programming files at once. They also have common features found in IDEs like running build commands, scripting, and others, but there's one key difference. An IDE is typically tied to one single language because it does advanced introspection on the source and provides you with shortcuts to write the code. You then don't have to remember anything and can just ctrl-space your way through most any project. This is awesome when you have 100 other 10x developers who are writing more technical debt than you can handle, but it's a terrible feature when you're trying to learn. The other problem is you have to wait around for someone to write you an IDE for any new languages, so if Microsoft or JetBrains don't like a language then you are stuck.

Everything you can do with an IDE you can also do with a real programmer's text editor, and since editors like Vim, Emacs, and Atom are scriptable and modifiable they are future proof. If Haskell++ becomes the next hotness, you can work with it now and all your past projects at the same time. If you become dependant on an IDE, then you've got to wait for someone else to figure out the language for you.

If you are just starting out and want to get a decent programmer's editor that is free, then you should get Atom or VisualStudio Code. These editors run on every platform I use in the book, are scriptable, have many plugins, and are easy to use. You can also Vim or Emacs if you want.

Python 3.6

This book requires Python 3.6. In theory you could use Python 2.7 since many of the exercises are challenges with no code. However, the videos will feature Python 3.6 in the solutions, and the official code repository for solutions will be in Python 3.6 as well. That means you'll have problems translating the solutions back to Python 2.7. If you do not know Python 3.6, then you can read Learn Python 3 The Hard Way to get the basics.

A Working Terminal

If you've gone through Learn Python The Hard Way then you know that I have you use the terminal. By now you shouldn't need to be told how to get it started, but just in case the set up video shows you several options. This video is useful on Windows since the landscape of terminal support and shell scripting is changing dramatically at Microsoft, and they're now supporting a much larger and broader range of Unix tooling.

A Working Pip+Virtualenv Configuration

During this book you will be installing a lot of additional libraries and software. In the Python world this is most easily done with pip and virtualenv. The pip tool installs packages off the internet and puts them on your computer so you can import them in your Python scripts. The problem with pip is you are forced to install it in official directories on your computer that require root or Administrator access. The solution to this is the tool virtualenv, which creates a kind of "python package sandbox" in a directory and then allows you to run pip to install packages there rather than into the whole main computer. In the setup video I'll show you how to install and make sure you have pip+virtualenv for all the platforms and use it.

Lab Journal

You are going to be taking notes and recording metrics while you research projects. You'll want to get a book of graph paper or possibly paper with dots rather than lines for graphs and a good bag of pencils. You can use whatever you like, but part of the process used in this book is to keep track of things outside the computer as a way of changing your viewpoint while you solve problems. It's also more likely that you've been using paper longer than a computer (although, that may change in future generations), so you may feel that paper is more "real" and the computer just doesn't make sense. Writing things on paper first and then translating them into the computer will help you get past this perceptual difficulty. Finally, drawing on paper is just easier.

A Github.com Account

You will want to go to Github.com and sign up for an account if you don't already have one. I will be giving you free code for all of the video presentations and all of the projects so you can check your work. If you get stuck you can check out the project for this book and take a peak at how I solved it. There will also be times when I tell you to go fix a project that I have purposefully left buggy as an exercise

git

If you have a github.com account then you'll also need the command line tool git. github.com will have plenty of information on how and where to get it, but watch the setup video to see how best to install it for your platform.

Optional: Screen Recording Software

This isn't required, but if you can get software to record your screen, and ideally your face at the same time, then this will help you analyze how you work. I say this is optional because it could be a little too much to have full recordings of your work that you then go over and pick apart for clues about how to improve your process. I did it for a while, and it helped me so much, but it also kind of killed my creativity. My recommendation is that if you can afford or find screen recording software, then you should use it when you feel that you simply can't figure out what you are doing wrong and need to watch yourself work. I also think recording your actual face and body while you work is helpful to check whether you have good posture or other physical habits which may be causing you physical pain, but again, recording yourself all day while you work is a bit too much. It's also something you can't really do at a job with other people.

Further Study

That is all of the things you need right now. As the book continues I'll be instructing you on other things you need at specific times. To finish this exercise you should now watch the video for your platform and then install all the things I tell you to. If you have something already installed, then the video has things to do that confirm your gear is in working order. Watch it to make sure you can follow along with the rest of the book.

Pre-order Learn More Python The Hard Way

When you pre-order Learn More Python The Hard Way, you'll receive the Python 3 Edition as it's being created. All files are DRM free and you can download them to your computer for offline viewing. Digital Download Only! You do not get a physical book.

$29.99

Pre-Order From Zed

Or, you can read Learn More Python the Hard Way for free right here, video lectures not included.

Other Buying Options

Other buying options coming soon.

No content available for this exercise. You can view all available downloads at your customer account page.