14 Great Ways to Teach Yourself to Code

Spread the love

If you want to learn how to code, taking your first steps into this huge universe might seem like a daunting, if not intimidating task. Here’s the big secret: There are plenty of free (and inexpensive) resources you can use to give yourself all the help you need, teach yourself new techniques, and make this learning process fun and exciting—as exciting as coding can get, at least.

It wasn’t long ago that coding was seen by many as an odd hobby for geeks tinkering with computers in their basements. But over the past several years, coding has progressed from a hobby to a critical career skill. Even better for those hobbyists? Employers have shown a willingness to pay a premium for the work of employees with coding and programming ability.

Ask yourself: Why do you want to learn how to code?

Take a few minutes (or a day) to think about the reasons—the real reasons—why you want to learn a programming language. Be honest with yourself. Are you trying to learn the barest minimum to score a promotion? Are you looking to make a big career change? Do you want to create the next greatest app? Thrill your roommates by programming your various smart devices to do something awesome?

Your answer can help determine which programming language(s) you should master, as well as what sort of commitment (in time and money) your goal may require. For example, if your dream is to create the next great operating system or a killer alternative to PhotoShop , you would benefit from a formal computer science education that teaches you C++, as well as more complex topics like data structure, algorithms and memory allocation.

On the other hand, if you’re a mid-career professional looking to transition into a tech career, a short-term coding bootcamp might make more sense than going into debt for a second degree. If all you want to do is build websites or push your Raspberry Pi to its limits, a combination of interactive tutorials and free online courses might be enough to get you going.

Choose the right programming language

Once you figure out why you want to code, you can more easily pinpoint which programming language you should tackle. While there is no single “best” programming language to learn, some languages are more user-friendly than others. HTML and CSS are considered the easiest entry points into the coding world, but they are only really useful for developing basic websites.

For more interactive websites involving payment systems or databases, you’ll need to know Javascript, PHP, SQL, and Python to make all the components sing. Mobile app makers use Swift or C to make iOS apps, and Java or Kotlin for Android apps. Video game developers will turn to Unity, or even C#, to bring their game ideas to life.

Still can’t decide on your starter programming language? Most professionals recommend learning Python, C#, or JavaScript, as they offer the widest utility and career flexibility. To help you make up your mind, check out this great infographic that compares a few popular programming languages.

Above all else, just get started learning something. Once you become comfortable with one programming language, you’ll be able to pick up the next one that much faster—like learning a new musical instrument or foreign language.

Try out some online courses

If you want more control over your learning schedule (or don’t want to go at it alone), an online coding course might be a better option than an in-person coding bootcamp. However, there are many different online classes that teach the same programming languages, and it can be hard to figure out which one is truly worth your time and money.

If you don’t mind practicing solo, check out The Odin Project, a free option that pulls together some of the best open-source content for turning a coding newbie into a programmer.

Want more one-on-one coaching and career prep without doing a full-time bootcamp? Try signing up for the subscription-model certification courses from Udacity or Treehouse, where you have the opportunity to ask a tutor for help instead of suffering your coding mistakes or questions alone. You can’t do much better than the $19 coding classes from Udemy (even less, when there’s a sale)—even full-time bootcamp and computer science students sign up for these classes to supplement their learning.

No matter how many courses you complete, many beginners still find it hard to apply their relatively basic knowledge. To that end, many recommend the free Practical JavaScript course from Watch and Code, which revolves around a single project that you continually iterate.

Focus on learning computational thinking

Instead of hyper-focusing on learning a specific programming language, you can also learn to problem solve in a way that a computer will understand. In other words, improve your skills at concepts like pattern recognition, algorithms, and abstractions. There’s also lingo, like loops, which are bound to pop up in any language you use. The better you understand these principles, the easier it will be to learn the next language (and design better products or projects as a result).

Thanks to the internet, you don’t have to enroll in a four-year college program to learn the fundamentals of computer science; a number of college-level classes are available online for free (or a nominal fee).

I can’t recommend Harvard’s CS50x Introduction to Computer Science enough. You can audit the course for free via edX and earn a certificate by completing all the assignments, or you can go at your own pace and watch all the lectures posted on Youtube. You can build your own DIY college-level computer science program with this selection of fifteen online courses (many of which are also listed in our Lifehacker U series).

Get a book

The best way to learn to code may involve you getting up-close-and-personal with some dead trees—a real book that you can follow along from beginning to end. In a perfect world, this will give you a more comprehensive introduction to coding than jumping around from topic to topic on a website.

You can probably find an e-book for any language or framework you’re trying to learn on GitHub, but many web developers swear by Jon Duckett’s colorful series on everything from front- to back-end web development.

As a self-taught programmer, you might also benefit from books that offer broader advice on the profession. You’ll improve your thinking and habits, traits you can apply to any language you decide to learn. Steve McConnell’s 900-page Code Complete: A Practical Handbook of Software Construction (2nd Edition) is considered the definitive guide for best practices, with data-backed advice on everything from project design to debugging code.

A corollary to that behemoth is Clean Code: A Handbook of Agile Software Craftsmanship by “Uncle Bob” Robert Martin. Martin believes code should be efficiently written for easy testing and scalability, making this a must-read for many modern dev teams.

Since programming is really about problem solving, you’ll appreciate the thought process and “back of the envelope” solutions that Jon Bentley shares in Programming Pearls (2nd Edition). Every chapter ends with a number challenges that are often used in technical job interviews, so make this book part of your job prep.

Check out some interactive tutorials or coding games

Let’s face it: reading lines of code on a screen or in a book can look like gibberish. When you see an example in action, that abstract concept suddenly makes perfect sense. That’s the beauty of interactive coding tutorials you can find around the web.

For example, FreeCodeCamp not only breaks down coding concepts into small chunks within your web browser, it also pairs each concept with a relevant exercise that you have to solve before moving onto the next topic. This way, you can’t just skip ahead to the fun stuff; the site really forces you to debug your code as you learn.

Coding games are also a fun way to get your feet wet in programming. If you have an hour to kill, you can give the simple Hour of Code games a try. Additionally, many schools already use the Minecraft: Educational Edition to teach kids programming basics with coding blocks, and even JavaScript. (You can download this version of Minecraft for free if you have an Office 365 Education account.)

Want a more complex game development tutorial that you can put on your resume? CodinGame might be more age-appropriate if you don’t feel like punching blocks all day long.

Teach your favorite devices (and assistants) new tricks

Do you have a smarthome device like the Amazon Echo? You can put your coding skills to the test by creating customized mini-programs to get more functionality out of your devices’ digital assistants. Amazon’s Alexa may already know many basic voice-command “skills,” like reading the latest news headlines, but you can teach her more complicated tasks by coding in Node.js, Java, Python, C#, or Go. (Or, if you want to start with something easier, try the simpler Alexa skill blueprints site.)

It’s possible that your interest in coding is more limited—you might just want to learn enough Python to make your Raspberry Pi do cool projects, for example. If so, you can adopt a DIY approach to learning by checking out the many projects others share on its website.

By recreating existing projects, you’ll learn more about the inner workings of your highly customizable device. You might even find yourself inspired to create new ways to use your mini-computer and delve further into the world of code. (You can even enroll in UC Irvine’s The Raspberry Pi Platform and Python Programming for the Raspberry Pi Platform class through Coursera, if you want a little help getting started.)

Leave a Comment

Your email address will not be published. Required fields are marked *