The core competencies of programmers: what is ability? That's the power.

Source: Internet
Author: User
Tags php error php error log

(The following information is from the source)
Title said, I am now a new graduate of the small, pheasant school, and not the orthodox computer science, now stepping into the programmer this line, in the end what kind of skills is the core competency of the programmer, in other words, I in the first few years of work, need to accumulate what skills, then better and boss to pay, ask for.

Junyan, Data Control/historical control/textual control

We all know that learning ability is very important, then learning ability from where, in addition to reading class this, how to learn to grow in practice work?

I have previously said a general concept of Weibo, what is ability? Attitude towards the problem, and the thinking and method of dealing with the problem.

First, attitude.

Your server occasionally out of 501 errors, perhaps not a high proportion (know also appeared many times), many programmers, yes, many, pretend to see, do not care, or blame character problem. This is the question of attitude.

Then, high load or other reasons, suddenly frequent 501 errors, not to pursue the reasons for deep, but to find various excuses, what IDC service provider is not good, the server brand is not good, the operating system is bad, the database is not good, the network is not good, the Web server is bad, even, Directly to boss said we were DDoS! (encountered, help his boss to find a number of security experts consultation, finally found that it is not DDoS, is the programmer sucks. )

This is the attitude, shocking, if you can be sensitive to the problem, you can know that any small, slight problems have enough sensitivity, you have a rapid growth of the foundation. The sensitivity to the problem is very important. Many performance or program logic non-fatal bugs, when not sensitive enough to be found, but once into the special scene will suddenly explode, you a little more sensitivity, will reduce the risk of this crisis.

The second attitude is to solve the problem of attitude, some people have confidence in their own solutions, think foolproof, but some will stay a long way back; Just like you said I server to do security reinforcement, must do right, to be as rigorous and thoughtful as possible, but your database to save the password is not also encrypted? And to a random salt, is not to prevent in case there is still a loophole in the library what to do. The program is the same, some previously written server daemon, there are bugs, will be inexplicably terminated, this bug of course to locate, to repair, but at the same time, write a cron check this daemon state, once encountered the termination to give automatic recovery, this is the second hand preparation, even if you do not want him to execute, This preparation is still to be done. To do both hands and even three hands to prepare, is also a good programmer, the key quality of architects.

The third attitude is based on the attitude of communication and understanding, product or operation to raise an unreliable demand, a sentence to play back of course very cool and awe, but there is no careful communication analysis, the demand based on how the actual demands, the actual claim there is no more reasonable way to achieve, a word "This can not be done, this realization costs too high" , is not the correct communication attitude, moreover, the best product, often is to achieve those who originally thought that cannot realize the request.

This attitude, there is a continuous improvement of the basis, the following ideas and methods.

Good programmers and mediocre programmers, if only to see the speed of the beat code, I think it is not out, maybe everyone can write a lot of lines a day, but after encountering problems, mediocre programmer's resolution efficiency, compared to good programmers will be a difference. The so-called solution efficiency, is not only the analysis of the bug, positioning, and thinking.

The most basic one, look at the execution of logs, look at various logs, Web server logs, database logs, slow query log, binlog log, PHP error log, and so on, and so on, the problem of the line to guess the days are not looking at many. Look at the log is not carefully incomplete is also a lot of people, you can go to serious research log has surpassed many.

Second, the module test and breakpoint analysis, the programmer a bad habit is to write a very big piece of code and then execute, do not know a module to write a module to test, the implementation of the problem does not know set breakpoints, narrow the scope of stepwise analysis. Breakpoint analysis is very simple, the entire code to plug in a few intermediate output, to see which part of the problem, or to observe the system overhead of each link, error-Free and performance optimization is very important, the experts probably think this is ABC thing, but this thing I see most of the programmers do not have this habit.

Third, the error message understanding and search, the search engine has a variety of technical information and technical questions, you encounter error messages and error hints, usually can be found on the Internet, of course, after the search to combine your scene seriously thinking, and understand thoroughly, rather than tiger to deal with, Otherwise it may be good luck on the right, next time bad luck and do not know how to go.

