Home > Common Problem > Legendary programmer Zhihu Wheel Brother, I knelt down after reading this

Legendary programmer Zhihu Wheel Brother, I knelt down after reading this

Release: 2023-07-26 17:14:11
forward
1116 people have browsed it

# About the Author:


vczh, whose real name is Chen Zihan, is known as "Brother Wheel" because his personal information on Zhihu reads "Professional Wheel Builder". vczh interned at Microsoft during his college days and joined Microsoft immediately after graduation. I started at Microsoft Shanghai and later entered Microsoft Research Asia in Beijing. Now he has moved to Seattle, USA, and works as an engineer in the Office team.


People used to often ask me how to get to Microsoft. In fact, I had never thought about this question, so the answer at that time was naturally Microsoft's advertisement (good in programming, good in mathematics, and good attitude). When I was a senior in college in 2009, the U.S. subprime mortgage crisis happened to hit us, which made it even more difficult for those of us who wanted to go to U.S. companies to be exploited. Fortunately, I passed five tests and defeated six generals, and finally managed to stay after the internship. The cause and effect of this obviously cannot be determined in the few days of the interview, so we have to start from hello world.


Middle School


## I have been fortunate enough to learn programming since the second grade of junior high school. At that time, the world was already at a modern level. Operating systems had virtual memory, graphical interfaces, the Internet, development software, and integrated development environments. As some old timers described, compiling a program required changing disks several times. The days are completely different.


It was half a year after I bought my computer, and I was very curious about everything I saw. In addition, my father didn't agree with me playing games at that time, so I was thinking about making a few games myself, so that I could do it openly. played. So when I heard that Shantou Overseas Chinese Middle School was offering Visual Basic 5.0 classes, I felt quite excited. But the level of excitement can be ignored compared to the day when I was overly excited for my first computer class and rode my bicycle so fast that I bled a lot and lost a few teeth.


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


It was still the first year of the 21st century, when Internet access was extremely expensive and Google had just started and almost no one knew about it. Learning to program was much more difficult than it is now. When I was looking for knowledge, the Internet was basically hopeless, so I developed a hobby of going to bookstores.


It didn't take long for me to find a book called "Visual Studio Advanced Graphics Programming Tutorial". I like this book very much. The illustrations are very beautiful, and they are drawn using Visual Basic programming. I can't put it down. Unfortunately, the content was too advanced, so later there were stories about how I learned rudimentary three-dimensional analytic geometry by self-study in the third year of junior high school, and how I didn’t listen to the lectures in class in the third year of high school and only relied on my own mathematical analysis, but I later understood it.


In the middle, I tried to use programming to draw many complex graphics and perform various complex transformations on images, so I had to deduce long formulas on paper before writing a program. If the running result of the program is wrong, there is no way to debug it, so we have to re-derive it, hoping to find a few bugs in the formula to explain why the error occurred.


From then on I became very good at symbolic arithmetic. Moreover, whether doing math and physics homework or deriving formulas through programming, there are too many things to calculate and I am too lazy to look for scraps of paper everywhere, so I gained the ability to mentally calculate complex processes (unfortunately, I have lost it now). This incidentally also brought me a benefit, that is, I mentally calculated all the answers to the multiple-choice mathematics questions in the college entrance examination within 10 minutes after the papers were handed out and I was not allowed to write, and they were all correct.


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


After doing graphics programming for a long time, I remembered my original ideal, so I started playing games. At that time, I saw "Heroes of Mana" developed by the Chengdu Golden Pin Working Group, which ignited my enthusiasm for developing RPGs. After experiencing several failures, I finally completed all the coding work for "Tiandi Zhuan" on the first day of the first lunar month of my second year of high school, and uploaded it to the GameRes website not long after.


This is my first program with over 10,000 lines. In order to complete it successfully, I realized a lot of truths, including why it is object-oriented and why it is necessary to divide modules to reduce interdependence. This also became an opportunity for me to later develop my own graphical interface and script engine. Later, I tried to use OpenGL to make 3D games, but because it was difficult to find artists with common interests to work with me, I gave up. But this gave me a lot of time to invest in the graphical interface and script engine.


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


