This post will tell you everything you need to know to learn how to create computer programs. Beware: it’s not easy. We’ll start with your mindset. Showing the right attitude maximizes the odds you’ll keep making progress, and minimizes the odds you’ll give up. After you read this article, you will know how to bootstrap your coding journey.
Yes, You Should Learn to Code, Here’s Why
It helps if you agree that learning to code is one of the best things you can do for your life and career. You should be excited about the prospect of programming computers. If you’re not, get ready for a pep talk.
Coders are Producers
Some of the best advice I ever got is to produce more than you consume. Creating stuff lots of other people use is the ultimate act of empowerment. And coders have an edge in this game. They can start on their own, with nothing but a blank text file. Coders can turn that text file into an app that makes a difference in the lives of many people.
This ability to materialize a business idea into the real world completely independently is super cool. With the internet, coders can directly make their product available to millions of consumers. That’s very empowering.
Coders are More Employable
Even if you don’t feel you are an entrepreneur, coding is still empowering. By becoming a coder, you are instantly more employable, and you’re able to take on more leadership positions. Without knowing how software works, it is becoming increasingly hard to lead tech teams. And when you score a programming position, you’re likely to enjoy benefits that few others get. Coders usually work flexible hours and remotely. As long as software gets delivered on time, people don’t care when and where you get the job done.
Coders are Smart
Programmers eventually become very good at problem solving. Learning how to code is rewarding, but it inevitably involves a lot of pain and frustration. You’ll constantly train your brain to find why things aren’t working as expected, and fix it as quickly as possible. Over and over again. With time, this skill becomes a super power.
So, are you convinced you want to be a coder? Let’s set up the correct learning mindset.
The Mindset of a Successful Coder Apprentice
If you tried to learn how to code in the past, but you didn’t get very far, don’t worry: it’s probably not your fault. Again, learning to code is hard. It’s a constant uphill battle. Here’s what you need to keep in mind:
Learning to Code Builds Upon Cumulative Concepts
Coding is different from most other fields. Here, only the things you learn in a conceptual manner count. Learning things through memorization or repetition won’t get you far. The concepts involved in coding build on top of each other. This means just repeating code from an example, without actually understanding why that code is there, will not get you anywhere.
If you skip a concept, the next topic will look even more cryptic and harsh. Never skip what you don’t understand. It will only make things worse in the future. If you’re struggling and you don’t understand a concept no matter how hard you try, maybe it’s just poorly explained in your book or by your professor. Go look for more explanations and examples. Ask someone for help. Take your time. Did you really comprehend the previously presented concepts? If in doubt, review them.
It’s Not a Sprint, Nor a Marathon
Don’t rush, it’s not a sprint. If you try to push through when your mind is exhausted, you’ll only succeed in getting burnt out. Make steady progress, not erratic bursts. Don’t approach coding like a marathon either. A marathon ends after 26 miles (42 km). Learning how to program computers never ends. The best programmers I know always take some time to study and try new concepts every once in a while.
There’s no need to compare yourself to other coders—there’s no finish line or podium. We’re all here learning how to become better coders. Some people will dedicate more time and learn a bit faster, others will start slower and pick up the pace later. Just make sure you’re making steady progress.
Constant Practice is Essential
When it comes to programming computers, you only really learn once you build actual software. So whenever you’ve learned something new, seek ways to materialize this new concept in a small program. Code on!
OK, so you’re ready to embrace constant learning. Constant coding practice. You’ll focus on understanding the concepts, not mindless consumption of learning material. Now let’s pack up for the journey.
Prepare for the Journey
There is no universal, bulletproof roadmap for learning to code. The best way to learn is different for each person. It depends mostly on what you want to achieve. To be able to chart your learning path, first you have to know what floats your boat.
What do you want to code?
Most types of software can be categorized in one of the five following fields:
- Web Apps, or websites: stuff that people will use from a web browser.
- Native Apps: stuff people will install on their smartphones or personal computers.
- Science: code to streamline scientific experiments and analyze data.
- Enterprise: software that will be used not by everyday consumers, but to help people do their work in a company.
- Games: haven’t we all loved them at least during our teenage years?
Of course a lot of things belong to all five fields. Still, the path for coding in each of these five areas is very distinct. You should pick just one of the five to get started. I started by programming web apps, but during my college education, my focus had to shift towards science.
Choosing your first programming language is an important decision. If you want to develop games but pick a programming language that’s more suitable for enterprise apps or science, everything will be harder from the start. Here are the languages I’d recommend for each group:
- Native Apps
- iPhone, Mac OS: Swift
- Android: Java
- Windows: C#
- Linux: C++
- Science: Python
- Enterprise: Java
- Games: C++
Why do you want to code?
Do you want to get a better job? To build your business? To get a promotion? Are you just looking for some fun? If you’re learning for professional reasons, do your research. What’s the most used programming language among the companies you want to work with?
When do you want to be ready? This impacts your options. Getting a college degree will take at least four years. Attending an intensive bootcamp could only take a month.
Also, look into your social network to discover if you have friends who code and can help you out. It is very important to be in direct contact with other programmers, especially people who code better than you.
Getting Started: Pick your Resources
There are so many resources that teach people to code that it can take ages to select one. If you never did any actual coding, I strongly recommend that you start by taking a free, interactive online coding course. See if any of these resources provide a course in your language of choice:
This will give you the opportunity to write your first lines of code and taste the magic. If you try it, and don’t think it’s cool to write magic text that makes the computer do what you want, maybe this isn’t for you—in which case you can go learn something you’re passionate about. And you’ll be happy about it, because you won’t have spent a dime trying out programming.
After you finish the online coding course, and you’re excited about moving forward, it’s time to pick the next resource. This can be stressful: there are hundreds of resources to pick from. Bootcamps, courses, books, games, video courses…
Don’t Code Alone
If you don’t have friends who are also programmers and can directly support you, I’d recommend giving more consideration to resources that involve contact with other coders: a bootcamp, in-person courses, or a coding school. These are the most expensive, but there’s an important benefit beyond the contact with other aspiring programmers: experts are going to provide you with a coherent learning plan, saving you the trouble of finding it yourself.
Besides, if you want to get a job at a big tech company, like Uber, Google or IBM, having a diploma from an institution they trust helps your odds.
Learn the Way You Learn Best
To help you choose a resource to learn from, consider how you best learn. When you last had to learn something, what worked best? For example, I have a hard time being focused watching videos. I prefer to learn from books. Video courses don’t work for me. But I know people who are the opposite: they get bored by text, and like watching videos.
Look for a resource in the medium you prefer, that uses your language of choice. For instance, if you decide to learn Swift, there’s the excellent LearnSwift website. Here’s a list of curated resources:
- Video courses
- Universities (ranked by area and location)
- Coding Bootcamps
- Games that teach programming: Code Combat, Coding Game
- Online coding challenges: Hacker Rank, Hacker Earth
Additionally, if you spend a lot of time commuting, I highly recommend you try podcasts. You turn wasted time into productive learning. Just search for “programming” or “coding” in your podcast app, and several options should pop up.
Don’t read or watch more than a single book or video series at once. If you simultaneously study from several resources, you’re more likely to lose focus and slow down. Don’t get distracted by the huge amount of available resources.
Maintaining Steady Progress
So you’ve picked your programming language, and your course, book, game, or other resource. The moment the hand-holding with your learning resource stops, you will probably get stuck. Your code won’t work, and you’ll have no idea why.
During this hard time, remember that getting stuck is part of the deal. You actually learn a lot when you’re fighting to move on. All programmers get stuck, even the most senior. But as you get more experienced, you’ll develop skills to search faster, debug efficiently, and ask help more properly.
Make your way
Don’t give up easily. Triple check the code. Try to figure out what’s wrong on your own for a while. That will train your mind to catch bugs. If you can’t make progress, search the internet about your problem or error, in the most generic terms possible. Include the programming language, platform or framework you’re using. When you’re asking for external help on StackOverflow or to your friends, be humble.
Do your homework first: spend some time researching and trying to solve the problem yourself. Remember the other person has no obligation to help you. When you reach out, ask your question in a way that communicates you’re willing to put effort into figuring out how to fix the problem—not that you want a ready-made solution handed over. If your code has a bug, don’t send out your entire program. Save everybody’s time and write a minimal working example that demonstrates or reproduces the bug with the least possible amount of code.
Programming languages, frameworks and database technologies don’t matter in the long run. But they do matter at the start. Don’t try to learn all technologies at once. Don’t switch to a second programming language until you are well-versed in the first. And pick a first programming language that’s easy for beginners.
Stick to the Simple Learning Process
Here is what you need to do:
- Set out to build a simple piece of software that does something within reach.
- Commit to daily writing code to improve that piece of software.
- Once you’ve reached your goal, pick something slightly harder, and start again.
If you’re working on game development, for instance, create a text based game, like “guess the number”. Once you master text games, try creating a dumb 2D game, like “Flappy Bird”, or “Pong”. Then try making it more and more complex. Try making a pool game. Then try 3D games.
Sticking to this simple learning process requires a lot of discipline. When you do it, announce it in your social networks to get support and accountability from your friends. Try to do it for 100 straight days. Checkout the “100 days of code” movement. Tag your posts with the #100daysofcode hashtag and be a part of it!
Get a Job
Don’t be afraid to get a programming job, even if you think you’re not 100% ready. For entry-level positions, they aren’t looking for someone who knows how to code well alone. They want a committed, hard-working person who is willing to put in the effort to learn to solve problems without being much of a burden on the rest of the team. So send out resumes today. After you get a programming job, even if it’s basic, your skills will take off, and you’ll have contact with other more advanced developers.
Get a Coding Notebook
Notebooks have always helped people learn. You should take advantage of them as well. Keep a coding notebook. Every day when you learn something new, or you come across a new concept, write it down in your notebook. Writing things down helps your brain to internalize what is important, and committing it to your long term memory.
Learn Computer Science
As soon as you’re managing to build some basic programs, don’t forget to learn the basics of computer science.
Learning computer science will streamline your journey and help your coding in many ways. That’s why I wrote a book to teach its most essential concepts to beginners, called Computer Science Distilled. It’s a slim intro to computer science that will give you a quick overview of the main topics. Check it out!
Your Coding Environment
Finally, when you’re taking a course or a bootcamp, beware of excessive hand-holding and boilerplate. Most courses will try their best to remove the stress of setting up a coding environment, so that you can become productive and see things work right away. However, as soon as the instructor leaves, as soon as you try to do something different from the example on the video—bam, it won’t work, and you’ll get stuck.
That’s simply because you’ve skipped the work of setting up a real coding environment. Installing the compiler/interpreter, a nice text editor, and then using everything to create and run a program all by yourself is essential. It’s OK to skip it at the very beginning. Still, at one point you’ll have to learn how to create a program from a blank text file, like a grown up. It’s hard work even for expert coders who try new programming languages. Keep calm, and code on.
If you want to be a great programmer and retain some mental sanity, there are some lifestyle changes you have to observe.
Don’t let Bugs Disturb your Sleep
Once you’re trying to fix a bug, you’re likely to get completely obsessed by the problem. The world surrounding your computer screen will slowly disappear and you’ll be completely immersed until you find what’s wrong with your code. That’s a great sensation, and these hours were absolutely productive. But if you don’t take care, that process will happen late at night. In disastrous cases, you might end up debugging something until dawn. And when you lay down to sleep, your mind will still be on the problem and cause you insomnia.
Don’t fall into this trap. End your work session early in the evening at the latest, no matter how concentrated you are. Coders often don’t notice they’re sleep deprived. And when you are sleep deprived, no amount of coffee will bring your productivity back to normal.
Code Every Day
I can’t stress this enough. Even if you can only do a short session, it’s important to maintain frequent coding sessions. You can schedule it, for example by always doing a couple hours after breakfast, then a couple more after lunch.
Follow other coders on social media. Post about your coding discoveries. When a coder posts something you’re interested in, comment and ask questions. Post about your coding goals. Start following and searching for hashtags of the technologies you’re working with, and also #100daysofcode, #computerscience, #programming, etc.
Do you still have questions on how to get steady progress when you’re learning to code? Leave a comment below and let us know your issue!