2015 18th Wednesday Programmer capacity

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

The first thing to remember is two words:

Salary is not the boss's reward for your past contribution, but the expectation of your future contribution.
The incumbent boss can not give you a satisfactory salary, the next boss will. In this case, we should pay attention to develop our own ability:

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,this demand based on what the actual demands, the actual demand there is no more reasonable way to achieve, a word "This can not be done, the realization of the cost is too high", is not the right communication attitude, and, the best products, often is to achieve those who originally thought can not achieve the demand.

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.

2015 18th Wednesday Programmer capacity

Related Article

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.