Objective
The software development work can be regarded as a problem solving process either from macroscopic or microscopic point of view. On the macro level, software development, in a nutshell, is about figuring out what the customer needs and then solving the problem of how to translate the requirements into code through a series of activities such as analysis, design, coding, and testing. From the microscopic point of view, the daily work of developers also face a variety of problems. For example, the Web server that is used to debug the code suddenly fails to start, and the developer must solve the problem first, or the work on hand may not be progressing.
As a developer, instead of complaining about overtime, you might as well reflect on where your time is going. I believe developers spend most of their time solving a variety of problems. Whether you are a veteran developer or a novice, you will encounter a variety of problems in your daily work. The difference is that the experienced developer can solve the problem in a few seconds, the novice may take a few hours, even one or two days of time! It can be seen that improving the developer's problem-solving ability is of great significance both for individuals and for the team.
In fact, psychology, as an independent subject, has its special research on problem solving. The research results are worthy of our reference to improve our own and other members of the team's problem-solving ability. This paper will introduce the knowledge of psychology about problem solving, and give some guidance on how to improve the problem solving ability with the characteristics of software development work. There is no psychological background of the reader, do not have to worry about "interlacing as Foster", the article is related to some of the psychological terminology, mostly easy to understand.
Re-examine what is "the problem"
To improve the problem-solving ability, we must first clarify what is the "problem", then can talk about how to solve the problem more efficiently.
Psychology defines "problem" as "a stimulating situation where there are certain barriers between given information and goals that need to be overcome". The popular understanding is that for the initial state of a given thing (the so-called "given Information") and the target State, we do not know how to convert the initial state to the target State (the so-called "obstacle"), and the "problem" arises. For example, the famous Vatican question, whose initial state is 64 plates in a-pole, the target state is all plates in the C-pole, and each small plate is above the market. The "hurdle" that needs to be overcome is how to move 64 plates from a to C.
Figure 1. The question of the Vatican tower
According to the above definition, solving the problem is to overcome the "obstacle" process, that is, to find a path from the initial state to the target state of the process. As in the case of the Vatican, we have repeatedly used the B-pole, and finally the process of moving all the plates on the A-pole "intact" to the C-bar is the problem-solving process.
Then, the ability to improve problem solving is to improve our ability to find a path from the initial state to the target State.
For ease of discussion below, it simply divides the "problem" in the area of software development into clearly defined issues (well-defined problem) and ambiguous questions (ill-defined problem). The former refers to issues that are clear in both initial and target States, such as the question of the Vatican tower. The latter refers to the initial state, the target State, or both are very vague problems, such problems are often more difficult to solve, the problem is more demanding. Issues related to software operations are more of a problem. For example, a problem: The automatic restart of a database system on a production environment needs to be identified for its cause.
The psychological process of solving problems
Just as understanding how computers process information can help us better use computers, understanding the human problem-solving process helps us to better solve problems.
Psychologists generally break down the problem-solving process into four steps, such as problem characterization, design solution planning, and execution planning and monitoring.
Problem characterization refers to the initial state of the problem, the state of the target, and the allowable actions and constraints that must be met. In the case of the Vatican, the problem-solving person first characterizes the problem, which is to figure out: 64 plates on the A-pole, the small plate on the large plate (initial state), the target is to move the 64 plates to the C-bar, each plate on the C-bar is still on the small plate, the market under (the target State) A B-pole can be used during the move, but the movement ensures that the small disk is always on the market (permissible operation and restrictions must be met).
Designing a problem-solving plan means determining the steps to solve. The problem solver of the Vatican problem by comparing the initial state and the target state of the problem, we are prepared to move all the plates of a to the C pole recursively with the B-bar, that is, to design a solution plan.
After the problem Solver has designed the solution plan, it executes the problem-solving plan and checks to see if the current operation can help solve the problem and whether the relevant operation meets the limitation of the issue, that is, the execution of monitoring. For example, the problem-solving of the question of the Vatican should be aware of whether the small plate is on a large plate while moving the plate, and whether the result of moving the plate will make more and more plates on the C-pole as expected.
Here we discuss the psychological factors that affect the resolution of the problem.
Psychological factors affecting the problem solving
How the problem is represented
The problem representation in the first step of the problem resolution can also be divided into two small steps: problem surface understanding and deep understanding.
The problem surface understanding is the process of describing the problem in the language of the problem-solving person, which is the most basic step to solve the problem. The deep understanding of the problem is based on the superficial understanding of the problem, which further synthesizes each statement of the problem into a unity of conditions and objectives. In this sub-step, it is very important to distinguish between the relevant information and irrelevant information in the problem. For irrelevant information, it can be ignored, or can be used in different ways to understand and express (that is, characterization).
In the process of deep understanding of the problem, the way in which the problem is characterized can have a great impact on the difficulty of solving the problem. This can be reflected in a typical question-the monk's ascent to the hill (see sidebar on the left).
Monk Uphill The problem gives the intuition that it seems unlikely that there is such a point, because the monk up and down the mountain speed is not the same. However, when we find this problem can be seen as such a problem: two monks at the same point, along the same mountain, one down the hill, the other uphill, the answer is very straightforward: there must be a point on this mountain road, in a moment the two monks will meet. Well, the answer to the original question is yes. One of the key steps in solving this problem is that in the process of deep understanding of the problem, we characterize the problem in a different way from the problem surface understanding: The problem in surface understanding describes the same monk going down the hill, and deep understanding we find whether it is a monk up and down the mountain is an "irrelevant" information, We can interpret this information as two monks at the same time up and down the mountain.
Here is a practical example of software development: we want to validate the value of a field on a Web page that represents a list of the article's keywords. The rule of validation is that the value of the field cannot be empty, and if the field value is not empty, the semicolon is separated by semicolons. For example: "Keyword1;keyword2;keyword3". Obviously, this can be verified with regular expressions. The question is translated into how the regular expression is written. According to the surface understanding of the problem (as described in the above text), the format of the field value of the keyword list is characterized as:
(keyword 1) +; + (keyword 2) +; + (keyword 3) + ...
Such a characterization is straightforward, but according to this characterization, the corresponding calibration regular expression is not so easy to write. Conversely, if you change the format of a field value to another representation, the corresponding regular expression is much easier to write:
(keyword 1) + (; Keyword 2) + (; Keyword 3) + ...
According to the above representations (i.e. starting with the second keyword, each keyword needs to be ";" As the prefix), the corresponding regular expression (JavaScript language representation) can be obtained as: "^[^;] *(; [^;] +) *$ ".
Therefore, when we solve the problem, especially some more difficult problems, if there is no progress, and there is no new ideas, we might as well go back to the origin of the problem, to re-characterize the problem, in a new way to characterize the problem. Perhaps, this time will be enlightened. This is like our detective subject in the film and television works often see the scene: Detective in the process of investigation, the cost of a lot of manpower and time the case has no progress, this time to break through the plight of a good way to start from the "0": Back to the scene of the crime, re-search for clues, re-scrutiny. This time, the case is often steady! Adequacy of the representation of the problem
If I had an hour to save the world, I would spend 59 minutes defining the problem and taking a minute to find a solution (if I had an hour to save the Worid, I would spend minutes defining the PR Oblem and one minute finding Solutions–––albert Einstein).
Psychological studies have shown that experts are much faster than beginners when it comes to solving routine problems. When it comes to solving difficult problems, experts take longer to characterize the problem than novices, and they spend more time collecting information about the problem, and thus more fully characterizing the problem.
There is such a case. OPS reports an excessive number of processes in a production environment and asks developers for help locating the problem. The information provided by the other party is simply "excessive number of processes on the host" and comes with a warning message from a monitoring software: "The number of processes on the XXX host exceeds 260".
The solution to this problem is: first of all, to understand the so-called "excessive number of processes", specifically what the meaning. In combination with the monitoring software's alarm information, you can answer this question: the so-called process count, refers to the number of processes initiated on the host computer than the monitoring software preset number of processes (such as 260). At this point, the problem seems clear: Find out what processes are outside of the 260 processes, and the problem should be solved. But there is also a problem, assuming that the problem is fixed, the number of processes of the host is 265, which each process for us is no difference, how can we divide these processes into two parts?
Further asked the other side that the problem is related to the host system is a cluster environment (a total of dozens of hosts), and confirmed that the problem does not occur on other hosts. Then, by comparing the list of process names on that host to the list of process names for another host in the cluster environment, you can discover which processes are "out of the box" for the host that is having the problem. Finally, the problem is that the OPS staff has customized a timed task, and the shell script called by the scheduled task is run repeatedly (the process of the previous script run is not finished, the new script runs again), resulting in a growing number of processes.
When I write the above questions as a problem locating case to the novice to position, the Novice's response is ignorant, do not know where to start.
As demonstrated in the above cases, the problems encountered in the software industry are mostly ambiguous, especially in some production environments. For such a problem, experts can judge by their own analysis, and further collect the information related to the problem, so that the problem is gradually translated into well-defined problems, and then through the appropriate problem-solving strategies (such as the above comparison method), to solve the problem. And novices are often overwhelmed.
Therefore, for the problem of fuzzy definition, its solution is basically trying to translate it into a well-defined problem by analyzing and judging and collecting more information about the problem. For the novice, usually by observing experts to solve the problem of the process, and try to imitate it, but also a way to improve the ability to solve problems.
Observing ability
All reasoning should be derived from observation and experimentation.
-Galileo
In the process of solving the problem of software industry, vision is the main way for the human brain to obtain information. In the process of solving the problem, the human brain is not passively receptive to visual information, but through conscious, purposeful, active observation. In addition, the problems encountered in the software development process are mostly ambiguous, and more information about the problems can be obtained by observing them to help adequately characterize the problem. Therefore, observing ability is very important in the process of solving the problem. In our daily work, it is not difficult to find out: Experts in the problem-solving process is often able to quickly capture the critical information they need from a bunch of visual information, and novice faced with the problem of the experts on the issue of information is often turned a blind eye!
For example, in a dozens of-line call stack message shown in 2, the expert can quickly locate the key information on line 35th, and conclude that the problem is due to insufficient disk space, while novices may not know where to begin.
Figure 2. Quickly locate critical information from error messages
Error messages, such as log files and software interfaces, are an important source of information for problem locating. But experience tells us that the "28 principle" is also applicable here: Most of these error messages are useless or useless to solve the problem, and the key information that can play a decisive role in locating and resolving the problem is often a few lines or even one line. Therefore, the ability to quickly identify the key information that we need in these large amounts of error information often determines the efficiency of the problem solving.
Finding the key information we need quickly requires a keen eye for the problem locator. To improve observation ability, it is necessary to realize the importance of observing ability first. Secondly, in the daily work gradually learn to distinguish themselves in the problem of the positioning process encountered error information, which is the key, which is not helpful. Once again, learn some basic skills for acquiring critical information. For example, for database-related error messages, you should be able to focus on the error codes reported by the database system. For Java call stack information, focus on the first few lines of the "caused by" section.
By guiding the team members to realize the weakness of their observation ability and the importance of observing ability, and through the actual problem location to show how to quickly access key information, help the team to a certain extent, improve the ability to observe.
Summary
This article introduces the psychological process of problem solving and some psychological factors to solve the problem during the representation stage. Combined with the actual experience of the author, we compare the differences between the experts and the novice in solving the problem and give the guidance to improve the problem positioning and solving ability. The next chapter will introduce the other psychological factors affecting the problem solving, and give relevant guidance.
Improving problem orientation and solving ability through psychological knowledge (i)