为C++的switch添加case的字符串匹配

The switch in the C++ standard cannot implement string case matching, but we often have this need, so let’s implement it.

Read more »

总结我的几个编码习惯

At the beginning when writing code, I always rolled up my sleeves and got to work as soon as I encountered a problem, essentially writing code while debugging and simultaneously designing the solution flow. However, this approach is simply too slow, often leading to writing and deleting code, effectively resulting in a poorly designed code structure requiring refactoring, which wastes a lot of time.

Read more »

读《C++语言的设计与演化》及一些疑问的解答

C++ Language Design and Evolution is a book written by C++ author Bjarne Stroustrup, discussing the thought process and trade-offs from the conception and design to the actual implementation of C++. It is arguably the only book on the market written from the perspective of a language designer on language design.

There are many issues where we should not only know How, but also understand Why, as this allows for a deeper comprehension of the subject. Fortunately, “C++ Language Design and Evolution” is precisely that kind of book. Recently, I realized many aspects of C++ that I only knew How but did not understand Why (too much was sacrificed for compatibility with C), and this article serves as a reading note and a record of Why, which I will gradually organize.

Read more »

动态内存和智能指针

Smart pointers, as one of the most important features of C++11, were originally recorded in C++11 Syntactic Sugar, but this part is so important that I have recently been relatively free (逃) and decided to summarize it in detail separately.

Read more »

Source Insight插件与配置

Recently, I’ve been experimenting with a few development-related tools that can be considered artifacts. As the saying goes, “A workman must sharpen his tools before he can work well.” I’ll take some time to organize and write about it.

Read more »

使用VisualGDB在VS上编写Linux程序

As a C++ developer and Linux user, I often write code on Linux. Recently, I discovered VisualGDB (a VS plugin), which is a fantastic tool that allows me to write and run programs directly on Linux from Windows! The debugging experience is even better!

Read more »

在VPS上部署shadowsocks服务

In the past few days, I helped a colleague set up a VPS for proxy use and organized some related materials along the way. This article is not aimed at beginners. Before reading the following content, you should first have a VPS that can access the external network (foreign network), and secondly, you should have some basic knowledge of Linux operations.

Read more »

学习C/C++的一些书籍和工具

From the time I began learning C language to now, it has been five or six years, during which I have read quite a few good and bad books, tried many tools (the holy war of compilers/editors), and here I will summarize everything in detail. After messing around for a long time, I have come to a kind of thought, which is different from the “take-it-for-granted” mindset; it is an experience of “doing it yourself.”

Read more »