Abstract: How to become a Huawei technical expert.

  • The self-cultivation of a programmer
  • Author: Xu Hongwei

One night, when I told my wife that the department had asked me to write an article about “big guys talking about software,” she gave me a sideways look and said simply, “Linus wrote the original Linux kernel at age 21 and created the liberal open source world; Zhang xiaolong wrote Foxmail at the age of 28 and sold it for 12 million yuan in 2000. Big jia, I have known you for so long, but I still don’t know what outstanding achievements you have made.” I swallow lamentably. “Ok, I’ll reorganize my language. I need to write an article about software…”

Looking back on the past six months, the appointment of software chief engineer and software experts, as well as Mr. Ren’s announcement of “Comprehensively improving Software Engineering Capabilities to create credible high-quality products” at the beginning of the New Year, all of us software engineers who have written codes for more than ten years are excited. I joined the company in 2006 and almost participated in the whole life cycle of Huawei 3G controller products. I witnessed the magnificent process of Huawei 3G from its start, rise, improvement in the depths of the soul, peak and decline. I was fortunate to join the big family of 5G Development Department at the “advanced age” of 35.

I’ve been working in coding for over a decade, working as a developer, TL, MDE, MDEL, SDM (Cloud Team), Committer, Software Specialist, and more. However, I know very well that I, not a big cow, have been engaged in coding this “high-risk” profession for more than ten years but have not been “sacrificed to heaven”. What I rely on is the self-cultivation of a programmer — solid basic software ability, careful work attitude and tireless pursuit of technology.

What does good code look like?

I remember being one of the winners of the “Golden Code award” for the first time a few years ago. Is it because the code is cool? And it isn’t. The code I selected followed simple principles: simplicity, clear logic, single function responsibility, and reasonable data structure design. It doesn’t use sophisticated coding techniques, and it doesn’t apply design patterns. Just like the company’s latest C/C++ programming specification, it prioritises writing simple programs. Clean, logical code that is easy to read and maintain, and that is later modified as requirements change, but never introduces online problems.

Of course, simplicity doesn’t mean you don’t have to think about it, it does mean you have to think about it before you write code. Once, the project team assigned me to do performance optimization. It took me three weeks to find the most critical factor causing performance deterioration by repeatedly analyzing hot spot functions and testing and comparing performance differences under different traffic models. Finally, I decided to adopt optimization measures to modify the backup mechanism and reduce the backup data. These code changes are very small and simple, but the actual optimization effect is very good, to meet the needs of business development in the next few years.

Consider another example where CPU load increases after a site upgrades to a new version. After nearly two weeks of research, I finally located that the new version added the operation of reading DB kernel directly in the business processing process. Read DB kernel directly, code processing is simple, but also normal business functions, but the performance is very poor. If you take a step further in the development process and use caching, you can make a huge difference in performance and better code.

It is often said that the only constant is change, customer requirements are always changing, and our code can change either passively or actively. It is the eternal pursuit of software engineers to design software architecture that can be expanded and automatically adapt to the changing needs of customers. That’s easy to say, but hard to do. We need to constantly accumulate business knowledge, expand the scope of knowledge, be diligent in thinking, identify the future evolution trend of technology. We can’t build an omnipotent architecture from the start to encompass the future’s kaleidoscope, and even if we could, the pace of delivery may not allow for it. A design that meets the needs of the business now and for some time to come may be the most appropriate.

Practice solid basic skills

Writing good code, and consistently writing good code, requires a deep understanding of technical principles and business logic. The prerequisite is to have a solid programming foundation, that is, basic software ability, such as basic data structure and algorithm, compilation principle, etc.

At the end of last year, I attended an Internet architecture conference together with several software experts in the department. AI, blockchain, Internet of Things, cloud, middleware and other fashionable, hot, tuy-related issues are very many. What I didn’t expect was that the most popular topics were basic software design, architectural design, and evolution. Like martial arts novels to write the same, good basic skills, good internal skills, no matter what subtle moves, will be handy.

In addition, some programming habits, if you stick to them, can be very useful for improving your programming skills. Such as the use of shortcut keys, valid code comments, naming rules, code style, etc. Every time I write code, in addition to pursuing good code, I always think about software optimization, whether it can use less memory, whether it can have better performance. Paying attention to every field in the data structure, every small code optimization, can lead to unexpected results. For example, last year when we did a performance optimization, we changed a dynamic memory request in the process to a static memory pool and accidentally got a performance improvement of 30 CAPS (calls per second).

A single line of code

Some people say, why can’t I write good code when I know everything?

Many developers, because of personal habits, rush time, external requirements are not high for a variety of reasons, especially at random programming, directly Copy-Paste. I think programmers should develop uncompromising programming habits and rigorous programming attitudes just like pursuing quality of life.

I’ve always been treading on thin ice when it comes to codebase. Before going to the library, I will repeatedly look at the code I have modified, see the context of the modified code, and compare the code before and after modification. Once the code is in the library, look at it a few times to make sure everything fits in as expected. After entering the company for so many years, I have never combined, missed or wrongly combined any line of code.

You may think I’m making a mountain out of a molehill, but the truth is, this is a painful lesson that has happened in history. After we upgraded the new version in one country, we found that the user access success rate deteriorated, which was finally attributed to a line of code deleted by mistake. In hindsight, the developers themselves can’t remember why this line of code was removed. On another occasion, a line of code was deleted by mistake, resulting in a change in a key KPI indicator: the number of soft switch statistics. The department described the two incidents as “one-line code tragedies” that had a negative impact on product brands, customer impressions and individuals.

