How to Learn Programming (with a Simple 12-Step System)

Written By John Sonmez

Programming is awesome, you can:

  • build cool new stuff (that could be valuable to others, too)
  • have fun with it
  • and even make a lot of money from it

It’s also a complex topic – so it can be hard to know where to start!

I’ve learned about 15 programming languages in my life to a level where I could build the projects I wanted – and teach the language to others (I’ve created 55 Pluralsight courses that thousands of students have gone through).

Let’s give you my efficient 12-step method that has you coding ASAP:

1. What do you want to learn – and why?

As your first step, ask yourself what your goal is with learning programming:

What do you want to achieve?

  • You might be satisfied with completing a simple project just for fun.
  • Or you have an idea for a powerful product you want to bring into the world.
  • Maybe you even have ambitions to start a career as a Software Developer?

Your why behind learning to code is what'll keep you from quitting before you’ve conquered the challenges ahead of you.

And knowing what you actually want to build will steer you towards which topics you need to learn.

If you set out to learn all there is to learn about computer programming, without concrete goals in mind, it’ll be too much to take on at once.

Examples of programming projects you could start

Here are some simple project ideas to get you started:

  • Create a program that solves a mathematical problem by getting inputs from the user.
  • Create a Choose Your Own Adventure type of program where the input from the user determines what happens next.
  • Create a very simple text-based adventure game where the user can issue commands to pick up objects, move through rooms, etc.
  • Create a program that is able to read input from a text file and write output to a different text file.
  • Create a chatbot that talks to the user and pretends to be human or gives humorous responses.

2. Pick a simple programming language & framework

Which programming language to pick

Which programming language should you learn first?

I often encourage beginners to start by learning a language like Python, which is used for many modern applications — and has a clear, easy-to-understand syntax.

Of course, which language you should choose depends on if you want to:

  • Create a web development project,
  • Start video game development,
  • Build a mobile app,
  • or even your first blockchain software?

Language examples for different projects


Web Application

Mobile App

Blockchain App

C, C++, Java, Python

HTML, CSS, JavaScript

HTML, CSS, JavaScript



Development frameworks examples for different programming goals


Web Application

Mobile App

Blockchain App

Django, Flask, Ruby on Rails

React.js, Vue.js Node.js, .Net

React Native, Angular, Xamarin

Ethereum, Hyperledger

Simple Programmer Tip: Know the Difference Between Language Features and Libraries

A library is a set of commonly-used classes for you to reuse by calling it in your code.

You should take special care to try and figure out what is part of the actual language and what is part of the libraries that are often used with the language.

This might seem like nitpicking, but I think it’s important because it will take that scrambled mess of syntax that you probably have floating in your head at this point and help you categorize and organize it to make more sense.

For most programming languages, the actual language part itself is not that large and is relatively easy to learn, but the standard libraries are large and knowing your way around them is going to be the more difficult endeavor.

3. Get set up to start coding

If you want to become a productive coder, you first of all need to create the right environment for it.

1. Your PC should be powerful enough. Your hardware has to be able to handle compiling and running your code.

  • a strong CPU
  • plenty of RAM
  • fast hard disk with enough space
  • good graphics card if you're going to be developing your own games

2. You should also set up your computer as the perfect environment for coding.

Text editor or IDE

Code editor Emeditor

