Becoming skilled at anything requires determination and perseverance. Gaining expertise in programming is no different. I teach around one hundred students every year at the University of Texas at El Paso. I generally teach Programming, Data Science/Mining, and Algorithms courses. Based on what I have seen over the past years as a faculty member and a researcher is those who work hard and use an organized way of learning become skilled quickly.
Some tips for beginners on how to become a good programmer are as follows.
- Decide which programming language you should learn first.
- Build a list of related resources.
- Study slow but get back to programming every day.
- Give a structure to your study.
- Solve middle and high school math problems using programming.
- Test yourself.
- Learn problem-solving; do not memorize codes.
- Do not stop right when the code works; think about critical inputs.
- Write programs to solve the same problem multiple times.
- Work on projects that you own.
- Figure out essentials after you learn your first programming language.
- Read programs written by others.
- Ask questions.
The tips are for all who are planning to or have started to self-learn a programming language. Additionally, they are for those who have enrolled in a formal programming course lately.
We made the following video explaining the tips in details.
Each of the tips is explained further in the sections below.
Tip# 1: Decide which programming language you should learn first.
It is a tough question to answer, given that every person is different. While Python is a popular choice, Java might be a better option if time and schedule of the learner permit. Learning Java programming language would result in mastering some theoretical concepts that would help the learner self-study any programming language later.
In another article, we explain how someone can choose what programming language to learn first based on several different aspects. The post is linked here: What programming language should I learn first?
Tip# 2: Build a list of related resources.
When you plan to study anything, you need to make sure that you have enough resources that will help you learn. Most of the time, the primary resource is a book. In learning to code, there are many other resources.
Reading a programming book is not exactly like reading a traditional book. When you are reading a programming book, you will need to practice every example immediately. In summary, reading books is not enough to develop a skill. Write the examples provided in the book on a computer. Compile the codes and run the programs to understand the concepts clearly.
Nowadays, you have the opportunity to learn the same topic from many different people. YouTube is a great resource where you will find lectures given by experts. After reading a chapter from the book and practicing the topic, one can watch some YouTube videos on the topic. It is like preparing before a lecture at school. A student learns better if she/he goes over the subject before a lecture.
You might search for YouTube channels that focus on the programming language of your interest. Some websites may even run free classes. With the free courses, you will generally watch video lectures, read some study materials, and also there can be some exercise problems.
We are currently running a Free Java Course, where there are video lectures, articles to support the videos, and many of the posts have exercise questions. If you are a beginner, and if you are planning to learn Java, you can check out our Free course here: Free Java Course.Subscribe to receive notifications of new videos and articles.
Tip# 3: Study slow but get back to programming every day
Programming is a skill that one should master slowly. The fact is, no one can learn to program overnight. Learning a programming language can be fast when you already know another programming language.
As a beginner, one should take learning to program more like a habit than rushing to become a master. Trying to rush will only create frustration.
A few tips regarding learning the first programming language are as follows.
- Put aside some time of each day for study and practice.
- Span your learning of the first programming language over several months. I believe learning the first programming language well can take anywhere from three months to six months, depending on the amount of time one can afford.
- Trying to write code fast does not help in gaining programming skills. Although programming might seem “fast typing” based on how movies would put them, the reality is that a great programmer can be an overly slow typist. I should disclose at this point that I type slow and look at me – I teach programming courses. :)
Tip# 4: Give a structure to your study
Bring some organization to your study if you plan to learn to program all by yourself. Some examples of bringing structure to the effort of learning to program are as follows.
1. How many hours in a day should one study?
When you are learning anything seriously, you will need to get back to it regularly. Creating a daily schedule is half the work done. Consider no less than two hours per day on average when you are learning your first programming language. The more time you will allow, the better you will learn. It is not hard to learn the first programming language in three months.
2. How does your weekly schedule look in terms of getting back to programming frequently?
Decide on the time of the day or night when you will learn and practice programming, depending on your weekly schedule. In some days, you might keep two or three hours. On some days, you might devote only 30 minutes to an hour to practice programming. It all depends on your weekly schedule. Make sure that you have a plan and a weekly routine.
3. How will you remember the essential items that you learned?
A journal to write down crucial clues of what you have learned from the book or a YouTube video helps a lot later. Revising the journal from time to time reminds a learner about the items covered earlier.
4. How will you organize your digital study materials?
Keep an organized folder in the computer for study materials, practice questions, and exercise codes. Name the subfolders and file names in a way that would help you find any item quickly later. If you use multiple devices, use a syncing service like Dropbox, Google Drive, or OneDrive to sync the folder to all your computers.
5. How will you sequence topics?
A course helps organize learning, primarily because generally the course-schedule follows a proper sequence of topics. Sequencing topics of a subject that you do not know yet is a difficult task. Some YouTube channels that cover the computer language of your interest might be useful as a guideline for topics. Books also list chapters one after another to help learners follow a sequence.
Tip# 5: Solve middle and high school math problems.
One way to improve your programming skills, in the beginning, is to write programs to solve some middle and high school math problems. Examples are, add all the integers between 1 to 20; compute the factorial of 10; or calculate the greatest common factor of 12 and 18.
Not that you will need to use middle or high school math to solve real-world problems when you are a programmer. Solving math problems will help you develop programming skills, in general.
Tip# 6: Test yourself
Becoming a self-taught programmer is not impossible. One tip to improve is to test yourself. There are several ways one can self-challenge when self-learning, some of which are as follows.
1. Solve problems from the book
Each programming book contains relevant programming problems at the end of each chapter. The problems are designed to test your learning. Write programs to solve some of those problems.
2. Find programming problems from the internet
If you search on Google with the keyword “programming problems,” you will get an abundant number of problems. Not all programming problems are suitable for a learner’s level. The learner needs to figure out which problem is ideal for her/his level of expertise.
Many professors, who teach programming languages, keep assignments and exam questions on their websites. You can search for such websites and download the assignment descriptions for practice.
3. Solve problems on online platforms
There are some resources online, where a programmer can write code to solve problems, submit the code, and the code will be checked automatically for correctness. Such an online system is a great way to master problem-solving using programming. One such site is HackerRank. I would recommend this site for those who have become familiar with at least one computer programming language.
Tip# 7: Learn problem-solving, not syntax
Studying a programming language does not necessarily mean reading books and memorizing syntax. You will have to learn to program by writing programs to solve problems.
Also, learning one programming language might not be enough because the most popular computer language this year might become obsolete within a few years. A good programmer masters the art of problem-solving using a computer language. Even if she/he switches to another language in a few years, the problem-solving part remains as familiar as before.
The syntax from one language to another may vary, but the logic of solving a problem does not change. Therefore, when you are learning a programming language, focus more on the problem-solving aspect, rather than trying to memorize the syntax.
Tip# 8: Do not stop right when the code works – think about critical inputs
A common mistake that I observe among many beginners is – they assume their program is complete when they see that it works for a particular user-input. A program someone has written hurriedly may have many bugs. Bugs generally appear in a program from unconsidered scenarios.
Careless coding may result in a simple bug as a division error. That is, the programmer checks that the program is dividing one number by another, such as 5 divided by 2, correctly. Now, the user enters other numbers for a division, such as 10 divided by 0. A zero in the denominator will result in an error, and the program will crash.
For large software projects, mistakes can be as big as opening a backdoor, making the system vulnerable to attacks. However, if you are a beginner, you probably do not have to worry much about opening a backdoor for attackers. You will still need to analyze your code for different inputs critically, to make sure that the program responds well for all ranges of data.
Tip# 9: Write solutions to the same problem multiple times
Writing the solution to the same problem twice or thrice is a good practice as a beginner. The target is not memorizing the code. It is instead honing problem-solving skills.
Let’s say you wrote a program today. Try to write the code to solve the same problem tomorrow. You will definitely have a deeper understanding of the problem. Who knows … you might even discover that you had missed a bug or two on the first day.
Tip# 10: Work on projects that you own
One way to master a programming language after learning the basics is to work on a project. Come up with programming projects relevant to your life. Some example projects can be software to keep track of your expenditure, a program to track calories consumed in a week, and scheduling software.
One can keep improving a programming project over time and keep learning. Once the confidence grows, one can seek freelance work as a professional developer. An example of a website where one can bid for freelance jobs is freelancer.com.
Tip# 11: Essentials after you learn your first programming language
After gaining expertise in a programming language, an ideal thing to do would be to study data structures and algorithms.
Data structures help you store data in the main memory of a computer efficiently. Retrieval of information from the main memory is also an issue for programs that deal with a massive amount of data. Data structure is the study where one can learn how to store and retrieve data efficiently to solve a problem.
An algorithm is a set of instructions to solve a problem. A course on Algorithms describes different families of widely used algorithms, which one can leverage to solve practical problems.
If you consider a programming language a tool, then data structures and algorithms are the techniques that you use to solve a problem. You can change the tool, that is the language, but the techniques will remain the same.
I say that the study of algorithms is more like studying tricks that you will implement using a programming language.
Tip# 12: Read codes written by others
Reading codes written by others is beneficial in improving programming skills. You will be surprised to find how different people would write a program to solve the same problem in different ways. When you read codes written by others, you are practically reading the logical sequence that another person created to solve a problem. Being able to understand that logical sequence helps develop a programmer’s skill.
Tip# 13: Join forums and ask questions
When someone is learning a programming language, whether self-taught or in a course, it is necessary to ask questions. If you are self-learning, join Facebook groups that help beginners. Do not hesitate to ask any questions. Before you ask the question to a forum or a group, please make sure to check if there is any direct answer already available on Google.
However, if you have any questions, you can, without any hesitation, ask the question here below in the Comments section. You DO NOT have to search on Google to check if your question already has an answer. We will be happy to reply.
Programming is a skill. Like any other skill, one needs to hone it to gain expertise. Please keep learning and do not give up. It is a general statement for anyone trying to achieve anything, not only the programming skills. I wish you all the success. Thank you!Pelase subscribe to receive notifications of new videos and articles.