Afterwards, everyone wondered, we have pair programming, code review, developer testing and other very sound development processes, and MDE (module designer) review as the “gatekeeper” before the code on the library, why did such a low-level error occur? Is the process not implemented in place, or is MDE negligent and not properly closed?

In the IPD 2.0 revolution, the company borrows from the Committer operations of open source organizations to strengthen our Committer mechanisms and culture. The 5G Development Department has also selected and appointed a group of committers, and I am honored to be one of them. When I first started Committer duties, I wondered: Isn’t this a new overlay on the ROLE of THE MDE, presenting things that the MDE used to do “privately” through Committer statistics?

However, after a few months of experimentation, I came to understand that Committer is a cultural change that pushes people to improve their software capabilities. Committers have a lot of responsibilities, and as the last checkpoint before submitting code, this is a practice that works in the current under-staffing phase, but should eventually be watered down. Involvement in pre-code software design, ongoing architectural care, and technical debt clearing gives everyone a greater chance to write better code, which I think is Committer’s greater value.

As individuals and organizations improve their software engineering capabilities and build automated test shields and change walls, the aforementioned one-line disaster can be avoided.

How reliable is the “change wall”?

For most of the older employees, especially those in wireless 2G/3G/4G departments, when it comes to change control, it’s a nightmare. After version upgrade, KPI deterioration is not allowed. In serious cases, version rollback, customer complaints, and accidents may occur. When KPI becomes better, in addition to explaining to customers, there may also be business risks, and customers will feel that they have suffered losses before. The real world is so harsh to us, who let us influence the world of communication software engineers, they are deep love, responsibility cut ah!

We develop a release that involves hundreds of thousands of code additions, modifications, or refactorings. In addition to good design, pair coding, code review, and testing, I think the key to not introducing change issues is a good automated fence. In 3G, I and two colleagues expanded the IT test project from just a few hundred use cases to tens of thousands. Comprehensive scene coverage, strict cell validity check, perfect use case failure judgment mechanism, no blind corner of the resource leakage check and other means, so that the change of mistakes can not hide, leaving a change protection wall for 3G.

IT and PC-ST test cases were added to the development process not to improve code coverage, but to automate protection. And to achieve the premise of automatic protection, is that each use case has a perfect validity check, otherwise the protection net is a mere figure. A few years ago, I joked to a colleague: “I will intentionally correct a line of code to see if your added use case can be checked out.” To my surprise, despite the delivery crunch, he still spent an extra half day perfecting the use-case validity check and asked me to intentionally change the wrong code to experiment. In the end, of course, he was so well prepared that I couldn’t see the problem. What an egoistic programmer!

Be curious about emerging technologies

Speaking of the pursuit of programmers, I also recall a product cloud project I participated in in 2016. I was responsible for the scheme design of flexible and flexible characteristics. Before that, I had been engaged in embedded software development. Although the product had changed several generations of hardware during this period, and experienced the decoupling process of product and platform, system and software and hardware, I was basically ignorant of the concepts of servitization, micro-servitization and cloud.

Do not know how to do, can only be “standing on the shoulders of giants, for my use”. Brother product line is not already done, then find them to do peer assistance; Don’t you have signposts and plans? Look for references in their limited materials. Amazon cloud of the Internet, Ali cloud is not a very mature plan, then download their product manual and user guide…… During that period, I felt like I was possessed. I frantically learned related technologies of distributed software and absorbed energy from all aspects for my own use. Finally, I came up with a satisfactory design scheme for myself and the project.

It also made me fully aware of the shortcomings of my previous focus on products, systems and subsystems. As a programmer, in addition to improving our basic software capabilities, we should also always keep curious about emerging technologies and pursue them tirelessly to broaden our horizons. The capabilities and demands in this regard are even more so in the 5G era.

The current network security problems huawei 5G is facing, although there is a great political factor, but also reflects the strategic significance of 5G from the side. Ultra-high speed, ultra-high connection number, ultra-high reliability and low latency put forward higher requirements for our software to deal with delay, reliability, security, toughness and other aspects. At the same time, the vertical industry applications carried by 5G, the opening of interfaces and the “white box” of hardware will also pose greater challenges to our current knowledge and technology system.

The company plans to spend five years to comprehensively improve software engineering capabilities, which is both a test and an opportunity for us. Uniform programming specifications, clean code, clean and elegant architecture, different people have different pursuit, we need to have the determination to persevere, stone through stone. Five or ten years from now, when we look back, we will realize that it was worth it. As the famous scholar Wang Guowei of the Qing Dynasty put forward the third of the three realms of reading: “In the search for her thousands of degrees, suddenly look back, the man is in the lights dim.”

Perhaps most of us will never become gods like Linus or Zhang Xiaolong. However, we can be an educated programmer, and participate in the development of Huawei 5G products that change the world, leaving our own excellent code in the history of human communication, fortunately.

About Fundebug

Fundebug focuses on real-time BUG monitoring for JavaScript, wechat applets, wechat games, Alipay applets, React Native, Node.js and Java online applications. Since its launch on November 11, 2016, Fundebug has handled more than 1 billion error events in total, and paid customers include Google, 360, Kingsoft, Minming.com and many other brands. Welcome to try it for free!

Copyright statement

Fundebug



Blog.fundebug.com/2019/04/25/…

Are your users experiencing bugs?

Experience the Demo
Free to use