From entry to "proficiency" in C++, I hope you can walk around the pit I stepped on

1 C++ development direction

  • laboratory development

C++ is definitely the No. 1 language among engineering students. C++ has both process-oriented and object-oriented features. It has both excellent running speed and good large-scale project development capabilities. It can simply dominate university laboratories.

  • Backend development

After learning C++, the first choice is of course to interview for a background development position.

  • Client development

It requires a solid programming foundation and computer theory foundation, and may also be familiar with Windows/C++ compilation and linking mechanism, QT client development technology system, Windows message mechanism and other technologies.

  • Audio and video development/multimedia development

Big platforms are making short videos, and they are also constantly accessing various live broadcast modes. In this trend, the development demand for audio-video/multimedia direction is getting wider and wider. This direction is more inclined to specific scenarios, such as players, such as live broadcast platforms, such as audio and video special effects.

  • game development 

After mastering the basic syntax of C++, it is still a good choice to develop games. At present, industrial-level 3D game engines are still written in C or C++. Although it is impossible to complete a huge online game by personal ability, it is still a very good choice to start simple, write some small games, and then gradually deepen, step by step, and finally join a large game development team. The corresponding jobs are mainly game development engineers, game engine architects, etc.

  • Embedded Development 

C/C++ also has a very large employment direction, which is to do embedded. Embedded itself may be a little bit more hardware-oriented, but what you do now is a matter of soft and hard. Embedded development will also involve network programming, concurrent programming and so on. The popular explanation may be that the embedded code runs on other small systems, not on the traditional computer. In addition to programming ability, this direction also requires basic circuit theory literacy.

  • artificial intelligence

Artificial intelligence, machine learning and other directions are also indispensable to the C or C++ language. It needs to be emphasized that although the C++ language can be engaged in a wide range of directions, it is not enough to just master the C++ syntax. The above-mentioned application areas of the C++ language are the foundation. Entering these fields requires further in-depth systematic study of knowledge in related fields and contact. Contents of real enterprise projects.

2. C++ grammar foundation

The first is the introductory stage. In addition to basic loops, variables, and judgments, you need to master at least these:

  • pointers, references, arrays, memory

  • Difference between reference and pointer

  • Virtual mechanism: virtual function, virtual function table, pure virtual function

  • Some differences between C and C++, such as the difference between new, delete and malloc, free

  • The role of some keywords: static, const, volatile, extern

  • Four type conversions: static_cast, dynamic_cast, const_cast, reinterpret_cast

  • Implementation principles of some STL containers, such as vector, deque, map, hashmap

  • Class encapsulation, construction and destruction, static members, object management;

  • Class construction (parameter constructor, no-parameter constructor, copy constructor, default constructor) and destructor;

  • Object dynamic management, friend function, friend class, operator overloading;

  • Analysis of C++ compiler object management model;

  • Operator overloading (unary operator, binary operator, operator overloading difficulties, operator overloading in project development);

  • Template specialization, partial specialization, extraction of traits skills

  • Inheritance, virtual inheritance, diamond inheritance, etc.

  • Polymorphism: dynamic binding, static polymorphism

  • rewrite, overload

  • The principle of smart pointers: reference counting, RAII (resource acquisition is initialization) ideas

  • Smart pointer usage: shared_ptr, weak_ptr, unique_ptr, etc.

  • Compile and link mechanism, memory layout (memory layout), object model

  • Some new features of C++11, such as rvalue references, perfect forwarding, etc.

Recommend a github for learning C language/C++, sharing C language/C introduction, learning route, e-book recommendation and download, video recommendation, small projects, dry articles, written test interviews, C language/C++ specifications, open source projects, etc.

address:

C language/C++ learning platform https://github.com/tangtangcoding/C-CppLearning

Book Recommendations

