A guide to program design for freshmen majoring in computer science and artificial intelligence in the class of 2023 from a dean of computer science

This guide has a lot of content, but if you can read it patiently, you will gain a lot...

Welcome to the author's personal official homepage: Xi Xu's Personal Official Home Page

LOGO

1 About programming

  • What is programming and programming languages?

    Programming 1 (programming), or programming, is the process of solving a specific problem for a program, an important step in the software development process. Programming methods often use a certain programming language as a tool to give programs in this language. The program design process generally includes different stages such as analysis, design, coding, testing, and debugging. Programming language 2 (English: programming language), or programming language, is a formal language used to define computer programs. It is a standardized communication technique used to issue instructions to computers, a computer language that allows programmers to precisely define the data that computers need to use, and precisely define the actions that should be taken in different situations. The earliest programming language was produced before the invention of the computer. It was used to control the actions of the Jacquard loom and the player piano. Thousands of different programming languages ​​have been invented in computing, and new ones are born every year.

  • Why do you need to study programming?

    Because programming is a professional basic skill that you must master, and it is the first step to further learn other professional knowledge.

    • Competitions : Participating in programming competitions can improve your programming ability, logical thinking ability, innovation ability and teamwork ability, and it can also increase your sense of honor and self-confidence. There are many programming competitions (specific afterword), these competitions are a stage for you to show your talents, and more importantly, they are also an important way for you to obtain scholarships, recommend graduate students without examination, and give priority to employment.

    • Postgraduate entrance examination : Many of you will choose postgraduate entrance examination, because you hope to improve your professional and academic level through further study; those who graduated from non-double first-class universities can also improve your education through postgraduate entrance examination, so as to make up for the regret of college entrance examination. In the process of postgraduate entrance examination, programming is an important inspection content. It not only requires you to master one or more programming languages, but also requires you to be able to use programming to solve practical problems, such as data structure, algorithm analysis, operating system, database, etc. The postgraduate entrance examination is very difficult and competitive, so the ability to program design is crucial to the success of the postgraduate entrance examination.

    • Employment : Employment is your ultimate goal, because you hope to use what you have learned to create value for society. In the job market, programming is your most basic and core skill. Whether you are engaged in software development, system maintenance, network security, artificial intelligence, cloud computing and other fields, you cannot do without programming. The level of program design directly affects your employment competitiveness and salary level.

    • etc.

    In short, programming is an indispensable basic skill for you in competitions, postgraduate entrance examinations, and employment, and it is also an important means to show your talents and create value. In addition, interest is the best teacher. If you are interested in programming, then the reasons I listed above for learning programming are not so important to you, because there are no difficulties and obstacles that cannot be overcome. I believe that if you have the enthusiasm and potential for programming, as long as you study hard and practice, you will be able to achieve your goals.

2 So, how to learn programming?

Here are some general suggestions:

  • Lay a good foundation , the foundation of programming is programming language grammar. Learn the rules and basic concepts of programming language syntax, such as variables, data types, operators, flow control, functions, etc. These are the cornerstones of programming and will help you understand different programming languages ​​and styles.

  • Take advantage of online resources , which is an important way to learn programming. You can learn programming through online resources such as online courses, online books, online communication communities (specific afterword). Course books and lectures often only cover the most basic knowledge. If you want to learn and understand programming in depth, you need to take advantage of high-quality online resources.

  • Reading books is another important way to learn programming. In the field of programming, there are many classic books, such as "C Programming Language", "C++ Primer", "Introduction to Algorithms", "In-depth Understanding of Computer Systems", "Code Encyclopedia", "Refactoring", "Design Patterns" and so on. These books can help you better learn and understand programming techniques and styles, and can also help you better solve problems.

  • Hands on , that's the most important thing. Just reading books or videos is not enough, you need to type the code yourself, debug errors, and optimize performance. Only in this way can you improve your programming ability and confidence. The easiest way to practice is to practice programming problems, there are many such online practice platforms (specific afterword). In addition, you can also actively participate in various programming competitions, evaluate your own level, and understand the gap between yourself and others, so as to better improve yourself.

  • Proficiency in using development tools is an important way to improve your programming efficiency. You need to be proficient in using development tools, such as editors, compilers, debuggers, performance analyzers, etc. These tools can help you better write, debug and optimize programs, and improve your programming efficiency. Among them, learning to use the debugger is the most important. A debugger is a tool that can help you inspect and modify variables, states, errors, and other information during code execution. Learning to use a debugger will allow you to find and fix problems faster. It is generally believed that learning to debug is the real entry into programming.

  • Handwritten code , its importance will gradually be understood in the future. Handwriting code on paper can exercise your logical thinking and memory, and it can also help you prepare for exams and interviews.

  • Reference the code , but don't copy it. Referring to other people's code can help you learn and understand programming skills and styles, but you can't copy other people's code, because you will lose the meaning of learning.

  • Strengthen English reading ability , which is an essential skill for learning programming. The grammar and basic concepts of programming languages ​​are all in English, so you need to have a certain ability to read English in order to be able to learn and understand the grammar and basic concepts of programming languages. In addition, the documentation and tutorials of the programming language are also in English, so you need to have a certain ability to read English in order to be able to learn and understand the documentation and tutorials of the programming language.

  • Sharing and discussing is the best way to learn. You can share and discuss programming problems and experiences with your classmates, teachers, friends, and colleagues, which can help you better understand programming techniques and styles, and help you better solve problems. You can also participate in the programming community (specific afterword), these communities can help you learn and understand programming better.

  • etc.

