Learning Programming

Learning to program is about understanding how to translate thoughts into source code that can be executed on computers to achieve one or more goals.

There are many steps in learning how to program, including

  1. setting up a development environment
  2. selecting a programming language, of which Python is just one of many amazing ecosystems that you can decide to use
  3. understanding the syntax and commands for the language
  4. writing code in the language, often using pre-existing code libraries and frameworks
  5. executing the program
  6. debugging errors and testing for unexpected results
  7. deploying an application so it can run for intended users

How should I learn programming?

There are several schools of thought on how a person should start learning to program. One school of thought is that a lower-level programming language such as Assembly or C are the most appropriate languages to start with because they force new developers to write their own data structures, learn about pointers and generally work their way through the hard problems in computer science.

There's certainly wisdom in this "low-level first" philosophy because it forces a beginner to gain a strong foundation before moving on to higher level topics such as web and mobile application development. This philosophy is the one most commonly used in university computer science programs.

The atomic units of progress in the "low-level first" method of learning are

  1. aspects of programming language understood (type systems, syntax)
  2. number of data structures coded and able to be used (stacks, queues)
  3. algorithms in a developer's toolbelt (quicksort, binary search)

Another school of thought is that new developers should bootstrap themselves through working on projects in whatever programming language interests them enough to keep working through the frustrations that will undoubtably occur.

In this "project-based" line of thinking, the number of projects completed that expand a programmer's abilities are the units of progress. Extra value is placed on making the projects open source and working with experienced mentors to learn what he or she can improve on in their programs.

Another way to learn that combines the project-based learning with defined objectives is to play a computer game that will guide you through the learning process. For example, TwilioQuest teaches the basics of Python in one of its missions and then has a ton of free content for studying intermediate and advanced topics.

Should I learn Python first?

Python is good choice in the project-based approach because of the extensive availability of free and low cost introductory resources, many of which provide example projects to build upon.

Note that this question of whether or not Python is a good first language for an aspiring programmer is highly subjective and these approaches are not mutually exclusive. Python is also widely taught in universities to explain the fundamental concepts in computer science, which is in line with the "low-level first" philosophy than the projects-first method.

In a nutshell, whether Python is the right first programming language to learn is up to your own learning style and what feels right. If Ruby or Java seem like they are easier to learn than Python, go for those languages. Programming languages, and the ecosystems around them, are human-made constructs. Find one that appears to match your personal style and give it a try, knowing that whatever you choose you'll need to put in many long days and nights to really get comfortable as a software developer.

Practice problems

Working on practice programming challenges and studying their solutions in Python or another language is a great way to learn whether you are just starting or an experienced developer. Here are numerous open source repositories and sites with practice problems and solutions:

  • Pytudes are an awesome collection of Python programs to practice and demonstrate skills. These problems go above and beyond the common data structures and algorithm questions often found in other practice problem sets.

  • Interactive Python coding interview challenges is an awesome Jupyter Notebook to learn and test your data structures and algorithms knowledge in Python.

  • Kindling project provides a wonderful list of resources that challenge beginners with programming problems that beginners can solve to grow their skills.

  • Build your own "x" does not contain practice problems but instead provides tutorials for how to build your own programming languages, blockchain, bots, databases, frameworks and more awesome projects.

  • Python Programming Exercises is a free short PDF book with exercises across many standard Python language features such as dictionaries, classes and functions.

  • Code problems provides common algorithm and data structures challenges with solutions in several programming languages including Python.

  • Python basics contains materials and exercises to learn basic Python 3 syntax such as variables, functions and lists.

  • TeachCraft combines Minecraft with Python to learn coding.

First-hand advice

These articles are written by programmers who explain how they learned to code. They should not be taken as "this is how you must learn" but instead give example paths you can think about taking as a beginner:

  • Learning to program is a long read but goes through Dan's experience in math and engineering before fully committing to software development.

  • Developing as a developer gives general advice on qualities necessary to become a programmer, including persistence, respecting others and considering ideas that are outside your comfort zone.

  • This Picture Will Change the Way You Learn to Code covers a well done graphics of many up-to-date concepts and tools that developers use. The post reminds you that you will not and should not learn everything but that you should pick tools you want to gain experience in while generally knowing what else is out there.

Teaching perspectives

Are you an experienced programmer working with new and junior programmers? These articles give some insight into how you may want to structure your teaching experience:

  • Five Principles For Programming Languages For Learners is a perspective on teaching children to program but is good advice for an audience of any age.

  • Teach tech with cartoons is an awesome resource that explains how you can use simple but fun drawings to teach otherwise difficult technical concepts to students.

  • Teach Yourself Computer Science is intended as a self-teaching tool with many resources that are classic computer science textbooks. There are also nice explanations for why each resource is useful in your learning and teaching journey.

What do you want to learn about programming?

What editor should I use to code my Python app?

Why is Python a good programming language to use?

Show me a list of the best Python learning resources.


Matt Makai 2012-2022