your code tell you everything it can about what’s going on and how to turn this into possible solutions.
I also show you how to see your code in different ways, so you can get more information and insight.
Do Not Copy-Paste
You must type each of these exercises in, manually. If you copy-paste, you might as well not even do
them. The point of these exercises is to train your hands, your brain, and your mind in how to read,
write, and see code. If you copy-paste, you are cheating yourself out of the effectiveness of the
lessons.
Using the Included Videos
Learn Python 3 the Hard Way has an extensive set of videos demonstrating how the code works and,
most importantly, how to break it. The videos are the perfect place to demonstrate many common
errors by breaking the Python code on purpose and showing you how to fix it. I also walk through the
code using debugging and interrogation tricks and techniques. The videos are where I show you how
to “stop staring and ask” the code what’s wrong. You can watch these videos online at
informit.com/title/9780134692883.
A Note on Practice and Persistence
While you are studying programming, I’m studying how to play guitar. I practice it every day for at
least two hours a day. I play scales, chords, and arpeggios for an hour and then learn music theory, ear
training, songs, and anything else I can. Some days I study guitar and music for eight hours because I
feel like it and it’s fun. To me repetitive practice is natural and just how to learn something. I know
that to get good at anything I have to practice every day, even if I suck that day (which is often) or it’s
difficult. Keep trying, and eventually it’ll be easier and fun.
Between the time that I wrote Learn Python the Hard Way and Learn Ruby the Hard Way I
discovered drawing and painting. I fell in love with making visual art at the age of 39 and have been
spending every day studying it in much the same way that I studied guitar, music, and programming. I
collected books of instructional material, did what the books said, painted every day, and focused on
enjoying the process of learning. I am by no means an “artist,” or even that good, but I can now say
that I can draw and paint. The same method I’m teaching you in this book applied to my adventures in
art. If you break the problem down into small exercises and lessons, and do them every day, you can
learn to do almost anything. If you focus on slowly improving and enjoying the learning process, then
you will benefit no matter how good you are at it.
As you study this book, and continue with programming, remember that anything worth doing is
difficult at first. Maybe you are the kind of person who is afraid of failure, so you give up at the first
sign of difficulty. Maybe you never learned self-discipline, so you can’t do anything that’s “boring.”
Maybe you were told that you are “gifted,” so you never attempt anything that might make you seem
stupid or not a prodigy. Maybe you are competitive and unfairly compare yourself to someone like me
who’s been programming for more than 20 years.
Whatever your reason for wanting to quit, keep at it. Force yourself. If you run into a Study Drill you
can’t do, or a lesson you just do not understand, then skip it and come back to it later. Just keep going
because with programming there’s this very odd thing that happens. At first, you will not understand
anything. It’ll be weird, just like with learning any human language. You will struggle with words and
not know what symbols are what, and it’ll all be very confusing. Then, one day, BANG—your brain