In short, learning programming requires you to practice and think constantly, to accumulate and summarize, to share and discuss, to improve and improve.

3 What can you do in this summer vacation?

The above is to let you realize the importance of learning programming, and some general suggestions for learning programming. The following is to let you know what you can do during this summer vacation.

  • Clear learning path . The textbooks for the professional compulsory courses in the first semester of the freshman include "C Language Programming", and the textbooks for the professional compulsory courses in the second semester of the freshman include "Object-Oriented Programming Course (C++ Language Description)". The syntax of the C/C++ language is the main content of these two textbooks. There are several reasons why students majoring in computer science and artificial intelligence learn C/C++ first:

    • C/C++ are basic programming languages, they can help students understand how computers work, such as memory management, pointers, data structures, etc.

    • C/C++ are widely used programming languages, and they play an important role in many fields, such as operating systems, games, graphics, networking, etc.

    • C/C++ is a programming language that has influenced many other programming languages, and after learning C/C++, students can more easily learn other programming languages ​​such as Java, Python, C#, etc.

    The textbook for the compulsory course in the first semester of the sophomore year includes "Data Structure (C Language Edition)". "Data structure + algorithm = program" is a classic computer science adage, which means that any program can be described and implemented with data structures and algorithms. A data structure refers to how data is organized, and an algorithm refers to how data is manipulated. This sentence was first proposed by the American computer scientist Niklaus Wirth in the book "Algorithms + Data Structures = Programs" (Algorithms + Data Structures = Programs) published in 1976. This sentence emphasizes the importance of data structures and algorithms in programming, and also reflects the nature of computer science. Data structures and algorithms are the core content of computer science and the basic knowledge that you must master. Different data structures and algorithms have different advantages and disadvantages and are suitable for solving different problems. Choosing the appropriate data structure and algorithm can improve the efficiency and reliability of the program, and reduce the complexity and development cost of the program. For the specific C/C++ learning route, please refer to the column "Yupi C++ learning route one-stop! " .

  • Learn "Introduction to Programming - C Language" and "Advanced Programming in C Language" by Weng Kai on the Chinese University MOOC (except "Week 2: Basic Graphics Functions of ACLLib" and "Week 6: Interactive Graphics Design"). As a whole, they are the supporting official MOOCs of the textbook "C Language Programming", the most important professional compulsory course in the first semester of freshman year. The grammar of C language is the main content of this course. The course overview of this MOOC points out that "C language is an ancient and evergreen programming language. It has the basic requirements of modern programming. Its syntax is the basis of many other programming languages. It is still an irreplaceable programming language in the fields of system programs and embedded systems. It occupies the top two positions in various programming language rankings all the year round. This course is the cornerstone for subsequent courses such as computer composition, operating system, compilation principles, and architecture. A deep understanding of C language itself and even the basic principles of programming languages ​​​​should be mastered." Therefore, it is very important to learn this course well. Important, it is the basis for you to learn programming. The teacher of this MOOC, Weng Kai3 , has opened courses such as C language programming and Java language programming in the Chinese University MOOC. It is currently one of the courses with the largest number of students and the most active students. The author himself (replaced with "I" below) learned "C Language Programming" through Weng Kai's MOOC. After the school started, he found that Weng Kai's lectures were much more detailed than textbooks, because he would teach you how to understand the principles behind the grammar of C language.

  • Basic mastery of a development application suitable for writing C/C++ language . The development of application programs is mainly divided into code editor and IDE (Integrated Development Environment, integrated development environment, integrated development software service suite integrating code writing function, analysis function, compilation function, debugging function, etc.). For beginners in programming, you are often recommended to use an IDE because it can be used out of the box. However, because there are many components (unnecessary for you and me now), they often take up a lot of disk space and memory, which is a serious waste of system resources; because of complex functions (also unnecessary), their interfaces tend to appear very bloated, which is very unfriendly to you; and so on. Code editors not only do not have the above shortcomings, but also often have features such as scalability and cross-platform compatibility. Therefore, in this guide, I recommend you to use Visual Studio Code 4 , the most popular cross-platform free code editor developed by Microsoft among developers around the world . The software supports syntax highlighting, code auto-completion (also known as IntelliSense), code refactoring features in an extended way, and has built-in command line tools and Git version control system. Users can change the theme and keyboard shortcuts to achieve personalized settings, and can also install other extensions through the built-in extension store to expand the software's functions. In the 2019 Stack Overflow developer survey, Visual Studio Code was recognized as the most popular development environment for developers. According to the survey, 50.7% of the 87,317 respondents claimed to be using Visual Studio Code. According to my search results, some specific advantages of Visual Studio Code are as follows:

    • Cross-platform : Visual Studio Code can run on Windows, macOS and Linux without worrying about platform compatibility.

    • Lightweight : Compared with IDEs such as Visual Studio, Visual Studio Code is lighter and faster, does not require a lot of downloads and installations, and does not take up too much disk space and memory.

    • Smart : Visual Studio Code has built-in support for JavaScript, TypeScript and Node.js and other web development languages, as well as IntelliSense code completion, syntax highlighting, code formatting, code refactoring and other functions, which can improve coding efficiency and quality.

    • Customizable : Visual Studio Code can be set and adjusted according to personal preferences and needs, including themes, fonts, shortcut keys, editor behavior, etc.

    • Extensible : Visual Studio Code has an active open source community that provides thousands of extensions, which can provide more functions and tools for different languages ​​and runtime environments (such as C/C++, C#, Java, Python, PHP, Go, etc.), such as debuggers, testers, version controllers, etc.

    • Wide applicability : Visual Studio Code is not only suitable for web development and cloud application development, but also can be used for development in other fields and scenarios, such as data science, machine learning, Internet of Things, etc. It can be used as a workhorse development tool or as a code editor or text editor.

    • etc.

    All in all, Visual Studio Code is a very good code editor and totally suitable for you. All you have to do is to be able to configure (Visual Studio Code can realize almost all the functions of the IDE through self-configuration, and of course the functions that the IDE does not have, because it has the advantages of being customizable and extensible as mentioned above) and use it. You don’t have to worry about these, just refer to my other article "Visual Studio Code (VS Code) – Introduction to C/ C ++ " . After publishing in major IT blog forums, I got a lot of comments, many of which were problems encountered when configuring Visual Studio Code, and I basically solved them after answering them one by one. Recently, in order to make it easier for you to follow the article, I made the biggest update to the article based on all the questions in the comments, the newly released AI and other functions (I don’t recommend you to use it), and I also changed the order of the steps in the official document to make it more reasonable (some problems are caused by the improper order of the steps). The article pointed out that "this tutorial has a lot of content, but if you strictly follow this tutorial, you can easily get started with Visual Studio Code - C/C++, so please study this tutorial patiently and completely." In addition, if you encounter any problems, you can consult me ​​(click on the phone, and it will reply in seconds if nothing happens ) !

  • Practice [Beginners] Grammar Introduction & Algorithm Introduction Question Sheet . Once you've completed "Week 2: Computing" in "Introduction to Programming - C Language", you're ready to start. The importance of practice cannot be stressed again.

4 more


  1. Programming - Wikipedia, the free encyclopedia ↩︎

  2. Programming Languages ​​- Wikipedia, the free encyclopedia ↩︎

  3. Weng Kai- Zhejiang University Personal Homepage↩︎

  4. Visual Studio Code - Wikipedia, the free encyclopedia ↩︎

Guess you like

Origin blog.csdn.net/m0_73287396/article/details/131819532