Fourth, continue to summarize, to a problem, a class of problems, and different types of problems, good at summing up, constantly reflect on their own problems, even if the code is not out of the bug, you go through a period of time to look back, there are a lot of thinking is not correct unreasonable place, there are many optimization points, if you think your code has always , there is no flaw, you must be in situ, no progress.

About the summary, I say a case

Before we have a system, the request is very large, the load is very high, there is a good technical manager to deal with, he listed a few upgrade plans, are very reliable, to carry out, the effect is very good, and then we follow up the report when he says, did a few upgrades, the overall effect, and I criticized him.

What did I criticize? He's doing it together. The effect of the upgrade, then the observation together, then in these scenarios, the actual effect of each scenario, how much help for ascension, he does not have any data. Therefore, he has no concept of the value and importance of the specific upgrade plan. You solve the problem correctly, but not seriously to summarize, your harvest is limited. Upgrading together can not be said to be wrong, but the effectiveness of evaluation needs to do alone, and this data is very valuable, knowledge accumulation, not you have to deal with there must be accumulation, but collated.

That's about it.

And then I repeat it again.

What is ability?

The attitude of the problem, the thinking and method of dealing with the problem, is the ability.

Like so many, thank you, add a few ideas, is the above several methods of specific expansion

Add 1: Be good at asking questions, you can get what kind of answer depends on what kind of question you ask.

You have a problem, you should know where to ask, what to ask.

One of my common test questions is this.

Database is currently hanging, I am the server, I do not know why hang up, you are an excellent analyst, now I come to do the response, you ask me questions, you ask a question, I answer an indicator, and then see if you can locate the problem. (Of course, I will answer all the data indicators according to the hypothetical question), such as you ask me how many database connections, ask me how much the system I/O pressure, or ask me what is in the slow query log, and so on, the person who is good at asking questions can get the answer quickly, but not good at asking questions, will guess a bunch of

There is a real fun case, there is a brother company (before the news came out, sold like 1 billion of the appearance), the beginning of the server database is not strong enough, load up when there will be some problems, please I go to the pulse, I look at the Windows Server, SQL Server (don't guess, that was a few years ago , it should be changed now), I said this I will not ah, and then people so enthusiastic when I am an expert, have to bite the bullet, I even the basic operation will not do, I sit there ask questions, start they say is not so, is not that, I say you do not blindly jump to conclusions, if you know the conclusion don't ask me, I asked what indicators, what log you will give me to check what, I just kind of asked, they live operation to check the data, I asked a they check a show me, check, their engineers said, know why! Sure enough, they were completely different from the assumptions they started. In fact, the key is to ask the question of the idea, they did not ask the right question at first. Raised the right questions, and they quickly found their own reasons.

Supplement 2: Be good at scoping and narrowing the problem zone.

The above mentioned breakpoint analysis is a very common analysis method, but many scenes, you do not even know which program is the problem, good at the scope of the problem, but also a kind of induction and classification ability.

I've had a classic test in a technology group, and I remember a classic question that was mentioned on a previous Weibo blog. "From the browser to enter the URL to open the Web page, what happened in the middle", this is a classic comprehensive cognition of the topic, based on this topic, a more practical scenario test is (this scene actually 90% of webmasters and game operators have encountered), "There are users reflect the site or game card, how to analyze the reasons, and the current priority step. “。 As a result in this group, only my apprentice uttered the perfectly correct answer (09). Priority the first step is to look at the number of online users and the current number of visits, compare history, get the current impact of the problem, to determine the next priority, and reduce the scope of analysis. (This is the Consciousness problem) analysis idea, divides into three big chunks, the front end, the network layer, the service side. Of course, this three can continue to extend a lot of detail, but at least, the problem can be divided into three chunks, and then based on some obvious analysis to quickly eliminate several parts, and then gradually refine the problem, and most people just from a local to think, speak a lot of local details but there is no complete program, so this is the gap.

The core competencies of programmers: what is ability? That's the power.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.