How to become excellent engineers? Tencent Daniel brings these reflections

https://zhuanlan.zhihu.com/p/68012293

REVIEW: This article is an expert engineer Liu Tencent ultra-author, we publish authorized by this article, take you through the thinking behind a senior engineer, I hope for your inspiration.

We're in, we have called for the farm yard, but our line and Agriculture far cry; we have called for the programmer, but our work is not just in the writing process. We prefer to call themselves: engineer.

We like the division of labor in this line and traditional industries, it was designed to do, it was the foundations, the framework was done, it was done pouring, some people do art. We build high-rise buildings in the virtual world, to change people's lives, change the world.

The face of rapid changes in the world, we have confusion.

If in order to ensure that they can continue to create value and maintain the core competitiveness? Although the technology has been changing, but the attitude of doing things, is indeed always the same.

In the process of self-cultivation engineers, the need to always keep three kinds of attitude: a sense of ownership, the pursuit of excellence, argumentative.


Ownership

VS ownership screws

I have heard a career point of view: "choose a small company is the ability to exercise, choose a large company is to do the screws."

In a small company stage, there is no sense of ownership is not enough. Because the number of people on so many, and we are exploring, nobody knows how to take the next step.

In large companies it stage, there is a team Leader, leader, looked as if indeed "bear the responsibility of someone else, someone else planning program," feel at ease with a screw like.

But now the overall human resource environment does not allow engineers only screws. There are at least three things can not only meet the engineer driving the screws: First, job classification, the second is the performance and the third is the movement of persons.

In most scenarios, as Leader of employees like to have a sense of ownership. Because a person's energy is limited, it is impossible to think, plan all the things that need someone to help its share those concerns.

A mature team, there must be a mature pyramid-like structure. Every intermediate node backbone of the pyramid, you need to have the ability to work independently, they can share those concerns for the team, to assume responsibility, take the initiative to do things, is the owner of the project.

Ownership attitude to work

Engineer their products, but also with the products, often Tucao products. With ownership point of view to think that if a product so that users are not satisfied, as an engineer should be how to provide a better way to improve?

Engineers need help with product manager to try a variety of ideas quickly trial and error; need to be able to give a more comprehensive analysis of user behavior from the point of view of data, ancillary products judgment.

Even in some places there is no detectable product manager, the initiative put forward their own proposals. Often the knowledge structure engineers and product managers are very different, it is likely there will be a product of cognitive blind engineer needs to make up.

In depth study trend, many products are driven algorithm. Angle to think like owners, engineers should do in depth learning environment? The algorithm is a drive to dismantle the product, in addition to learning section depth, as well as distributed storage, distributed computing, streaming calculated, distributed search, data mining, high-performance distributed service, network security, and other consumer products feedback channel and so many, many aspects to consider.

Engineers are not playing as a deep learning aid, but to help the depth of learning to function better in the product.


The pursuit of excellence

Most of the engineers in the choice of work, there is a demand, "wants to progress." Some engineers and I have complained in the past that he was a team because of certain reasons, to be a waste; I had to answer is if has a "pursuit of excellence" in the spirit in which it will not be a waste. Because the "pursuit of excellence" is a personal attitude.

Continuous learning is its own thing

We live in the era of information explosion, but why in the fastest growing industry. Almost every year new technologies emerge, then they may quickly obsolescence. Internet industry, is really riding a boat behind.

So we have to learn. The goal of learning, there are several sources: the latest paper, the latest open source technology, community technology updates.

For researchers, read the paper are commonplace. But for engineers, many people do not know to read the papers. In fact the papers every year engineering direction very much.

And some of the classic works direction of the article is not easy to date, such as GFS. Every engineer has an obligation to know the latest information in the field of their own lies, while reading the paper is a good way.

Thank Github, open source technology has to a concentration camp. Project high-star review on Github and discuss the formation of the community, they are worth a visit. Even the classic idea of ​​reconstruction after a new open source, there may be a new look. For example ElasticSearch, they use technology and nothing special, distributed storage, Lucene is a very old thing. The reassembled to a elasticsearch easier to use, it is very easy to use, very bright.

国内现在技术社区非常多,个人比较喜欢的是CSDN和知乎。CSDN是大杂烩什么都有,知乎上经常有一些牛人整理好的某个方向成熟、有条理的好文。常混社区,了解现在流行什么,大家都在讨论什么,有助于开拓思路、开拓视野,获得灵感。

建议大家看一看周围4级以上的同事,看看他们是怎么学习的。如果比你优秀的人比你更努力,那你该怎么做?

打80分还是100分

我们如何衡量一个系统的好与坏?大多数情况下,一个系统满足了现有需求,就是一个好系统。但是在实际工作实践中,并不存在一个“需求封闭集”,需求永远在变。