Later, I came up with the idea of ​​explaining high-level languages. This was the first turning point in my entire programming history. At that time, I only used linked lists for data structure, and I had never heard of compilation principles or design patterns. It was naturally more difficult to explain high-level languages ​​at that time. Therefore, after many days of hard thinking, I came up with a method now called one-pass compilation (which is also very bad) to reprocess a simple high-level language into a simple instruction set language, which is similar to assembly.


I was already in my senior year of high school at that time, so I actually didn’t have much time to devote to programming, so the first prototype I made was a simplified Pascal interpreter, developed in Delphi. Thinking about it now, there must be a lot of memory leaks and performance issues, but I didn't know what these things were at the time. During the three months of idleness after graduating from high school, I redesigned this thing and got a plan of dozens of pages. Since I didn’t have time to finish it, I printed it out and took it to South China University of Technology.

# University


Just a few days after entering college, I heard from a senior sister that our class teacher, Mr. Chen Jian, teaches compilation principles, so I showed her this stack of paper. She didn't say anything (looking back now, I can only say that the design was really unsightly...), and gave me a textbook on compilation principles. I finished reading it quickly, and then used the knowledge inside to make the first real script engine. The syntax copied some simple parts of the Java language, and also added a function that automatically changes the template parameters to The syntax of the Object type is named Jove. Later, I took a Java class and found that Java actually did this, which made me feel very strange.


