ARTS-1

ARTS mind

  • Algorithm: The main program is to train and learn. At least a week to do a leetcode algorithm problems (start Easy to start, then Medium, and finally Hard). Training program, if you do not train your book look more algorithms, you still will not do arithmetic problems, after reading the book, you need to train. Leetcode do about the advantages, you can look at my article on coolshell the Leetcode training program - Cool shell - CoolShell .
  • Review: mainly to learn English, if your English is not, you basically missed the technical expert. So, you need to read and review at least an English technical articles, my personal favorite place to go is http://Medium.com (need a ladder), and each company's technology blog, such as Netflix's.
  • Tip: mainly to review and summarize the knowledge that you are often encountered at work. Learning at least one technical skills. Your problems at work, bit by bit knowledge stepped pit, learning.
  • Share: mainly to build your influence, can output values. Share ideas and think there is a technical article.

    Author: Chen Hao
    link: https://www.zhihu.com/question/301150832/answer/529809529
    Source: know almost
    copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

Algorithm

Given an integer array nums and a target value target, and ask you to identify the target value of the two integers in the array, and return to their array subscript.
You can assume that each input corresponds to only one answer. However, you can not re-use the same array element.
Example:
Given nums = [2, 7, 11 , 15], target = 9
because nums [0] + nums [1 ] = 2 + 7 = 9
is returned [0, 1]
Source: stay button (LeetCode)
link : https://leetcode-cn.com/problems/two-sum
the copyright collar button all the network. Commercial reprint please contact the authorized official, non-commercial reprint please indicate the source.

Using the dictionary hash ways to shorten the time to find the target element, a bit tricky.

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        nums_index = {}
        for i in range(len(nums)):
            nums_index[nums[i]] = i
        for i in range(len(nums)):
            num2 = target - nums[i]
            j = nums_index.get(num2)
            if j and i != j: #需要注意i和j不能相等,因为不能重复利用
                return [i, j]

Tip

1. lddAre you sure library file path dependence in question

ldd <file>See link library files of the case, to help troubleshoot missing dependencies. ldconfigMay be used to regenerate the dynamic link library cache /etc/ld.so.cache, the result is the output load order.

 linux-vdso.so.1 => (0x00007fffbb763000)
 libcudart.so.10.0 => /usr/local/cuda/lib64/libcudart.so.10.0 (0x00007fa9ef69a000)
 libcublas.so.10.0 => /usr/local/cuda/lib64/libcublas.so.10.0 (0x00007fa9eb104000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa9eaee7000)

2. Use the straceanalysis process time-consuming to track procedural issues

https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/strace.html

Review && Share

https://landing.google.com/sre/
the What IS SRE? Hear from Our SREs
video about a lot of Google's understanding of SRE SRE work, he answered some questions from users (many of which I doubt). Formal job for 16 months, title is SRE, recently felt dry live as a busboy, sigh ~, I need to think about their situation, think about how to change the status quo, think about their own growth, not really been "odd jobs" go ah.
SRE thing about the video is, in fact, "SRE Google operation and maintenance of the puzzle" are mentioned in this book, but I did classify and organize their daily work and compare.

What do SRE do?

Automation and elimination of trivia (Toil)

  1. Automation is not scripted, if the whole process was introduced in manual confirmation, will be the risk of introducing artificial operational errors, resulting in the efficiency of the entire process becomes low;
  2. Do not just assume chores, chores also going to destroy a person can live cover operation and maintenance chores are limited, if not reduced by automated tools, can lead to overload;
  3. The proportion of trivia (including oncall) is not higher than 50%, if a service alarm frequently, resulting in the need for frequent human flesh SRE operation and maintenance; then you need to re-examine the status of the entire service stability and SLO, and for unstable investment in human service needs tips to its stability; SLO if set too high, resulting in frequent alarm on an appropriate adjustment SLO; to reach the SRE service operation and maintenance requirements, SRE can opt out of the service operation and maintenance support (which requires SRE have enough words right)