一个优秀的系统,必定是一个可发展的系统,可以应变的系统。如果给“完成现有需求”打80分,那么“考虑未来需求”才可以给系统打上100分。

有些工程团队发声,手上的事情已经做无可做,想要做新的事。这让我非常的惊讶。怎么可能“做无可做”?

现有工作已经做到非常“卓越”了吗?考虑一下功能可扩展性、考虑一下性能可扩展性、考虑一下运维的复杂性、考虑一下可迁移性和可复制性、考虑一下节省计算资源、考虑一下我们的竞争对手是怎么做的?

在系统中去发现优化点,去探索新技术将其引入系统中。永远不满足于80分,去做100分,是追求卓越的态度。

 


追根究底

知其然也须知其所以然

大家在工作中是否遇到过如下几个问题:

  1. 因为历史原因,某程序大家都在用,运行很稳定,但是没有人读过源代码。
  2. 某个服务,缓慢内存泄漏。于是写了脚本,每天低峰期定时重启。
  3. 线上报警多了,通常情况下报一阵子自己就恢复了。
  4. 线上模型修改了某个参数,效果突然就变好了。

如果单纯只看结果,可以知其然不知其所以然,不去深究。这些问题就像是不定时炸弹,可能一直不出问题,也可能在未来的某个时间引爆,影响了工作。积累的类似问题多了,炸弹引爆的概率就会越来越大,偶然变成必然。

我建议大家能够以追根究底的态度去面对每一个问题,在追问题、解决问题的过程中,会学到书本上学习不到的内容,技能(通过实践掌握)得以成长。

下面我举几个案例:

案例一:我追过一个线上偶发Coredump问题。因为Coredump后实例会自动重启,而线上同时有几十个实例,所以优先级不高。

在忙完手上高优问题后,我专门找了一个晚上仔细追查。最后查到是主程序依赖了某个库X的a版本,而动态链接库依赖了该库X的b版本,在某个特定处理逻辑下因为不同版本逻辑不一致会导致Coredump。从那以后,我在使用动态链接库的时候就会非常小心,一定会排查一下主程序和动态链接库的编译依赖,尽量保证主程序和动态链接库在同样的环境下联编。

案例二:线上某个服务缓慢内存泄漏,所有使用指针的地方都是shared_ptr,常规代码Review无法发现原因。

于是我采用了“代码二分查找法”,注释掉程序一半的逻辑,mock掉程序所有后端,然后使用压力工具发压力。最后发现是部分缓存数据在异常情况下缓慢增长,且永不过期导致的。

案例三:线上某个服务,在序列化和反序列化过程中,C++ Client的反序列化很稳定,而Golang通过cgo调用C++ lib的时候反序列化很不稳定。

经过排查代码发现C代码实现里的序列化/反序列化过程是将一段内存直接赋值给了一个结构体。因为内存管理过程中,Golang和C++差异,导致了对这块内存的解析存在不稳定偏差。

每次追问题都学习到了新的知识,并且知道在未来遇到类似情况该怎么办。积累下来的经验与技能,将成为了一个工程师的核心竞争力之一。

Bug侦探

追问题有如探案一般,都是根据现有线索去追寻“真相”。计算机程序的世界是完美的逻辑世界,每个问题、现象都能找到原因。

先要有逻辑的信念,然后要有追根究底的态度,下一步需要的就是具体的“探案”方法了。

前面提到了一个“代码二分查找法”,在很多场景下都适用。还有其他有效的方法:

  1. 善用各类工具:包括但不限于:代码阅读工具,版本管理工具,代码检查工具,压力测试工具,性能分析工具,内存泄漏检测工具。
  2. 常用原则:看到递归就要想到用循环去重构;看到循环就要考虑是否会死循环;看到数组就要考虑是否越界;看到指针就要考虑是否正确析构;看到多线程就要考虑是否线程安全;看到频繁内存申请就要想到内存池。
  3. 了解内在原理:函数调用时栈的状态;对象析构的时机;高级语言中的可变对象与不可变对象;Map/Set/HashMap的存储结构;Map Reduce的原理;文件分布式存储的原理;画出完整的模块关系图和数据流图。
  4. 不放过任何Warning/异常:写出无Warning的代码,包括编译的Warning和各种检查工具的Warning;合理打印Warning日志。
  5. 善用搜索:能够从国内/外站中搜索问题。
  6. 记笔记:将每一个问题的追查过程记录下来,定期回顾与分享。

追根究底的产品观

追根究底的态度不仅仅适用于问题追查,产品上也是一样的。数据浮动的背后是用户行为的变化,这个变化可能存在某种诱因。

熟知的诱因有周末效应、月末效应等,但还有很多诱因是不知道的。对数据、对用户行为追根究底,有可能发现某个新的产品突破点。

Guess you like

Origin www.cnblogs.com/focus-z/p/10991291.html