Later, I wrote many script engines one after another. Jove, which I built when I was a freshman, was the first scripting engine that I thought was still popular. The second one is the dynamic language developed in my junior year after failing in my sophomore year and learning a lot of lessons. The name is Free (can be found on my blog http://www.cppblog.com/vczh). Recently, it is planned to update it to 3.0 to cooperate with GacUI, a graphics card accelerated GUI class library under development. Next, during the period when I was interning in the WCFTools group of Microsoft Shanghai, I completed a pure functional language called KernelFP every night, which later became my graduation project.


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


After submitting my graduation project, I completed CMinus within a few months before graduation. This is not the extremely simple CMinus designed in the Compilation Principles course, but a complete C language compiler (the syntax of function pointers has been changed by me, but it is still supported). The compilation result is a piece of X86 binary code saved in memory. The starting address of the function can be forced to be converted into a function pointer and used directly in the C program. This is because I followed some of the rules in Visual C when generating instructions. The convention is clearly described in MSDN.


After graduation, I ambitiously built NativeX, a C language with generics and concept mapping. A few months ago, I tried to copy C#, but C# was too complicated, so I turned to GacUI. I have also written a lot of graphical interface (GUI) class libraries. After developing two control libraries for RPGs in high school, two GUI libraries developed using OpenGL in college failed. Later, the Windows API (Vczh GUI) was also encapsulated, trying to make its ease of use close to VCL or WinForm.


After graduation, I tried to release a rendering-based GUI several times and changed the architecture several times. It was not until the GacUI I am developing now that I felt that I was on the right track. One conclusion I came to in this process is: the design of Windows Presentation Foundation is really perfect... In addition to doing these things, I also developed three software rendering programs for three-dimensional objects. The first two were done before graduation. , the last one was developed a year ago because I didn’t know how to use my spare time to enrich my life. It was developed to kill time.


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


Here I think I can answer a question that I could not answer well a month ago from my junior brothers and sisters. How can I find a job at Microsoft? Because I wrote all the things I did above on my resume. At the same time, if you don’t ask this until your senior year, it’s already too late...


It is worth mentioning that since my junior year, I have been coaching a student from a software college who had almost zero foundation and was two grades below me to learn programming. In order to let the other party have a solid C foundation, proficiency in unit test writing, and be able to intuitively come up with some not too bad designs after receiving my 3-year training, I reviewed a lot of content about C, especially for I have been preparing for several pointer classes for several days, and there is an assignment every day. During this process, I deeply felt that if you want to quickly improve your programming level, you must always do something that you can do, but it is so difficult that you can't do it if it is just a little bit more difficult. If you persist like this for several more years, you will definitely enter the ranks of masters.


Therefore, in the process of arranging homework, I deliberately postponed the content about pointers. First, let the other party accept variables and branch loops, then develop a good style (for example, you can't always name variables with one letter, etc.), then learn to operate arrays, and then the next step is about pointers without forced type conversion. A few operations, and within a month I made a string class with unit tests. The key point of pointers is to have the other party deeply understand the concept of "the pointer itself is a number pointing to the position". For this purpose, I specially designed (but did not implement) an assembly language with only one global infinite-length array to explain some complex concepts behind pointers. After that, there is some knowledge about object-oriented, design patterns, and things related to script engines.


The student's graduation project is a simple dynamic language script engine, and the implementation of the script engine correctly runs a list processing function library that I imitated Linq on. This implementation of closures is layered one upon another, adding deletion functions to an object everywhere, and creating various delayed execution iterators, which can test the implementation of a script engine. The other party was recruited by NetEase after graduation and was given some humane care in terms of treatment.


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


My programming journey includes not only the programs I did in my spare time, but also the process of internship and work at Microsoft. When I was in high school, I heard about the Microsoft Club at South China University of Technology, and I also had a certain yearning for Microsoft. Therefore, after enrolling, in addition to the student union of the college, I have been paying close attention to the Microsoft Club. Recruit new members and ignore all other societies. But to be honest, my work in the Student Union and Microsoft Club was just a sideshow, and I never did anything serious.


When I was a sophomore in college, when the Microsoft Search Technology Center (STC) came to the Microsoft Club to collect resumes, I met Teacher Chen Jian on the road, the class teacher mentioned before, and told her about this matter. Later, I gave up because the other party said that I was too young, because all the others were graduate students. When I was a junior in college, teacher Chen Jian mentioned to me that she could ask old classmates to help me submit my internship resume at Microsoft, so I received a phone interview from Microsoft Shanghai in March 2008. There were two phone interviews. The first time was with an HR person, and the second time was with a software engineer. During the second phone interview, we talked about Free mentioned above, and also had a passionate discussion on some data structure and framework design issues. Within a few days, I received the interview notice and went to the Zizhu Digital Information Port in Minhang District, Shanghai for an interview. That was the first interview in my life.


# Internship


Microsoft's interview arrangements are accurate to the second, which is much more user-friendly than some companies and will not waste hours of other people's time. There were three rounds of interviews for the internship, and all conversations were in English, although only one of them was a foreigner. I still vaguely remember that when I was interviewed by that young foreigner, I was too nervous and failed to give the optimal answer to a simple question. But they finally let me join a Microsoft WCF Tools team in Shanghai as an intern.


This team has a software development manager, Mr. Ge Ziang, whom I respect very much. Mr. Ge is a person who loves agile and often devotes himself to its practice. During my 4.5-month internship, he taught me a lot about software engineering, and the most important thing that benefited me a lot was about unit testing.


In addition, I also experienced rapid iteration, Scrum meetings, pair programming, and multi-person collaborative development processes based on a source code version management system (we used TFS). After modifying PetShop to create a WCF demo for the TechEd conference, fixing bugs for the WCF development tools of Visual Studio 2010, and developing a highly scalable configuration file editor, I ended my internship at Microsoft in December 2008. . After this internship, my ability to control source code has also been improved, and it is directly reflected in the code quality of the projects I develop in my spare time.

# Become a regular employee


# Before the internship ended, I was offered an interview as a full-time employee (FTE). The situation was very serious at that time. The 2008 subprime mortgage crisis in the United States officially affected Microsoft Shanghai in October, and the company decided to reduce the number of full-time employee recruitment during that period. I was interviewed for a permanent job in November, and this incident made me very nervous. Later, Mr. Ge said that his personal suggestion was that he hoped that I would stay and continue working after graduation, which gave me reassurance.


There are a total of five rounds of interviews for interns to become full-time employees. What impressed me very deeply was that in one round, the interviewer asked me a lot of very complex questions, and finally asked me a question about online updating of clue binary trees, but I can’t remember the specific content. I just remember that after I spent a long time finally thinking of a correct algorithm, the time was over and there was no time to write code on the whiteboard. Later, I finally passed the interview, and one of the few places was finally taken away from me. However, I heard that restrictions will be relaxed in a few months and it won’t be as difficult as it was during my interview.


During the internship and interview process, I felt that many courses offered by the School of Software of South China University of Technology were actually very useful, especially those about data structure, design patterns and software testing. These are very useful knowledge at work, and it is also necessary to continue to accumulate experience in these things in future work. It's just that because the college has a large number of students, and a new college always lacks some teachers, many of my classmates said that it is difficult to understand the role of the content mentioned in the textbook. Presumably things are much better now than they were in those years.


# Microsoft SQL Server


It took dozens of days from the end of the interview to the time I got the offer, and the final notification from HR finally arrived on New Year’s Eve. In the next six months, I continued to do my own thing in school, occasionally participating in a few activities to introduce experience, etc., and going out to play with some people. After graduation, he went to Shanghai Microsoft. Something happened in the middle. Due to the quota change, although I took the offer of WCF Tools, I was finally assigned to the SQL Server group. I did not receive a notice before that. Since I don't like databases and have very little understanding of SQL Server, I spent a year and a half developing SQL Server Management Studio (also known as the legendary "interface"). During this period, I spread some knowledge about unit testing, interface development, design patterns, Linq and syntax analyzers with my colleagues.


This year and a half of experience has made me grow a lot, mainly because compared to internships, when I work formally, I always have to have passionate and extensive exchanges with other teams, companies, ethnic groups, countries and species, and it also takes up a lot of time. A lot of time. Sometimes I have to fly to the United States to experience the superiority of socialism. The interface part of the formal software is very complex. Not only does the DPI change of the operating system and the localization process (most of the content is to translate the text on the interface into other languages), the layout of the interface needs to be automatically adjusted so that some text cannot be lost. Or only half of the buttons are displayed, and various disabled people (especially those who have lost vision) must be taken care of. Some runtime interfaces must be provided for some self-drawn complex content so that the automatic testing team can complete their tasks. work.


  Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


This experience made me feel how difficult it is to develop a rigorous interface. Another feeling is about demand changes. The existence of design patterns is to resist changes in requirements. I could not understand this truth until I started working. You must design the architecture of a software so well that after large-scale changes in requirements, your code as a whole can still be beautiful, easy to modify, performant, and safe. Every change can't be a patch, you always need to refactor to make your code as a whole good at any moment. In order to achieve this goal, you need to be proficient in and use design patterns to develop projects.


One of the rare advantages of Microsoft compared to other companies is that it will give you a lot of time to slowly complete the software. And this good definition, of course, focuses on functionality and maintainability. If a piece of code uses a very sophisticated method to complete a task at high speed, but is so complicated that it cannot be understood by subsequent maintainers even if the comments are written all over, then the code has no practical value. A good piece of code does not lie in how clever its design is, nor how advanced its algorithm is, but in that it can be developed by thousands of people at the same time for 10 years, and in the process of continuously adding functions, it will not become too confusing. This resulted in the need for rewriting.


Job hopping


Later, I applied for a personnel transfer to Microsoft Research Asia (MSRA) for some reasons. In January 2011, after getting approval from my manager, I went from Shanghai to Beijing to attend an interview at the institute. There are still five rounds of interviews this time. This interview was difficult. One of the interviewers found a lot of things related to compilers on my resume and decided to ask me to implement a strncpy function. The requirement is that the number of CPU accesses to memory should be the minimum. This involves various issues such as bandwidth, alignment, and binary byte shifting operations. The method itself is already very cumbersome, and mistakes are always inevitable when writing code on paper, so I still don't have time to finish writing the entire program. Another interviewer, a foreigner, also did some compiler work when he was young. What surprised me was that he did not ask me any questions during the interview. Instead, he talked about various algorithms and problems with compilers. In one hour, basically all the knowledge I knew was revealed because I had to answer the questions. I then developed a deep friendship with this man.


I was approved for transfer shortly after. After doing some finishing work, including establishing unit testing standards for the SQL Server team in Shanghai, I went to Beijing in April 2011 and officially became a member of Microsoft Research Asia, doing some work related to distributed systems. Research.


# Microsoft Research Asia


## The work of the research institute is quite special, mainly because I have not participated in any long-term projects and have always worked with a few researchers. The first project is mainly a dynamic analysis project to determine whether a C/S architecture program will deadlock and provide some reports to help programmers understand the root cause of the problem and further modify and debug their own programs. Later, I followed them to build an image search engine and distributed graph database. Before leaving, I helped them build several crawlers to enrich the data of Microsoft's own knowledge graph project, etc.


In the past few years in the institute, in addition to gaining some technical knowledge and learning how to become a veteran, the main technical growth still comes from the projects developed by myself. The structure of the institute is very suitable for programmers like me who like to play with complex (but not necessarily new) technologies. Moreover, my direct boss at the institute was Zou Xin, which made me deeply understand how important a good leader is.


It’s been four and a half years since I wrote it. The original intention of writing GacUI was to make an IDE for my own language, but it was fun to write a parser in C. I had previously experimented with projects in which UI was written in C# and smart prompt algorithm was written in C.


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


Later, I simply thought, how great it would be if the whole thing could be written in C. But the C GUI library's support for MVVM is rubbish, so GacUI came into being. But the workload of making a GUI library is really a bit heavy, and I pursue a good development experience, so I have been working on it for so long. 1.0 should be released this year...


By developing GacUI, I not only straightened out the experience and lessons of the 7 Heavenly Kingdom GUI libraries I had built over the years, but also learned how to develop cross-platform client programs at the minimum cost. In fact, writing a cross-platform program is not difficult at all. I don’t know why there are so many people on the Internet making a fuss about it. Another benefit that GacUI brought to me is that I basically reviewed all the content of design patterns, and because of its huge size, I also made a small tool that specifically implements partial order dependencies between different git repos - used to The C code under an entire repo is packaged into two files so that it can be used directly by other repos. I originally wanted to try submodule, but submodule can only implement tree dependencies, which is really bad.


GacUI finally reviewed the compilation principles learned before. Because in the process of compiling XML, GacUI actually translates everything into the bytecode of a script engine. In the end, it either runs the script directly or translates the script into C (under development). Therefore, in order to achieve this, it is inevitable to write a compiler, and the compiled things must be able to communicate with the classes on the C side, so I reviewed the content of COM again (although I did not use it, I just tried Made the same thing).


After the C generation is completed, I will continue to write GacJS that I started last year, move GacUI to the browser, and run my IDE in all aspects. The areas where C is suitable are vast and profound.


# Going abroad


Legendary programmer Zhihu Wheel Brother, I knelt down after reading this


## I have to say that I switched jobs to the Research Institute because I didn’t like databases. As a result, the Research Institute saw that I came from SQL Server and made a lot of database stuff for me. Later, I asked my boss if I could do something else? The boss asked me what do you want to do, and I said try to get some compiler stuff? So my boss later arranged for me to work for another research institute to create a query language for a distributed graph database. But this kind of thing is super simple to begin with. After finishing it quickly, I became a database developer again. So this made me understand a truth: most research institutes don’t have anything I like.


So after a few years, my dissatisfaction with Beijing (primary) and the institute (minor) gradually increased, so I quickly got a wife and got involved. In fact, it is the same as an ordinary interview:

1. Find the group you want to join


2. Contact him Boss, give him your resume

3. See if he is laying off employees or unable to recruit people due to economic crisis or acquisition cases


4. Then interview


5. Get the offer ( This is for sure)


6. Apply for a visa


This process made me sigh, the American interviewers just haven't seen the world. The pressure of competition is too low, and the questions asked are super easy. They have to come to China to stay and meet each other, otherwise the US imperialism will be pilled sooner or later. But I think another aspect is that the team that made cross-platform GUI for Office took a look at the GacUI I made. I guess they thought it was pretty good, so they casually interviewed me. This is also possible.


I have to mention here that Microsoft takes great care of its employees. It not only provided me with high-quality moving services, but also arranged an aunt for me after I arrived in the United States to help me integrate into modern society. He also said that if I felt that I was awesome and didn’t need these things, he would give me 20,000 dollars. Even at Google, these are only available to those who are forcibly arranged to go to the United States by the company (rather than employees who want to go abroad on their own). The most important thing is that Microsoft employees can get discounts on BMWs, which is really nice.


Although there is not much difference between the salaries of talented people in China and the United States, apart from the fact that housing prices in the IT areas of the United States are similar to those in Beijing, Shanghai and Guangzhou, other things except cars and electrical appliances in the United States are much more expensive. Overall, Generally speaking, happiness has declined. Fortunately, the air pollution in China's IT-developed areas is so serious that it not only offsets this shortcoming, but also made me feel better off if I was poorer. So since I jumped over the wall, I have been living a life where I no longer have time to play with electronic products. I drive when I have time and go to work when I don’t. It’s so fun.


Sure enough, pigs can fly if they stand in the wind. Obviously wages in other industries are much lower in China than in the United States, but the gap for programmers is only 1-3 times. Sure enough, China still needs a large number of professional programmers with specialized training to fill the gaps in the development of socialism.


Microsoft Office


This time when I changed jobs, I happened to meet someone from Microsoft who wanted to fire people from Nokia. As a result, most of the teams had their quotas frozen. Only Office with deep pockets could recruit people, so I had no choice but to come to Office. Originally, my goal was to build a JS engine for Edge, or go to the VS group to build a compiler or something, but they were too poor, so I had to give up.


Working in Office was an eye-opener for me, and I experienced how software was created that was written by 10,000 people over 30 years, with a repo snapshot containing hundreds of gigabytes of code. Because the machine is too expensive, when you modify the code, you can only compile it locally. Therefore, the set of CI we created based on msbuild also includes the code of the lib/dll that needs to be linked if it is not in the hard disk. Go to the server to find the compiled cache of the current checkpoint, and download the compiled function. Therefore, on the days when the build farm occasionally hangs up, the local compilation cannot be done due to the disconnected network connection.


Ending


## Looking back at my programming journey, I probably started writing games during my student days, then writing game engines, then specializing in graphics, GUI libraries and script engines needed by game engines. Finally, due to my energy, I gave birth to GUI libraries and compilers. device. When I first designed the script engine, I paid great attention to the problem of how to pause the script - in fact, it was basically derived from the needs of the game - so human flesh made various strange implementations of coroutine. In the end, I finally learned the orthodox method, so the problem that could have been easily completed became a little more complicated due to the later requirements (to put it bluntly, it is to allow scripts to customize (or hack) coroutine-related type systems) content), resulting in the need for infinitely complex methods to implement coroutine. Why do humans hurt each other?


When I got to work, it was basically


1. I originally wanted to get Visual Studio, and I didn’t like SQL when I was a student, but when I was working, I got it due to the economic crisis. When it comes to SQL, the work includes learning professional database knowledge and dragging controls.


2. But after several years of working, I still felt I didn’t like SQL, so I switched to MSRA. As a result, MSRA tried their best to let me work on databases. s things. I didn’t even think about it, so I left just because I didn’t like doing this...


3. Later I thought okay, anyway, the compiler There's nothing left to do, so I'll just drag the control. So I told the people in Office, look at how awesome I am at making GacUI! The people at the Office said, Damn! So I was recruited to be responsible for the non-GUI part of the team.


4. After half a year, the boss started to arrange work, and I thought of a way to express that I still like to do other things. . So I finally started doing my old job - developing internal compilers for Office programmers.


Finally, I ended up doing the job I love.

The above is the detailed content of Legendary programmer Zhihu Wheel Brother, I knelt down after reading this. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:Java学习指南
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template