"C++ Primer Chinese Edition" is a very friendly self-study textbook for beginners of the C++ language. The author clearly explained the basic concepts of C language and the programming details that need attention, and has rich routines and exercises. I believe that after reading it carefully, you can complete the goal of getting started with C language.

"High Quality Programming Guide", recommended by the wall crack, this book is quite enjoyable to read, there are some programming specifications in the book, it is still good for people who write programs, it can cultivate good coding habits, deepen the Consolidation of some knowledge. It is more practical, and it is also suitable for reading before the interview.

"Essential C++ Chinese Edition" is a little but very practical C++ introductory book, emphasizing quick start and understanding of C++ programming. This book focuses on a series of increasingly complex programming problems and the language features used to solve them. You'll learn not only the functions and constructs of C++, but also their design purpose and rationale.

"More Effective C++ (Chinese version)", the book is organized around 55 principles, each of which introduces a method that allows you to write better C++ code, and discusses it in detail with specially designed examples.

"Programming Techniques to Improve C++ Performance", this book believes that 20% of performance defects will take up 80% of our time. So we focus our energy on where it is most valuable. This book discusses in detail temporary objects, memory management, inheritance, virtual functions, inlining, reference counting, and the STL, all the details that might improve the efficiency of C++. Whether you are a practitioner in related fields, or a C++ programming enthusiast, or a programming enthusiast who is eager to break through the bottleneck of programming and greatly improve your self-cultivation, this book will surely benefit you a lot.

"Learning C/C++ from Defects" is essentially a set of C/C++ wrong questions. The entire book includes errors caused by 63 problems, the flaws in the title. It is also a guide to avoiding pits.

"C++ Templates Chinese Edition", a practical book for an in-depth understanding of modern C++ templates. Not only is this book an authoritative explanation of C++ templates, but it also provides an in-depth introduction to other general C++ ideas.

"Analysis of STL Source Code" provides a detailed understanding of the underlying implementation mechanism of STL, as well as a deeper understanding of common data structures and C++ memory management.

In fact, there are also "C++ Standard Library (2nd Edition)", "C++ Concurrent Programming Practice", "C++ Programming Ideas (two volumes combined)", etc. I have bought all the books introduced, but to be honest, the latter Several books are read in general, as reference books.

video

  1. Tsinghua University-Zheng Li-C++ Language Programming (Basic)

Tsinghua University-Zheng Li-C++ language programming

https://www.bilibili.com/video/BV1PA411b75a?p=92

  1. Teacher Hou Jie's Eight Parts:

  • Hou Jie C++ Standard 11 -14

  • Hou Jie STL and generic programming

  • Hou Jie C++ Memory Management

  • Hou Jie C++ object-oriented advanced development

  • Hou Jie STL and Generic Programming

  • Hou Jie's C++ Startup Revealed: The Life and After Death of C++ Programs

  • Chen Shuo's third set, Linux CC++ network programming practice - Chen Shuo 

Hou Jie C++ Video Complete Works and Network Programming https://mp.weixin.qq.com/s/302poB-agGUSepqNlmi9sQ

  1. QT video tutorial:

QT video tutorial

https://www.bilibili.com/video/BV1jK4y1m7d4

Data Structures and Algorithms

Book

If you want to learn data structure systematically, it is recommended to read "Dahua Data Structure", "Algorithm (4th Edition)" and "Data Structure and Algorithm Analysis".

If you are new to data structures, you can start with "Algorithm Illustration" and "My First Algorithm Book".

video

  1. Hao Bin data structure

Although it is relatively old, it is more detailed, easy to understand, and very friendly to beginners.

https://www.bilibili.com/video/BV1Ut411a7rN?from=search&seid=14411767501116137153

  1. Data Structures-Zhejiang University

The course was co-recorded by Chen Yue and He Qinming. Both station b and MOOC.com are clearer.

https://www.icourse163.org/course/ZJU-93001?from=searchPage#/info

  1. Data Structure and Algorithm Fundamentals

