How to Learn To Program

For many of us, programming is not only a great career, it’s also a set of fun puzzles to solve and a fun creative outlet. But how do you get started? Is there a way to do it without spending a fortune on a bootcamp, or – if you do decide on that option – what should you do before going that route?

Here are some things you might consider doing first.

For many of us, programming is not only a great career, it’s also a set of fun puzzles to solve and a fun creative outlet. But how do you get started? Is there a way to do it without spending a fortune on a bootcamp, or – if you do decide on that option – what should you do before going that route?

Here are some things you might consider doing first.

Think About Your “Why”

Before you get further into programming, let me talk about two of the main reasons why people sometimes are attracted to the idea:

  • On some level, they think it’s fun. I don’t mean every day as a programmer is a day in Disneyland, of course, but programming is a manual task that’s mentally challenging and creative, so it’s fun in the same sense as activities like painting, playing a musical instrument, or woodworking.

  • They think it pays well. Compared to most jobs, this is true, at least broadly speaking.

In my opinion, if the second reason is one of the reasons you’re getting into programming, there’s absolutely nothing wrong with that, as long as it’s combined to some degree with the first reason. But if the profit motive is your only reason for doing this, one question you might ask yourself is whether there’s anything that’s both more profitable and that you think would be more fun. I’m sure, for example, that stock traders on Wall Street have a mad set of cognitive skills that I don’t have, and that they make a lot more money than I do.

Try to take a balanced approach here. I don’t believe your career has to be some grand passion you’ve identified that you’re sure is your calling (complete with heaven’s gates opening and the sound of trumpets). But on the other hand, showing up to work miserable every day is no fun either.

Bottom line: If making money is one of your reasons for learning to code, no problem, have at it! If it is your only reason, I would recommend you stop reading now.

Start Small and Try Before You Buy

Bootcamps are a booming and profitable business these days, and you may want to consider one at some point. Before you drop big bucks on a bootcamp, however, there are some things to consider.

Going back to the why question, if you’re unsure if programming is right for you, keep in mind that the average bootcamp costs about $14,000, and some run much higher than that. So before you spend that kind of money and quit your day job, why not spend a few months up front with a much smaller investment to master some basic skills in your spare time? For example, in the Python space, you can learn the basics from Python Crash Course. My wife used that and John Zelle’s Python Programming book and learned a heck of a lot of Python that way.

Those aren’t affiliate links, by the way. I’m not selling those books: those are just two good resources you could start with. There are lots of other courses and free materials online too. I like having a couple of good, meaty texts to start with, though, since those tend to come with lots of exercises to get you started and hone your basic skills.

Once you’ve selected some books or other resources to work with, you’re ready for the next section.

Your Mother Probably Already Told You This

Cognitive scientists like to quote a guy named Donald Hebb, who had a cute little saying about how neural pathways are formed in the brain through repetition. Donald Hebb said, “Neurons that fire together, wire together.”

Catchy, right? But before you go off and study neuroscience, you should know that your mom probably taught you a simpler version of the same thing:

“Practice makes perfect.”

With this in mind, and using that less-than-fifty dollar investment in books, here’s how to translate your mom’s advice into programming skill:

  • Read about how to code.

  • Copy working code examples by hand and run them. You can copy and paste more later – for now you’re trying to also learn the syntax by copying things manually. Yes, that means typing.

  • Do the chapter exercises

  • Make up your own examples and exercises based on what you read and try to run those. Indulge your curiosity by trying new things and looking things up as you go along, even as you’re trying to get through one or two books systematically.

  • Learn how to write comments and take notes on what you were doing in the comments.

Some exercises will be hard. Some will be easy. You’ll make mistakes and get stuck. If you get stuck on something hard, try breaking it down into something smaller, something simpler. Believe that you can unstick yourself, but if you’re really, really stuck, don’t hesitate to reach out online.

Kick Your Doubt To the Curb

If you’ve read this far, chances are pretty good that you have what it takes to become a programmer. How can I make this bold claim without knowing you? Well, let’s look at the facts.

  • You learned how to speak and read English. If you’re from a country where it’s spoken natively, that may not seem like a big deal to you, but consider: you have this highly evolved, big primate brain. People just like you have figured out cooperative hunting, agriculture, the printing press, calculus, the Internet, gene splicing – all kinds of stuff.

  • You knew how to find this post, which means you have some Internet skills, and you own a computer (or at least a phone). And yes, if you’re reading this on a phone or tablet and don’t have a computer, you’ll be wanting one of those. Programming on a phone? Well, sure, you could try it, just as you could teach yourself golf underwater. But why do it the hard way?

  • You have a capacity for sustained attention and enough interest to have made it this far. If you didn’t have what it takes to succeed, you probably would have already clicked off the page.

Don’t Be Afraid of Simplicity

Although you’ll want to do exercises and projects that are interesting to you, as you learn about coding, you’ll see certain techniques and structures that repeat and are of general use everywhere. For example, all programming languages have a way to repeat a calculation or task (looping), and to make decisions and do certain things based on the state of some other thing (branching structures and boolean expressions). Similarly, larger scale structures like functions, classes, modules, and packages are things you’ll learn about again and again as you learn new programming languages.

Learning one language reasonably well and systematically means you’ll have a foundation for whatever else you want to learn in the future. For this reason, don’t be afraid to practice basic techniques because it’s not “a good project”. Remember, musicians who are accomplished enough to write songs also often spend some time each day practicing scales, too.

Find a Mentor / Make a Friend in the Field

By its nature, programming is a fairly solitary activity, where you spend time at the computer engaging with the code and the tools and figuring things out. But programmers, of course, are different. We’re all members of this cooperative, social species – remember the agriculture and the printing press and so on?

Many senior developers love engaging with newcomers to the field, and some of us will even step up to mentor those who are committed to learning the craft. We can often give you helpful advice and save you both time and money going down a blind alley.

If you need to make a friend in the industry, or you have questions as you’re getting started, I volunteer! Why not reach out to me on LinkedIn or Twitter? I love hearing from newcomers, and I look forward to meeting you.