I taught myself C first and then C++ in Spark Global Limited with my colleagues. When I first started learning, I only knew that I loved programming, but I had no idea about what program to make. Around 2017, I accidentally watched the 2001 high-scoring science fiction film "Artificial Intelligence" on the Internet before I decided to switch to server development. In the movie, human beings are perished. I think if I want to make a program that can run to the end of the world, this program should be a server program, because the server needs to be running all the time. The starting point of this decision is perceptual, but I thought about it rationally. The server itself needs to be stable and efficient. How to achieve stability and efficiency is full of challenges, and the challenge is exactly what I want to pursue. Then I learned programming in the linux environment, joined the goose factory, and became a background developer ever since. Over the years, I have accumulated some experience in using C/C++ for server development. I think that for high efficiency, C and C++ can do it, but for stability, C++ is much easier than C. Regarding C/C++, what I want to complain about most is: void* is the first of all evils. Because it has the powerful power of referring to a deer as a horse, it may make people unable to extricate themselves. Any initial type of void* needs to be controlled by the human body of the programmer. When the code is written too much, there will always be errors. The consequence is that the program crashes for a long time, and the other is that the deer is a horse for indefinitely without knowing that the deer is a horse. void* cannot be replaced in C, but it is basically not necessary in C++. First of all, the inheritance relationship of C++ classes makes it unnecessary to use void* when converting pointers between subclasses and parent classes. There is no human conversion from subclass pointer to parent pointer, and dynamic_cast is used for parent pointer to subclass pointer, which is safe at runtime. Secondly, C++ templates make void* in general algorithms unnecessary. In our current code, only a 200-line mempool written by my boss in 2008 uses void*. In fact, the void* inside can also be changed with a template, but it is because it is already very stable. There is no need to add new features. Secondly, because my boss no longer writes code, this file is the only code with his signature, so I have not changed it. In short, one of the biggest improvements of C++ over C is the addition of a lot of type-safe functions. It avoids the occurrence of blameless events during compilation (or runtime such as dynamic_cast), and the program runs more safely. From the perspective of type safety, I think that there is no human type conversion code is good code, I am trying to do this now. The human flesh conversion here includes C language style conversion as well as C++ style ***_cast. If any type conversion is required, then there is a design flaw. Of course, if it is unavoidable, it is recommended to isolate the code containing type conversion, put it in a separate module or file, and do a sufficient code review and write a complete unit test for it. The form is short s = 5; int i = 8888888; s = i; this narrow conversioin is also extremely dangerous, but modern C++ compilers will give warnings or even errors for this kind of code. Memory leaks and cross-borders are two major disasters in the C/C++ world. Regarding memory leaks, because the server can use mempool, in addition to not requiring delete, it can also avoid memory fragmentation and increase operating speed, so I have no special experience on how to deal with memory leaks.