The course was recorded by Mr. Wang Zhuo from Qingdao University. It is very suitable for postgraduate entrance examinations and has many topics.

https://www.bilibili.com/video/BV1nJ411V7bd?p=1

more hands-on

Do it, do it, do it. Say the important thing three times.

Hands-on includes masturbation and "multi-painting"

Learn and draw. Because for the storage structure in the data structure, especially the tree structure and the graph structure, the storage structure is indeed more complicated, and it is inevitable that there will be disclosure only by spatial imagination, and many "pits" can often be avoided by drawing pictures by yourself. In the article with the algorithm, I will also add some animations.

Graph and visualize data structures. Get an intuitive feel for what a data structure looks like. What it's like to use it, what it looks like abstractly and concretely. That's the most important thing. And it is important and effective whether it is for simple queues, stacks or balanced trees. Draw the data structure and you can imagine it in your head. In short, all you need to do is to understand these data structures intuitively.

When learning some algorithms, you can also use drawing to deepen your understanding. You can draw pictures while reading the code, so that the implementation logic of the code can be clarified more quickly.

On the basis of understanding the storage structure and implementation logic through "multi-painting", beginners also need to "multi-code" to write the implementation code. For a certain storage structure or algorithm, it is difficult to achieve integration without three or more independent implementation processes.

In addition, you can write more questions on leetcode and Niuke.com.

computer network

Book

Called the bible in the field of TCP/IP. The author W. Richard Stevens, from the user's (programmer's) point of view, uses tcpdump as a tool to explain the TCP protocol, which is admirable. I am afraid that the designer of the TCP protocol is difficult to explain so well, at least not as patiently and meticulously as he draws hundreds of timing diagrams for sending and receiving packages.

Classic books, focus on the TCP/UDP part.

video

  1. computer network micro-class

https://www.bilibili.com/video/BV1c4411d7jb?p=1

  1. Han Ligang Computer Network Xie Xiren 7th Edition

https://www.bilibili.com/video/BV1gV411h7r7?p=1

database

Book

An introductory book that starts with an introduction to simple data retrieval and progresses to more complex content, including the use of joins, subqueries, regular expressions and full text-based searches, stored procedures, cursors, triggers, table constraints, and more .

Advanced books, classics in the field of mysql. Not only suitable for database administrators (dba) to read, but also suitable for developers to learn. Whether you are a database novice or an expert, I believe you can gain something from this book.

The sublimation book explains in detail the implementation principle of each functional module inside the InnoDB storage engine, which has important guiding significance for everyone to read and understand the source code of InnoDB. Read for all developers and DBAs looking to build and manage high-performance, high-availability MySQL database systems.

Other books:

"Database System Implementation", "Redis Design and Implementation".

video

MySQL_Basic + Advanced Chapter-Database-sql-mysql tutorial_mysql video_mysql getting started

https://www.bilibili.com/video/BV12b411K7Zu?from=search&seid=2779357081480449466

Principles of Computer Composition

Book

Deep Understanding of Computer Systems (Original Book 3rd Edition)

This is a very in-depth and directional book that every CS student should read. It will tell you, in order to become a good programmer, you should focus on understanding the underlying principles of computers.

Other books:

Principles and Design of Computer Composition.

video

  1. Principles of Computer Composition Liu Weidong from Tsinghua University lectures on national excellent courses in 58

https://www.bilibili.com/video/BV1c4411w7nd?p=1

  1. Principles of Computer Composition (Liu Hongwei, Harbin Institute of Technology) 135 lectures (full) HD

https://www.bilibili.com/video/BV1t4411e7LH?p=1

operating system

Book

This book is a classic in the field of operating systems, with comprehensive and detailed coverage, including processes, threads, storage management, file systems, I/O, deadlocks, interface design, multimedia, performance tradeoffs, and the latest trends in operating system design. . It not only covers the principles and practices of modern operating systems, but also pays special attention to Linux operating systems, Windows Vista operating systems, embedded operating systems, real-time operating systems, and multimedia operating systems. Therefore, it is also a collection of interview written test operating systems.

