A Beginner's Guide to Programming
This guide is a bit long, but if you read it patiently from start to finish, you will gain a lot from it.
1. About Programming
-
What are programming and programming languages?
Programming1 is the process of creating programs to solve specific problems and is one of the core steps in software development. Programming usually relies on a programming language as the tool used to express solutions. The process commonly includes analysis, design, coding, testing, and debugging. A programming language2 is a formal language used to define computer programs. It is a standardized way of communicating instructions to a computer, allowing programmers to describe data precisely and define what actions should be taken under different conditions. The earliest programming languages predate computers themselves and were used to control Jacquard looms and self-playing pianos. Since then, thousands of programming languages have been created, and new ones continue to appear every year.
-
Why should you learn programming?
Because programming is a foundational skill you need to master if you want to keep learning in technical fields. It is the first major step toward everything that comes after.
-
Competitions: Programming contests can improve coding skill, logical thinking, creativity, and teamwork. They also give you a stage to demonstrate ability. More importantly, they can open doors to scholarships, graduate-school recommendations, and hiring advantages.
-
Graduate school entrance exams: Many students plan to pursue graduate studies to deepen their expertise and improve academic credentials. Programming is a major part of that path. It is not enough to know syntax. You also need to solve practical problems involving data structures, algorithms, operating systems, databases, and more. Competition is strong, so programming ability matters a lot.
-
Employment: For most people, employment is the ultimate goal. Programming is one of the most essential and central skills across software development, system maintenance, cybersecurity, AI, cloud computing, and many other fields. Your programming level directly affects both your competitiveness and your salary.
-
And much more.
In short, programming is one of the most important fundamental skills for competitions, graduate study, and employment, and it is also a powerful way to create value. That said, interest is still the best teacher. If you genuinely enjoy programming, many of the reasons above matter less, because enthusiasm helps you push through difficulty. If you have curiosity and potential, and you keep practicing, you can absolutely reach your goals.
-
2. So How Should You Learn Programming?
Here are some general suggestions:
-
Build a strong foundation. The foundation of programming starts with language syntax and basic concepts such as variables, data types, operators, control flow, and functions. These are the building blocks that help you understand different languages and styles.
-
Use online resources. This is one of the best ways to learn. Classes and textbooks often cover only the basics. If you want deeper understanding, you need to make good use of online courses, online books, and technical communities.
-
Read books. Programming has many classic books, such as The C Programming Language, C++ Primer, Introduction to Algorithms, Computer Systems: A Programmer’s Perspective, Code Complete, Refactoring, and Design Patterns. Books help you understand both technique and style more deeply.
-
Practice by writing code. This is the most important part. Watching videos or reading books is not enough. You need to type code yourself, debug errors, and optimize your work. The simplest form of practice is solving programming exercises on online platforms. Joining contests is also a great way to measure yourself and understand the gap between your current skill and where you want to be.
-
Learn your development tools well. Editors, compilers, debuggers, and profilers all improve your efficiency. Among them, the debugger is especially important. A debugger helps you inspect variables, program state, and errors while your code runs. Many people consider debugging skill the real point where you become a true beginner programmer rather than someone who only knows syntax.
-
Handwrite code sometimes. The value of this becomes clearer over time. Writing code by hand can strengthen logic and memory, and it also helps with exam preparation and interviews.
-
Read other people’s code, but do not plagiarize. Studying existing code is a great way to learn style and problem-solving approaches, but copying without understanding defeats the point.
-
Improve your English reading ability. This is essential. The syntax and vocabulary of programming languages are largely English, and most official documentation and tutorials are written in English as well.
-
Share and discuss. Talking through problems with classmates, teachers, or friends is one of the best learning methods. Discussion helps you understand techniques better and can also expose you to new ways of thinking.
-
And more.
In short, learning programming requires steady practice, reflection, accumulation, discussion, and continuous improvement.
3. What Can You Do This Summer?
The earlier sections explain why programming matters and how to learn it in general. This section focuses on what you can do during the summer before or at the start of your studies.
-
Define a clear learning path. In the first semester, many computer-related majors study C Programming. In the second semester, they often move to Object-Oriented Programming (C++). That is why C and C++ are common starting points:
- C and C++ are foundational languages that help students understand how computers work, including memory management, pointers, and data structures.
- They are widely used in many fields such as operating systems, games, graphics, and networking.
- They have influenced many other languages, so learning them makes Java, Python, C#, and others easier later.
In the following year, many students study data structures. There is a famous saying in computer science: Data structures + algorithms = programs. It comes from Niklaus Wirth’s 1976 book Algorithms + Data Structures = Programs. The idea is that every program can be described and implemented through data structures and algorithms. Data structures determine how data is organized, and algorithms determine how data is processed. Choosing the right ones improves efficiency and reliability while reducing complexity and development cost. For a more concrete C/C++ path, you can refer to the Bilibili article Fish Pi’s C++ Learning Roadmap.
-
Study Weng Kai’s courses on Chinese University MOOC: Introduction to Programming - C and Advanced C Programming except for the graphics-specific chapters. Together, they form the official MOOC companion for a common first-semester C course. Their main focus is C syntax and the core principles behind it. The instructor, Weng Kai3, is one of the best-known MOOC teachers in China in this area. I personally learned C Programming through his course and later found that his explanations were much more detailed than the textbook, especially when it came to understanding the ideas behind the syntax.
-
Become basically comfortable with a good C/C++ development tool. Development tools mainly fall into two categories: code editors and IDEs (Integrated Development Environments). Beginners are often told to start with an IDE because it works out of the box, but IDEs are also heavy, complex, and often full of features you do not need yet. Code editors avoid many of those problems, are more extensible, and usually support multiple platforms more gracefully. For that reason, I recommend Visual Studio Code4, the free cross-platform editor from Microsoft that is widely used by developers worldwide.
VS Code supports syntax highlighting, intelligent completion, refactoring, built-in terminal access, Git integration, themes, keybinding customization, and an extensive extension marketplace. Based on a Stack Overflow developer survey, it has long been one of the most popular development environments in the world. Some concrete advantages include:
- Cross-platform: It runs on Windows, macOS, and Linux.
- Lightweight: Compared with full IDEs, it is faster and uses fewer system resources.
- Smart: It offers IntelliSense, syntax highlighting, formatting, and refactoring support.
- Customizable: Themes, fonts, shortcuts, editor behavior, and more can all be adjusted.
- Extensible: A large extension ecosystem adds support for many languages and runtimes.
- Broadly applicable: It works for web development, cloud development, data science, machine learning, IoT, and general editing.
- And more.
In short, VS Code is an excellent editor and more than suitable for beginners. What matters is learning how to configure and use it well. If you need help, you can refer to my other article, Visual Studio Code (VS Code) - C/C++ Getting Started, which is based on relevant parts of the official VS Code documentation. I also updated it heavily based on reader questions and newer AI-assisted features to make the setup process smoother.
-
Practice with the Beginner Problem List for Syntax and Algorithms. Once you finish the “Week 2: Calculations” part of the introductory C course, you can start. The importance of practice cannot be overstated.
4. More Resources
-
Online programming practice platforms
-
Online programming communities
-
Programming contests listed in the 2023 National College Student Competition Analysis Report (the Ministry of Education recognized 84 national student competitions)
- ACM-ICPC International Collegiate Programming Contest
- China Collegiate Computing Contest - Group Programming Ladder Tournament
- Lanqiao Cup National Software and Information Technology Talent Competition
- Baidu Star Programming Contest
- Matiji Cup National Vocational College Programming Contest
For more contests, you can also read another blogger’s article: Which competitions should computer science students join?.
-
Source-code hosting platforms