We are an independent, advertising-supported comparison service. Our goal is to help you make smarter financial decisions by providing you with interactive tools and financial calculators, publishing original and objective content, by enabling you to conduct research and compare information for free – so that you can make financial decisions with confidence. The offers that appear on this site are from companies from which TheSimpleDollar.com receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. The Simple Dollar does not include all card/financial services companies or all card/financial services offers available in the marketplace. The Simple Dollar has partnerships with issuers including, but not limited to, Capital One, Chase & Discover. View our full advertiser disclosure to learn more.
A Guide to Learning How to Program in Your Spare Time – for Free!
In this modern information-based economy, where most workers use some type of computer or communication device as a major part of their job and so much of the economy is based on using and sharing information, there’s no doubt that knowing how to write computer programs is an incredibly valuable skill.
The average computer programmer makes around $80,000 a year, and that includes only people who work as employees. It doesn’t include the many, many freelance programmers who work as consultants or who start their own small software businesses. Not only that, the demand for good computer programmers far outstrips supply – if you can write code reasonably well, you’ll probably find work.
Of course, there is often a perception that computer programming is extremely difficult and something that requires a special kind of mindset and a lot of specialized instruction to be able to do. It’s often viewed as this special kind of arcana that mere ordinary mortals can never figure out.
I don’t agree with that premise at all. I was writing computer programs on my own when I was an elementary-aged child, and my own seven-year-old figured out on his own how to write a simple joke-telling program.
It’s not hard. It just takes time and practice and patience and a willingness to learn and try new things and (often) feel pretty dumb as you’re learning.
The nice thing is that the internet was largely built by people who are really passionate about this stuff and because of that there’s an incredible abundance of free resources out there for people interested in learning how to program. In fact, most of those resources were created by people who realized that one of the best ways to teach yourself something is to actually practice teaching it or writing tutorials about it.
You absolutely can learn almost everything one would learn in a full bachelors degree program in programming or computer science at a university online and for free. It won’t come with the actual paper degree, of course, but there are many opportunities in the computer programming field to get jobs by demonstrating skill without necessarily having the papers.
Plus, I find it a really interesting thing to explore purely as a hobby. Computer programming practically forces you to think in an orderly fashion, breaking things down into simpler and smaller steps until each step is trivial. That’s a great skill to have no matter what field you’re in.
Let’s get started with a key question that people almost always have when they start down that path.
The Difference Between Computer Science and Programming
This section’s important if you’re interested in learning how to program, so that you don’t find yourself skipping over stuff that seems irrelevant or simple now but becomes really really important later on.
Computer science and computer programming are two distinctly different fields with some overlapping skills and a lot of, shall we say, deep relationships between them. At many universities, courses on computer programming are lumped into a general “computer science” department along with courses in which a computer isn’t needed and is never touched, which is often a confusing thing. What’s the connection? What’s the difference? Why would a computer programmer care about computer science at all?
The key between understanding the difference between the two is knowing what an algorithm is. Computer science is the study of algorithms and how to create them. Computer programming is the practice of implementing algorithms so that a computer can use them to solve a problem.
So, what’s an algorithm? An algorithm is an unambiguous explanation of how to solve a certain kind of problem. If you follow the steps of an algorithm, you will be able to solve the problem the algorithm is designed to solve.
For example, let’s say you had a stack of 20 cards, each with a number on them. One algorithm for sorting those cards might be to grab the first card in the stack, then go through the rest of the stack one at a time, comparing each card to that first card. If the number of the new card is lower, swap the places of the two cards. Once you’re through the stack, the one card you have in hand is the lowest number. Then, repeat this algorithm for the remaining 19 to get the second lowest, and so on.
One thing you might do when you hear that solution is think to yourself, “Huh… there’s a better way to do that.” There are many faster ways to sort cards than this. Maybe you go through them one way, moving the biggest to the back, and then go back the other way, moving the smallest to the front, and go back and forth until it’s sorted, for example. That kind of thinking is computer science. On the other hand, maybe you’ll think, “Okay, how do I tell a computer how to do this?” That’s computer programming.
Computer science is all about the study of algorithms. How do you make an algorithm to solve a problem? How do you know which of several algorithms is the best? How can you describe an algorithm in a clear way? How can you organize information in a way so that new, fast algorithms are possible? Computer science uses a fair amount of math and often ends up sketching out a lot of things and drawing diagrams to help solve problems.
Computer programming is about taking an algorithm that’s already in place and turning it into code that a computer can understand. How do you do this efficiently? What languages can you use? How do you explain an algorithm to different types of computers?
The two elements go together hand in hand. Generally, programmers usually have a little bit of rudimentary computer science knowledge, and computer science practitioners can program a little. People who excel in either field often have a healthy dose of both.
If you’re teaching yourself, I recommend having some of both, because in the real world, if you’re writing a computer program, you’re probably trying to solve a problem for which there isn’t an algorithm spelled out for you.
Why is this important? The big reason is that sometimes computer science material can feel really irrelevant to programming and you don’t directly see the connection. Be patient. There’s almost always a connection, one that will help you be a better programmer (at least in the sense of figuring out how to solve smaller challenges on your own).
Decide Why You Want to Program
So, why do you want to learn how to program?
Perhaps it’s simply a matter of personal curiosity and personal interest. You are a naturally curious person. This is something you don’t know about. You’d like to know more and, who knows, maybe this is a skill you can pick up if you fall in love with it. If that’s you, I’d suggest dipping your toes in with an introductory option that keeps it fun and shows you a nice survey of things. From there, you can dive in as deep as you want in whatever direction excites you.
On the other hand, what if you’re considering this as a career or maybe you have a great idea and want to create it? I’d suggest starting with a real curriculum that will build you into a solid programmer with some computer science to help you create simple algorithms as you code. It’s worth noting that many programmers often find work without having a degree. Often, programming job applicants are given a “first pass” via a programming test that demonstrates their skills, and a degree is just a signpost that indicates that they went a certain way with their education. Quite often, a multidisciplined person – someone who knows how to program but also has a background in something else – is extra valuable!
Dip Your Toes In the Water
Dipping your toes in the water is a great way to start if you’re doing this for personal interest or you have some thoughts about a career but no background whatsoever and you’re not sure if it’s right for you.
My absolute favorite place for the first steps toward programming is Free Code Camp. It’s a nonprofit set up to teach people the basics of programming, with some advanced tasks actually being used to aid nonprofits that have specific programming needs. For you, it’s a very nice free online introduction to programming.
Move through the tutorials available on that site. Learn what a few of the most common languages are – HTML/CSS, JS, Python, and others – and what they’re used for. Write a few simple programs right in your web browser. It’s about as easy as can be.
If you find that interesting and want more freedom to explore and learn more, I suggest going through some introductory materials on setting up and using the Python programming language on your own computer.
Why Python? It’s very easy to set up. There’s tons of material available for it. You can write and then run programs immediately to see if they work. It’s in common use in many, many businesses.
My favorite introductory material is Learn Python the Hard Way, which is available for free online or in book form. Having said that, there are a lot of great books on Python that will teach you the language – just check out the computer science or programming section at your local library and grab one.
Whenever you get stuck, slow down. Go to Google and start searching for answers. Don’t hesitate to look for a beginner’s programming forum or a beginner’s Python forum, join the forum, and ask your question. As long as you’re polite and respectful of the fact that people are volunteering their time to help you and don’t act easily frustrated, people will be glad to help you out with your questions.
Diving In Deeper
Once you have those basics down, if you find that you still want to keep going, there are really two roads you can follow that have a lot of overlap.
One is the “I have an idea and I want to learn how to make it” path. With this path, I recommend letting the project be the leader. I would start with a well-rounded introduction to computer science online course just so you have the basics, and possibly an online course about data structures, and then simply start chasing information related to your project. Take classes and read tutorials as they’re relevant to what you’re making and learn as you go.
If you don’t have a specific idea in mind and just want to become a well-rounded programmer, I suggest taking free online classes that add up to at least the core curriculum of a computer science and/or programming degree, and ideally follow that with a full online computer science and programming curriculum.
I can personally vouch for these six (well, sort of seven, because one is split into two parts) online classes, which make up a good introductory sequence that matches up pretty well with the core curriculum in most computer science and programming departments. I highly recommend doing the above Python material first so that you have Python on your own computer and know how to use it, then use Python to solve the problems in these classes.
All of the below classes are free. You can just hop on board and start. I do recommend, however, that if you’re going to bother with this sequence, take them seriously, but remember you’re doing this for your own enrichment and not for a grade. Take notes, go through each one at your own speed, don’t hesitate to pause lectures to think about something or look something up.
A quick note about online classes: you’ll get far more value out of them if you take them slowly, take notes, pause and do more investigation when something isn’t clear, and do the exercises along the way. It’ll take far more time, but you’ll walk away with far more understanding of what’s going on. If you blitz through the early stuff, the later stuff will simply be inscrutable.
Let’s dig in.
Introduction to Computer Science and Programming (from MIT’s free OpenCourseWare) is probably the best all around one-shot introduction to computer science and programming I’ve found. This is where I would encourage almost everyone to start once they’ve done a few basic computer programming tutorials. It meshes together computer science and programming into one course, everything in there works really well with Python on your own computer, and it introduces you to enough topics with enough depth that you’ll know where you want to go next from here depending on your personal interests and goals.
Mathematics for Computer Science (from MIT’s free OpenCourseWare) might seem like a strange second course to point out – after all, this is basically a math course and has little to do with writing computer code. However, this is a key course to have if you’re going to be designing your own solutions to problems rather than just translating other people’s solutions into code. This really centers around how to evaluate algorithms and figure out which one is the best for your needs – all of the math knowledge you need to do that is in this course.
Learning How to Program Part One and Part Two (from the University of Toronto via Coursera), on the other hand, is focused directly on programming – the art of translating algorithms into code. This pair of courses teaches a lot of valuable principles such as how to write clean and easy to read code, how to break down ideas into such small bits that translating it into computer code becomes easy, and how to handle it when things go awry. This is a very practical toolkit for the skill of translating a discrete idea into code form so that it works and others can read it.
Introduction to Algorithms (from MIT’s free OpenCourseWare) is a good next step regardless of whether you’re more focused on programming or computer science. This free course focuses on algorithms used to solve a lot of commonly known problems, such as sorting a long list of items or finding the best route on a map. It deals both with how to compare them and a little on how to design them (very “computer science”-y) as well as how to implement them (very “computer programming”-y).
Theory of Computation (from Stonehill College via Youtube) is something of a bridge between the math taught in that earlier mathematics for computer science course and the real world, as this applies a lot of that math to actually evaluating algorithms. Again, this is really valuable stuff if you want to deeply understand how to take a real world problem and translate it into an algorithm that a computer can solve efficiently, but it won’t directly lead to better programming skills. It leads to better problem solving skills, or at least better skills in evaluating which solution is best.
Advanced Data Structures (from MIT’s free OpenCourseWare) is an additional course that I strongly recommend anyone who is into computer programming investigate deeply. This course is all about designing data structures, which in simple terms means knowing how to translate everything you would need to know about something in the real world in order to solve a problem related to that thing into a structure that a computer can understand and an algorithm can be applied to. For most large programming projects, getting the data structures right from the very beginning is one of the biggest challenges you’ll face, and this course is about getting them right.
If you want to keep going on beyond this curriculum, I highly recommend checking out this suggested intensive online learning program that matches a bachelor’s degree in computer science and programming. All of the classes listed there are free and most of them are still publicly available.
Computer programming (along with enough pieces of computer science to really be a strong programmer) is something that most people can pick up if they have a genuine interest and take it slowly. It can appear overwhelmingly complicated if you look at the deep end of the pool without knowing how to swim, but if you dip in your toes and then get into the shallow end slowly and then learn how to swim step by step, it won’t look so complicated.
The best part is that everything you need to go from someone standing outside the pool to being a great programmer is available online for free. It just takes time, interest, and a willingness to learn.