You have two options when creating your code:

  1. Use a text editor (e.g. EmEditor). You’ll have to input all your code yourself. With some languages (e.g. C#, C++, Java), you have to then compile it from the command line – code from scripting languages such as Python can be executed directly. Using a text editor, if your code has bugs, you’ll have to find them yourself. This incentivizes you to focus on writing clean, working code.
  2.  Use an IDE (integrated development environment). It includes a code editor, a compiler, and a debugger. This means you can do everything in one place. The downside is you don’t learn all the details by doing them manually – which is a great fundamental skill to have and helps you fully understand the processes involved.

Source Code of your chosen language

To be able to work with a language, you’ll first need to install its source code — for example the latest Python source release.

Command Line (“Terminal” / “Console”)

Using the command line of your operating system lets you do many coding-related tasks more efficiently. It also allows you to execute scripts you’ve created, automating those repetitive tasks you’d otherwise have to do again and again by hand.

In some cases, there’s no way to interact with a program or server visually (with a GUI, graphical user interface), so you need to be familiar with the command line to be able to do it.

Codecademy has listed some common commands for programmers.

You could also opt to take a course to master the basics of the command line.

Code Compiler (maybe)

Let’s say you’ve settled on learning a language like C#, C++ or Java, and want to work with a stand-alone code editor over an IDE (integrated development environment, see above).

Then you’ll need to download a separate compiler – to make your code into an executable program.

For example, you’d use javac compiler for Java, and you could use GCC to compile code in C# or C++.


GitHub is a platform for you to store and manage your code and view changes you’ve made to it over time, as well as collaborate with other programmers on your projects.

The GitHub platform

You can add comments to your code, perform code reviews, and experiment with your code in a safe way. Moreover, you can use the platform to show off your coding portfolio to others.

Even if you’re just learning to code, it’s a great idea to sign up for GitHub to benefit from all these features. When you’re part of this global community of both amateurs and professionals, you feel like you belong, and you’re “a real programmer” already.

SQL Server to work with databases

Databases are useful for many applications in programming. SQL is the industry standard – you can grab the installation files here.

4. Look at existing software

Pick an open source application – preferably a popular one that’s likely to be well-designed – and start looking through the source code (you can find plenty of interesting projects on GitHub or Searchcode).

Try to understand each part of the code:

  • How is it structured?
  • How does it work?
  • What does this operator do?

This will be hard, and of course you won’t grasp everything right away. But if you use this method – diving into the real world of code right away – you’ll learn much more than by passively reading through programming information.

You’ll be looking at real problems and solutions. You’ll be asking the right questions as a result, which you’ll then try to answer by doing your own targeted research.

5. Get good resources for what you want to learn

Now you’re ready to acquire the best resources to support your code-learning journey.

Resources to learn programming

Again, make sure the tutorials, courses or books you get are 100% relevant to what you’re trying to do.

Otherwise it’s too easy to get lost in something that won’t serve you until some point in the future (at which you’d probably have to go back and review the same info anyway.)

Can you learn to code without tutorials?

Yes, it's possible — but you'll need to put in a lot more effort if you want to dive into coding without instruction.

Official documentations and free tutorials

Below you'll find free docs and tutorials for the most popular programming languages.

Code-learning platforms

On sites like Codecademy, you can learn a variety of programming languages — from the ground up — with easy to follow, motivating courses.

Consider the options, pick the code-learning site you like most, and be prepared to refer back to this resource over and over.

Examples of good code-learning platforms

Best overall

Most fun


I recommend you invest in some books about programming as well.

You can buy texts that teach you a language step by step:

Python Book for absolute beginners

And also those dealing with Algorithms:

Cormens classic work on algorithms

Or high-level concepts like writing clean code:

Software Architecture:

Important Software Architecture Book

& Design Patterns:

Book on Design Patterns

6. Start by scanning through your new resources

You want to get an idea – a broad overview – of what you’re setting out to learn. Again, you want to tailor your learning journey to the goals you’ve created for yourself.

  • Know the scope of what you’re trying to accomplish
  • Get an overview of the concepts you’ll have to learn
  • Make sure you stick to what’s relevant – instead of getting lost in the details and complexity of the topic of computer programming

Even if it’s hard, take this time to get a high-level view, and you’ll get a lot of clarity for your learning journey.

How to read your new programming books

To read a programming book properly, plan out which relevant chapters you’re going to go through during the week. By only tackling those topics you’ll actually apply in your code, you’ll learn more efficiently and retain what you’ve picked up.

7. Create “Hello World”

You want to get started as soon as possible so that you can develop the confidence and knowledge to apply what you will be learning and put it immediately into practice.

What you're going to start with is a very basic program called “Hello World.” Most programming books begin by having you create a “Hello World” program, which usually just prints “Hello World” to the screen.

Hello World Code Output

The idea here isn’t really to learn all that much about the language, but rather to become familiar with and test out the basic tool chain required to build and run a program in your programming language of choice.

If you have a book you’re reading about your programming language, it should contain an example of a “Hello World” program you can create. If not, just do a Google search for “Hello World + your programming language.” You should have no trouble finding an example.

By creating a “Hello World” program, you’ll also learn the basic structure of a program in your programming language.

8. Learn & Test Basic Constructs

What you want to do now is familiarize yourself with each of the basic constructs of the programming language you’re learning, and then write some code that uses constructs you’re going to need in the software you want to create.

For example:

  • Writing output to the screen
  • Basic math capability
  • Storing information as a variable
  • Organizing of code into functions, methods, or modules
  • Invoking a function or method
  • Performing boolean logic evaluations
  • Branch conditional statements (if / else)
  • Looping statements

If you’re going through a book or tutorial (or preferably multiple books and tutorials), the path should be laid out for you and should even have some examples and challenge assignments for you to do.

Try to make sure you always understand what you’re learning and how it’s applied.

Now is a great time to go back to that original source code you looked at in the first step and see how much more of it you understand.

9. Review Existing Code and Work Through Understanding Each Line

A good way to push forward from here and make sure you don’t have gaps in your knowledge is to start looking at existing code, line by line, making sure you understand exactly what each line and statement in the code is doing. (Even if you don’t always understand the why, being able to know the what is still progress.)

Take the existing source code for a project you looked at in the first step and start randomly going through files in the project. Open a file and go through each line of code in the file, making sure you understand exactly what it is doing.

If you don’t understand—and there will be plenty of things you won’t—take some time to think about it, and look up anything you don’t understand.

10. Start building your project

Now is when it gets exciting: Get started on the project you picked! Work to build it in its simplest form. I advise you to copy (not plagiarize) someone else’s version of something similar, instead of trying to design a new thing from scratch. Make it easy on yourself and save the job of software design for a later stage in your programming journey.

The key to coding with confidence

Progress from recreating simple code examples, to looking at someone’s project and building something similar, to designing and coding your very own programs. This progression is how you gain confidence in your coding skillsDon’t put the cart before the horse – it’s a recipe for confusion, and probably failure.

11. Never stop learning

Once you’ve become proficient in one or more programming languages: I encourage you to stay up to date with new technology, and keep learning new coding skills.

You’ll then be able to solve more diverse problems. You’ll become a more valuable developer. And you can create new, exciting software that people will love.

Some trends to keep an eye on:

  • Mobile apps
  • Blockchain coding
  • Cybersecurity

12. Start teaching

The best way to solidify your learning is teaching your newly-gained skills to others. Not only will helping others learn programming make you a more wise coder yourself – you’ll also become a much better communicator in the process.

The mentor-mentee relationship can be a win-win situation.

Bonus tips to learn programming

Here’s some extra advice to avoid common pitfalls and make your code-learning journey a smoother ride:

How to learn programming faster

If you have a process in place and follow some sensible tips to learn programming faster, you can accelerate your learning curve.

For example:

  • It’s a good idea to spend longer than you think you need on the basics. Drill in the fundamentals, and everything you build on top will be more sound.
  • Take on a “practice mindset” – consistently work hard to become better at your craft
  • Don’t forget to include breaks for refreshing your brain, avoiding burnout

What do do when you feel overwhelmed while learning

Because the field of coding is so vast and complex, if you try to do too much at once, there’s a real risk you’ll overwhelm yourself when learning programming.

The solution is to focus on just-in-time learning: Only start exploring something new if you can apply it right away to the project you’re working on. That way you’ll not only remember everything much better (because it’s so relevant to your work), you’ll also avoid overwhelming yourself by diving into too many unrelated things.

How to stay motivated

When you’re just starting out learning to code, motivation is high. But as you advance to more challenging problems, it’s easy to get caught up in the desert of despair: You feel like it’s impossible to go further and like you don’t know anything.

That’s when you need to remind yourself of your initial motivation for learning programming. Use it to push yourself through the inevitable plateau.

Finally, you’ll have become competent enough to make consistent progress again and push your skills to more and more impressive levels.

Apply the Franklin Method

  1. Read the source code of a program similar to what you’d like to build
  2. Write down anything challenging or of interest to you
  3. Recreate the code yourself
  4. Compare what you’ve written to the source, and do it over until you get it perfect

Learning Programming FAQ

Do you need to learn math to do programming?

There's no question that math skills help you better understand programming problems and how to solve them.

Knowing math is more important for some fields of coding than others.

To conclude: You don't need to be a math wizard to start writing your own programs. But knowing and applying mathematical concepts will help you become a better developer.