Learn How to Code from Scratch – A Practical Strategy
Becoming a developer is a rewarding yet challenging task. One of the greatest blocks for people to understand programming is simply having a plan and deciding where to start. In this guide, I’m going to walk through strategies to help you learn how to code from scratch.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a free Dev Camp account

I’ve been a developer for a number of years. I taught myself how to code and I’ve witnessed a wide variety of educational techniques for learning programming over the past decade. Some of the strategies I’ve seen are good, others are a waste of time. This list contains the strategies that have stood the test of time and will help you launch your coding journey.

Learn How to Code from Scratch

Small Bites

medium

First and foremost on the list of tips to learn how to code from scratch is the principle of small bites. I have a friend who trains professional and Olympic athletes for Adidas, named Mark Verstegen. Back when I used to train at his institute he would always say something that really stuck with me. When any athlete presented a tough goal, such as qualifying for the Olympics or making it to the big leagues he’d ask them:

“How would you eat an elephant?”

After the athlete would look at him with a confused look he’d follow by saying:

“It’s not a trick question, the only way to eat an elephant is one bite at a time.”

This is great advice for many aspects of life. However, I’ve discovered that it’s an especially important concept for developers to understand. When I think back to when I learning development, my greatest came when I tried to do too much.

For example, when I was trying to build a new feature I would attempt to code the entire feature at one time. Most of the time this would end up with the program not working and then I’d had to go through every line of code until I figured out what was wrong. However, the more experienced I’ve become as a developer the more I realize the importance of breaking concepts down into small, easy to manage chunks. Let’s imagine that you are building a connection to the Twitter API. Instead of trying to build the entire feature, focus first on connecting to the API. Then print the values returned from Twitter. Finally you can format the data so that it looks nice.

By breaking what you’re learning into small components, you’ll discover that you will have a better understanding of the processes going on. You will also be able to remember how to implement the features later on in real-world projects because the concepts will be more tangible.

Tutorials

Over the past few years, the online educational space has grown exponentially. Whether you are looking to learn Java or Ruby you’ll be able to find countless tutorials that will help you understand programming. These types of tools most likely won’t turn you into a professional developer by themselves. Since achieving a professional level of skill takes years and typically requires you to work on a wide range of real-world projects.

However, tutorials can be a great introduction to programming. In addition to giving step by step guides for how to build applications, screencasts are also great for showing you what types of apps a specific language or framework can build. When I’m learning a new language I’ll watch a full series of tutorials without even trying to type in the code. I do this so that I can familiarize myself with the capabilities of the language.

One of the weaknesses with tutorials is that it’s hard for them to replicate your own environment. For example, if you’re working on a Java programming language tutorial from a few years ago, there’s a good chance that the instructor will have a different language version than you do. This will cause some confusing bugs and without any assistance, many individuals have quit their programming dreams out of frustration.

But don’t let that scare you away from using tutorials. I credit a number of tutorials with helping me teach myself development. And I highly recommend them as a great place to start. Especially when you want to learn how to code from scratch.

Reading

small

Next on the list is reading. Libraries could be filled to the brim with the number of programming books that are on the market. I have even written a few! I like going through coding books because they allow me to go at my own pace. When I go through tutorials it usually means that I need to dedicate a specific amount of time to go through the videos each day. However, with a book I can read a few paragraphs or I can go through a few chapters.

When you have a full-time job and you’re learning programming on the side books are a great resource. This is because they allow you learn at your own pace. Books can also be a good resource later on when you need to reference a specific topic.

Also, when you go through a programming book I highly recommend you write and run the code from the book. This will help you remember the programming language syntax much better than simply reading it. Remember that reading retention is incredibly low in most individuals. However if you combine reading with actually writing the code as you’re going through the content you’ll see much better results.

large

Another trick to use when reading programming books is to not look at the book when you’re writing the code. For example, if you are reading my Ruby programming book you’ll see a code snippet like this when you’re learning how to use object-oriented programming. If you force yourself to type the code without looking at the book the entire time, you’ll discover that your retention will increase dramatically.

Real World Projects

large

Last on the list to learn how to code from scratch is building real-world projects. After you’ve gone through a number of tutorials and read a few books you’ll be ready to try your hand at building applications. A natural question to ask is: “What types of projects should I build?”

There’s really no right or wrong answer to this question. If you have an idea for a business then could start with trying to build it with your newfound coding knowledge. You could also look at re-building current applications. Such as creating a Pinterest clone.

I’ve found this technique of creating cloned sites very beneficial since it allowed me to focus on building functionality instead of having to waste time on coming up with ideas. For example, when I learned the Swift programming language I built an Instagram clone. Years ago when I was learning HTML and CSS I re-created the Google homepage from scratch.

The most important factor to remember about building real-world projects is to stretch yourself. No developer ever improved by duplicating functionality they are already comfortable building. Instead, make sure you are challenging yourself to implement features that you’ve never created before.

Determination

Coding is Hard

On a final note, don’t let anyone tell you different: coding is hard! From setting up a development environment to building functional applications, programming will greet you with challenges at every stage.

But You Can Learn Programming

However, with that being said, you can become a developer. There’s not a magical programmer gene that coders are born with. It simply comes down to:

  • How determined you are
  • If you’re willing to work consistently
  • How good your strategy is when it comes to learning