These things have encountered in my daily work, but the recent trend has been more than six months have so, even if I was in a non-oncall time, will be surrounded by all kinds of trivia, some are necessary (I call it necessary chores, such as business logic in order, the police covered comb, but this part of the work because of problems changing needs, leading to repeated combing), some can be automated or simply human flesh filling system flow pit (which can be automated eliminated Toil, such as service manually drop with volume reduction, SSH related issues, work order processing fails, CMDB data correction, other people not on duty promptly corresponding demand, etc.). "Necessary chores" that I can receive, after the familiar sort of business-related costs are controllable. "Toil" trivia is what I want to destroy, but the question now is, the last half year, most of my energy, and even a lot of overtime, are increasingly pinned on how to deal with human flesh chores, I would no energy to automate chores, chores to destroy it!

About oncall

  1. Technical support, server configuration error, alarm processing, work order processing, etc. work, which Google does not allow them to air any hacker disappeared, but a variety of ways to reduce their processing costs to within an acceptable range.

The difference is that pressure oncall it, 1) because the alarm handling automation, monitoring accuracy, accuracy alarm inadequate infrastructure and so on, leading to pressure oncall is great, sla can often trigger an alarm, and even lead to "crying wolf "effect, just like the big data-related services sla alarm I'm used to; 2) internal platforms like publishing system, work order system, SSH permissions, and so there will be more or less small problems, to support these issues very human consumption ; 3) processing means after an alarm or a problem is not enough to use, single-instance issues like the recent frequent, are relying on human flesh restart to solve, but the problem there is a growing trend, however, did not see which team focused on solving seems to cover living human flesh can be the first matter; 4) because of fear of failure that is not timely, while also receiving a lot of traffic police, the system underlying the police, but because the right business strategy adjustment in the alarm business side

About Troubleshooting

  1. post-mortem, after the failure Replay
  2. On the wrong things, failure to establish emergency procedures

This is part of our team have been doing, fault recovery disk, fault monitoring found that the rate of construction, failure todo follow up; but because the fault is, and KPI linked, when we deal with failure, or will in the end be unwittingly wandering into who's pot problem, especially not immediately re-set the fault site.

SRE become the link different teams built

  1. SRE company's internal tools, wheel contact are more tools to help spread between different teams

This is a fact, but not as a thing to do, as I found on the company's internal service, monitoring, configuration, pressure measurement platform, publishing systems, and so tools are more familiar with, usually will go to help answer the RD this question. However, because of time and energy issues, many of the details of things did not go in-depth understanding, you can not get more revenue in this matter.

What kind of coding do a typical SRE do?

  1. No typical SRE, great SRE different directions to do coding differences;
  2. Failure prediction, capacity level. That is the basis of existing monitoring data, improve the automated monitoring;
  3. DBA SRE, assist in the development of related systems, this did not quite understand that, as a relatively specialized field;
  4. Automated provisioning, internal system optimization, which is part of the eradication of trivia;

Coding part of the SRE in charge of different positions is not the same, insist to do from a technical difficulty distinguishing the difference is also great, interlinked with the code point it is to solve the operation and maintenance issues now.
This part is what I most want to do, it is also the least currently doing. I want to see the world like this, I was doing front-line operation and maintenance work, I direct the user of this system, I promote this system to the other team, if you encounter a problem, I was able to (have the right to have the time, ability) to fix the problem; instead of this, access to human flesh by artificial maintenance of the system functioning (including CMDB, SSH authorized distribution system), but do not have time to fix things as they are now, it's like the whole team we pack the dirty work, but there may be behind the growth, but no gainful living energy to do but to hand over people, this will make people really can not find a sense of accomplishment, a sense of worth can not be found.
I do not want this, I do not like this.

Guess you like

Origin www.cnblogs.com/carlsplace/p/11832579.html