The Hard Way Is Easier
With the help of this book, you will do the incredibly simple things that all programmers do to learn a programming language:
- Go through each exercise.
- Type in each sample exactly.
- Make it run.
That’s it. This will be very difficult at first, but stick with it. If you go through this book, and do each exercise for one or two hours a night, you will have a good foundation for moving onto another book. You might not really learn “programming” from this book, but you will learn the foundation skills you need to start learning the language.
This book’s job is to teach you the three most essential skills that a beginning programmer needs to know: reading and writing, attention to detail, and spotting differences.
Reading and Writing
It seems stupidly obvious, but, if you have a problem typing, you will have a problem learning to code. Especially if you have a problem typing the fairly odd characters in source code. Without this simple skill you will be unable to learn even the most basic things about how software works.
Typing the code samples and getting them to run will help you learn the names of the symbols, get familiar with typing them, and get you reading the language.
Attention to Detail
The one skill that separates bad programmers from good programmers is attention to detail. In fact, it’s what separates the good from the bad in any profession. Without paying attention to the tiniest details of your work, you will miss key elements of what you create. In programming, this is how you end up with bugs and difficult-to-use systems.
By going through this book, and copying each example exactly, you will be training your brain to focus on the details of what you are doing, as you are doing it.
A very important skill--that most programmers develop over time--is the ability to visually notice differences between things. An experienced programmer can take two pieces of code that are slightly different and immediately start pointing out the differences. Programmers have invented tools to make this even easier, but we won’t be using any of these. You first have to train your brain the hard way, then you can use the tools.
While you do these exercises, typing each one in, you will be making mistakes. It’s inevitable; even seasoned programmers would make a few. Your job is to compare what you have written to what’s required, and fix all the differences. By doing so, you will train yourself to notice mistakes, bugs, and other problems.
Do Not Copy-Paste
You must type each of these exercises in, manually. If you copy and paste, you might as well just 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
Included in the 3rd edition of Learn Ruby The Hard Way is more than 5 hours of instructional videos. There is one video for each exercise where I either demonstrate the exercise, or give you tips for completing the exercise. The best way to use the videos is to attempt or complete the exercises without them first, then use the videos to review what you learned or if you are stuck. This will slowly wean you off of using videos to learn programming and build your skills at understanding code directly. Stick with it, and slowly you won’t need the videos, or any videos to learn programming. You’ll be able to just read for the information you need.
A Word Of Advice For “Visual Learners”
Your belief that you are only a visual learner is potentially holding you back in your educational goals. The concept of a learning modality is outdated and has no scientific basis, and the idea that a person could only possibly learn from one of their sense is preposterous. It is possible to learn to use all of your senses when tackling a complex subject such as programming. If you’ve locked yourself in the visual or kinetic learner prison your whole life, then this book is a great way to break out of it and build up your analytic skills.
By attempting each exercise from the book first you will build your skills at analytic thinking, skills which most likely you already have but simply forgot how to use effectively. However, when you get stuck then go grab the video for that exercise and use your ability to process visual information to help. In fact, finding ways to apply all of your sense to a given difficult problem will give you new insights into that problem no matter how strange it may seem at first.
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 at least 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 you 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.
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 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 will snap and you will suddenly “get it.” If you keep doing the exercises and keep trying to understand them, you will get it. You might not be a master coder, but you will at least understand how programming works.
If you give up, you won’t ever reach this point. You will hit the first confusing thing (which is everything at first) and then stop. If you keep trying, keep typing it in, trying to understand it and reading about it, you will eventually get it.
But, if you go through this whole book, and you still do not understand how to code, at least you gave it a shot. You can say you tried your best and a little more and it didn’t work out, but at least you tried. You can be proud of that.
A Warning for the Smarties
Sometimes people who already know a programming language will read this book and feel I’m insulting them. There is nothing in this book that is intended to be interpreted as condescending, insulting, or belittling. I simply know more about programming than my intended readers. If you think you are smarter than me, then you will feel talked down to and there’s nothing I can do about that because you are not my intended reader.
If you are reading this book and flipping out at every third sentence because you feel I’m insulting your intelligence, then I have three points of advice for you:
- Stop reading my book. I didn’t write it for you. I wrote it for people who don’t already know everything.
- Empty before you fill. You will have a hard time learning from someone with more knowledge if you already know everything.
- Go learn Lisp. I hear people who know everything really like Lisp.
For everyone else who’s here to learn, just read everything as if I’m smiling and I have a mischievous little twinkle in my eye.