Swoole Core Contributor: Twosee Interview: Seeing PHP as my first love and growing my hair for the epidemic
How many lecturers can there be at the GOTC Global Open Source Technology Summit? cool?
"The Art of Programming Language" sub-forum lecturer Chen Cao Qihao, a Swoole core contributor and a PHP core contributor born in 1997; is a code maniac, movie fan, science fiction fan, and FPS game enthusiast; his first love is also super cool ——PHP language is my first love. Without her, I would not be where I am today. Who would think that his girlfriend is not the best girlfriend in the world...
Without further ado, the interview officially begins:
Seeing your photos, this hairstyle is very personal. What are your usual hobbies? Let me introduce myself to you in detail.
My real name is Chen Cao Qihao, and my screen name is Twosee. I am the founder of the Swow project, a core contributor of Swoole and a PHP kernel contributor, and also a Swoole is a member of the kernel development team and the PHP kernel development team. Out of interest, in addition to the PHP community, I am also active in major open source project communities related to asynchronous network IO, and now I am also a contributor to the libuv project.
In the eyes of outsiders, I may just be a code maniac, but in fact I am still a movie fan, a science fiction fan, and an FPS game enthusiast. Although I am a skinny homebody, I will not die at home. I have excellent physical test scores and occasionally play games. basketball.
As for this unique hairstyle, it was actually a flag set during the epidemic. There will be no haircuts until the epidemic is over. But as the epidemic situation becomes more and more stable in China, even now I have completed the vaccination and my hair has been cut short for some time. I think this is also a very happy thing.
I feel like your English name is also very personal. What is the special meaning of the name Twosee?
My real name is Chen Cao Qihao, and the initials of my surname are CC. Many classmates also call me that, so I came up with a name that is easier to register and is called Twosee (homophone Two C), which is two C means. A more interesting thing is that I didn’t expect that after taking this name for so long, the first person who directly guessed the meaning of my name was actually Nikic, the main contributor to the PHP kernel. He said that my name reminded him of the anime " The character C.C. from Lelouch of the Rebellion, which happens to be one of my favorite animes.
Do you think your best feature is "handsomeness" or "being able to write code"?
I myself hope that I can be a rich and interesting person, not limited to the labels given by others. In fact, many times I don't feel like a typical programmer. Before writing code, I wrote calligraphy, novels, comics, animations, food delivery, design, and products.
The reason why I write code is very simple, just because I wanted to make a system when I was in college. I designed and planned everything, but found that no one could write it for me, so I had to do it myself. I have been involved in so many fields, but I have been lucky enough to go further on the road of writing code. From this, I realized that choice is indeed more important than hard work, but only if we have enough accumulation, constant setbacks and trial and error, can we finally choose the right direction of effort.
When did you start learning PHP? When did you first contribute to the PHP core and what did you do?
I probably started formally learning programming from my sophomore year to my junior year (2017). The first thing I chose to learn was the PHP language. It can be said that PHP is my first love.
At the end of 2018, I submitted the first patch for PHP kernel repair. At that time, I was already an active contributor to Swoole, so I had done some research on various network protocols and accidentally discovered PHP’s MySQL client. When sending the request packet to the server, there were some unnecessary extra bytes at the end of the packet, so they were optimized.
Since my main focus has been on developing Swoole for a long time, in fact, the amount of code I contributed to the PHP kernel is relatively small. I personally prefer to submit some relatively technical patches. Sometimes modifying a line of code requires a sufficient understanding of many aspects of the PHP kernel, which is very time-consuming. Later, during a daily PR, I was suddenly invited to join the official development team. I think this is a high honor and recognition for me, so until now, I try to take some time to pay attention to PHP every day. Kernel related developments.
"Is PHP the best language?" Why?
The spread of this meme can be said to be quite widespread, and it has even gone out of the circle, because I am often asked this question by people around me, and most of them are not programmers. I would like to take this opportunity to answer this question carefully.
I have read many programming language experts’ evaluations of PHP. Without exception, they all think that PHP is a bad language. Corresponding to this problem, the sentence "PHP is the best language in the world" has also become A slogan used by many people to mock PHP.
PHP’s early language design not only had many flaws, but also left a lot of historical baggage. Moreover, it is not dominated by any large companies with strong financial resources, but relies entirely on contributions from open source enthusiasts around the world. There is neither stable economic support nor sufficient publicity resources.
But at the same time, it is undeniable that, despite this, PHP is still one of the most popular programming languages, and the long-term achievements of the PHP community are obvious to all: PHP 7 makes most PHP applications almost free Huge performance improvements have been achieved; PHP 8's JIT has arrived as promised, greatly enhancing PHP's computing performance; with the active participation of more and more language experts from the community, PHP's language features have been greatly improved.
PHP has now been officially redefined as a universal scripting language. PHP is no longer just WordPress. It also has a series of modern ecosystems such as Composer, Symfony, Laravel, Swoole, Hyperf, etc. Three days after leaving, I am even more impressed - many people still look at the current PHP in the same way as they look at PHP5 or even earlier versions of PHP, which is unfair.
Being able to discover the original shortcomings also means that PHP has more room for improvement in the future. In addition, I think a good way to measure whether a language or an open source project has a future is to see whether its community core maintenance team is active. In the past few years, I have seen many popular open source projects, but they all died suddenly due to the sudden departure of the core maintenance force of the community, leaving only chicken feathers on the ground. But if you subscribe to the PHP official mailing list or follow the PHP framework community, you will find that you don’t need to worry about this at all. The influx of new blood and active and intense discussions have continued for twenty-five years. This is The best proof.
In short, PHP is by no means the "best language" in the sense of this issue, but PHP is always moving forward persistently on the road to becoming a better language, which is also a responsibility and responsibility .
So why do many PHP programmers still say "PHP is the best language in the world"? I think some people have been hacked too much, so they might as well join in and start hacking themselves. I think these PHP programmers are gentle and cute. They are confident enough and don't mind others joining in. Everyone is happy. There is also a part of me that feels that the PHP language is my first love. Without her, I wouldn’t be where I am today. Who would think that their girlfriend is not the best girlfriend in the world? In comparison, it is shameful for many people who pick up their bowls to eat meat and put down their chopsticks to scold their mothers.
Finally, another interesting thing I want to mention is that the slogan "PHP is dead" is as popular as this question. This slogan was born together with the PHP language in 1995.
How did you get connected with Swoole? As a core contributor, what percentage of your contribution to Swoole is now?
When I was in college, the various systems in the school seemed to be products of the last century. The academic administration system always crashed when there was a rush for classes. I thought these systems were so bad that I couldn’t even write a single one. Better than that. So from then on I started to teach myself programming, and then used PHP to write a new unified system for the school that unified all the old systems in the school. Then I went to talk to the leader of the school network center, and finally got the school's permission, but I had to I figured out a way to promote it throughout the school. Because the new system was so easy to use, it created a word-of-mouth effect. Soon, more than 80% of the undergraduates in the school were using the system I wrote every day.
But as I deepened my understanding of network programming, I discovered that the C10K problem is indeed not that simple. The PHP-FPM stand-alone service is also unable to handle the high concurrency of rushing for classes. At this time, I discovered the Swoole project, so Start learning.
In fact, most of my early contributions to Swoole were the result of accidentally discovering and fixing Swoole kernel BUGs when I was developing applications with Swoole. Most of my contributions to PHP are the result of accidentally discovering and fixing bugs in the PHP kernel when I was developing the Swoole extension.
I think many programmers have the potential to become contributors to open source projects, but when they encounter bugs in open source projects, few of them choose to fight to the death. This makes me feel that it is a pity.
In the past few years, I have done a lot of reconstruction and optimization work on the Swoole kernel. I am one of the main developers of the Swoole coroutine version. I am currently the largest contributor to the Swoole project besides teacher Han Tianfeng. In addition, I think that the contribution of open source projects can not only be based on code submission. Version management, community maintenance, document writing, answering questions, etc. are also very important. These tasks are not as easy as contributing code. I think many friends who want to contribute to the Swoole open source project but have no idea where to start can start working in these directions. In the process, their understanding of the kernel will gradually deepen, and code contributions will come naturally.
In July this year, Chen Cao Qihao will serve as a lecturer at the "Art of Programming Languages" sub-forum at the Global Open Source Technology Summit GOTC, giving a keynote speech on "What's New in PHP 8".
PHP 8 brings a lot of new features such as JIT, annotations, union types, named parameters, etc. This also means that PHP 8 has better performance, richer syntax, and more powerful types. Security support. And quietly, PHP 8.1 is also on the way, and the introduction of enumerations and coroutines adds another bright color to the PHP world.
After having JIT, has the road to PHP performance optimization come to an end?
With the arrival of coroutine features, how far is PHP from a complete coroutine programming system?
Will Event loop, coroutine Hook, and CPU scheduling technologies that have been proven in Swoole be introduced in the future?
Perhaps everything has just begun, and there is still an endless sea of stars ahead...
This sharing will bring you the latest news on the continuous iteration of PHP.
In addition, the "Art of Programming Language" sub-forum will also invite front-line experts in the industry of mainstream programming languages such as Java, PHP, Rust, C, etc. to share relevant programming language knowledge for developers in different technical fields. The latest trends and in-depth analysis of the domestic development trends of major programming languages.
GOTC, the Global Opensource Technology Conference, the Global Open Source Technology Summit.
The conference was initiated by the Open Source China Community and the Linux Foundation. It invited 10 heavyweight open source foundations and open source communities to participate in depth, covering the relevant open source experience of 100 companies and involving 300 outstanding open source projects.
The experts who make up this open source event are mainly well-known figures in the field of open source. Related sharing topics also focus on open source, including open source technology, open source operation and governance, open source development trends, and the practice of open source technology. , commercialization of open source, etc.
This conference also unprecedentedly invited the heads of several top open source foundations in the world to participate in a round table to discuss the new open source ecosystem.
Linus Trovalds, the founder of Linux, will also share his journey and open source insights since the birth of Linux 30 years ago.
Related recommendations:
Recommended learning : "PHP Video Tutorial"