Other books:

"Restore the truth of operating system", "30-day self-made operating system".

video

  1. Operating System (Mr. Li Zhijun, Harbin Institute of Technology) 32 lectures (full) ultra-clear

https://www.bilibili.com/video/BV1d4411v7u7?p=1

  1. 2020 Nanjing University "Operating System: Design and Implementation" (Jiang Yanyan)

https://www.bilibili.com/video/BV1N741177F5?p=1

network programming

When I first started working, my first project was IoT backend server software. There are similar network service programs on the network, such as backend servers for instant chat software, online game servers, financial transaction systems, distributed mass storage for Internet companies, and microblogs. Internal broadcast notifications for posts and more. Of course, there are also transplants or maintenance of TCP/IP protocol stacks and so on on embedded systems.

  • Familiar with some network models, such as IOCP used under WINDOWS system. Epoll, select, and poll models used in Linux systems.

  • Familiar with some common libraries such as socket Server, RPC Framework

  • memory management. Overload new/delete, memory pool, object pool processing.

  • Memory leak detection, memory access out-of-bounds alert, and memory fragmentation recovery.

  • Pre-allocated pools reduce switching and scheduling, pre-processed thread pools and connection pools, such as database connection pools, etc.

  • Multi-process programming, multi-threaded programming

  • Five IO models: synchronous, asynchronous, blocking, non-blocking, signal-driven

  • Inter-process communication methods: semaphores, pipes, shared memory, sockets, etc.

  • Thread safety issues, lock handling, critical resources

  • Load balancing concept, data preparation and real-time calculation, if there is a time-consuming business, microservices and load balancing can be considered.

  • Timer, heartbeat, regular check for dead links, etc.

Book

It is important to have a foundation of networking and operating systems.

TCP/IP network programming

It is very suitable for beginners to learn, and the explanation of network programming is clear and straightforward. It is completely suitable for beginners to get started, and writes every step of network programming.

Classic books that are necessary for learning Unix, read important chapters, and can be used as reference books.

Process control, thread control, process environment, and process communication are particularly exciting, and the network part is relatively shallow, but it is sufficient. The whole book can be said to cover all aspects of Linux, and even very detailed.

This book is a classic work in the field of Linux server programming. From the network protocol TCP/IP, the core elements of server programming, Linux network programming API, advanced I/O functions, Linux server programming specifications, high-performance server programming framework, I/O multiplexing , signals, timers, high-performance I/O framework library Libevent, multi-process programming, multi-threaded programming, process pools and thread pools, etc., comprehensively explain the methods, skills and ideas of writing high-performance Linux server applications. It also includes two comprehensive cases, which explain the optimization of high-performance servers and the use of system monitoring tools from the perspective of actual combat.

This book is the work of Chen Shuo, focusing on explaining a programming model of a highly adaptable multi-threaded server, namely one loop per thread. This is the most mature mode for writing user-mode high-performance network programs in native language under Linux. After mastering it, various common server-side network applications can be developed smoothly. This book takes the muduo network library as an example to explain the usage and precautions of this programming model.

Video & source code

Recommend Chen Shuo's "Linux CC++ Network Programming Practice" and the open source library muduo

https://github.com/tangtangcoding/C-C- https://github.com/chenshuo/muduo

libevent is a lightweight network programming library based on event callback mechanism, which can support Linux, Solaris, Windows and other systems. It is written in C language and is more suitable for entry-level reading.

https://github.com/libevent/libevent

Asio is a network programming library in boost, written in C++ language. It uses a lot of boost data structures and techniques, including the use of a large number of templates, which has a certain language difficulty.

https://www.boost.org/doc/libs/1_75_0/doc/html/boost_asio.html

finally

If you find it helpful, give it a thumbs up! ! !

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324122455&siteId=291194637