Welcome to pay attention to the public account “JAVA Front” to view more wonderful sharing articles, mainly including source code analysis, practical application, architecture thinking, workplace sharing, product thinking and so on, at the same time, welcome to add my personal wechat “JAVA_front” to communicate and learn together


1 Problem Analysis

I found this interesting question on Zhihu. First of all, this question is not intended to assess the knowledge of architectural engineering, because not all interviewees have architectural engineering experience. I think this question is examining three kinds of analysis: rationality analysis, structural analysis and feasibility analysis.


2 Rationality Analysis

In the workplace, it is allowed to argue about the rationality of demands and problems. To reject an unreasonable demand is to save resources and costs. For example, the product manager creates the business requirements, and the programmer implements the business requirements in code. Before code development, requirements are reviewed, first to assess the reasonableness of the requirements, and then to evaluate the implementation details. If, after full discussion, the request is deemed unreasonable or unachievable, the request will be rejected.

Returning to the question, is the need for an 800-kilogram cow to cross a 700-kilogram bridge reasonable in itself? So we can ask three questions from the three dimensions of why, whether it is urgent and whether it is replaceable:

First question: why does the cow cross the bridge? What does it have to do to cross the bridge? Is it necessary

Second question: if crossing the bridge is necessary, is it urgent? Take the long view without the urgent

Third question: is there any alternative, is it possible to go by boat or by detour? If the discussion turns out that cows can go by detour, then there is no need to consider the bearing capacity of the bridge


3 Structural Analysis

If the result of the discussion is that the cow must cross the bridge, then we will consider how the cow can cross the bridge. Here you can use structured thinking to break down big problems into smaller dimensions and try not to miss or repeat them. There are several factors affecting the bridge crossing: bridge dimension, cow dimension, resource dimension and environment dimension.

Dimensions of Bridges: Reinforced Bridges with loads greater than 800 kg

Dimensions of cattle: Waiting cattle weigh less than 700 kg

Resource dimension: Use a crane to transport the cattle

Environment dimension: Cancel environment gravity


4 Feasibility Analysis

We have given the scheme from the dimensions of bridge, cow, resource and environment. Which scheme should we choose? This requires us to carry out feasibility assessment and choose the most appropriate current scheme under resource constraints.

The solution of strengthening the bridge has high economic cost, the time cost of waiting for the weight of the cow to be less than 700 kg, and the technical difficulty of eliminating the environmental gravity, so the solution of using a crane to transport the cow to the bridge seems to be the most suitable one at present.


5. Extension of structured thinking

The core idea of structured thinking is not complicated: a single event can lead to a central idea, which can be supported by three to seven arguments, each supported by three to seven arguments. The basic structure is as follows:



It is not enough to analyze structured thinking only here, but also to further analyze the internal structure of structured thinking, and the internal structure can be analyzed from the horizontal and vertical dimensions.


5.1 Longitudinal Structure

The vertical structure of the pyramid embodies two principles: conclusion first and top-down, and we analyze them separately.

5.1.1 Conclusion first

Conclusion first is to present the main idea in a clear way so that the audience can understand the main idea at the beginning of the communication. However, if you hide the main idea in the communication process, the audience may be distracted by too much information or lose focus and have no idea what you are talking about. Conclusion There are six aspects as follows:

  • First important, then secondary
  • Frame first, detail later
  • Aggregate first and subdivide later
  • The argument is followed by the argument
  • Conclusion before reason
  • Result first, process later

Suppose a colleague’s code went live and caused the system to fail. Without using a structured approach, it would be expressed like this:

I saw that the monitoring found that the database load increased, which may be caused by not adding indexes. I find that I receive repeated messages frequently. Is there something wrong with the messaging middleware? The monitor also shows that a large number of threads are being created. Is this thread pool misuse? Troubleshooting is difficult to reach a conclusion in a short time, so let’s roll back the code to the previous version

The central idea of this colleague is that the cause of the problem is difficult to troubleshoot, and the code should be rolled back before analyzing the problem. However, he puts the most important point of view in the last, and he does not know what he should do until he hears it. How should he express the conclusion first?

We should immediately roll back the code, because troubleshooting is more complex, or restore the system and troubleshoot the problem. The possible problems fall into three categories: first, database problems caused by improper use of indexes, second, middleware problems causing a large number of repeated messages to be received, and third, improper use of thread pools causing a large number of threads to be created. We’ll go through them one by one as we get back to normal

By comparing the two paragraphs, it is not difficult to find that the structure of the second paragraph is much clearer and the efficiency of information transmission is significantly improved, which is the advantage of conclusion first.


5.1.2 The above rules the lower

Let’s analyze an example to illustrate: Xiao Wang needs to buy beef, eggs, radish, juice, cabbage, milk, vegetables, chicken and yogurt today, but he can’t remember so many dishes. Please try your best to help Xiao Wang.

The first step is to summarize dishes from bottom to top, which is a process of finding rules. The second step is to help remember by structuring the expressions above and below.



It is not difficult to find from bottom-up polymerization that beef, chicken and eggs belong to meat and eggs, cabbage, green vegetables and radish belong to vegetables, and milk, juice and yogurt belong to drinks. After such polymerization, we can carry out structural expression from above to below.

The above example is relatively simple, because the association between elements is easy to find, but the real scene is not so simple, the association between elements is not easy to establish, so how should we expand from the central idea to the second layer?

The pyramid principle recommends the use of question-answer dialogue, in which the structure unfolds downward by asking questions. So what questions should be asked to cover the main points? We can refer to the 5W2H analysis method and try not to miss key points:

  • What are you doing

  • -Blair: Why

  • -Penny: Where do you start

  • When: start and end time and milestone

  • Who: Who is responsible for, Who does, Who checks

  • How: How to do it, How to do it, where to start

  • How Much do you do

On the basis of this model, we can simplify, thus reducing the number of elements, so that it is easier to structurally express and memorize. We generally select What, Why and How as three core elements to form 2W1H model.


5.2 Horizontal Structure

Now we need to think about how to organize arguments, using two principles of horizontal structure: grouping and logical progression. Let’s do it separately.

5.2.1 Classification and grouping

(1) Inductive reasoning

We usually use inductive reasoning and deductive reasoning to categorize groups, so let’s start with inductive reasoning.

Inductive reasoning refers to the induction of observed facts and laws into a theory. This method of reasoning is not rigorous, because the conclusion of inductive reasoning is not necessarily correct as long as the observed facts and information are limited. This is a common type of logical error: false attribution.

Europeans saw swans all white, so they concluded that all swans were white. This conclusion is disproved when a black swan appears, which is a black swan event.

Of course, it is impossible for us to observe all the facts and collect all the information. In general, in order to solve a specific problem, we will collect information focusing on a certain Angle and establish a specific model to analyze and solve the problem, which is also an effective method.

The inductive reasoning of pyramid principle generally has the following four dimensions: time dimension, structure dimension, degree dimension and experience dimension. The time dimension is based on the natural time line, the structure dimension is based on the organizational structure, the degree dimension is based on the degree level, and the experience dimension is based on the existing experience. Let’s take a look at some common types of these four dimensions:

Time dimension
  • Before, during, after
  • Short term, medium term, long term
Structure dimension
  • Information Department, Administration Department, Human Resources Department
  • Development group, Test group, operation and maintenance group
The degree of dimension
  • Advanced, intermediate, elementary
  • Important, secondary, don’t
Experience dimension
  • 3C theory of market strategy
  • The 4P theory of market decision making
  • High scalability, high availability and high performance

We chose the time dimension and the structural dimension to analyze an example: how to reduce code on-line errors. From the perspective of time dimension analysis, code testing needs to be done before the event, key indicators need to be monitored during the event, and analysis needs to be reviewed afterwards. From the perspective of structure, developers need to do unit testing, testers need to do boundary testing, and operation and maintenance personnel need to improve the monitoring platform.

(2) Deduction

Deductive reasoning refers to making inferences or judgments to reach conclusions based on axioms, theorems or ideas one believes in.

This approach is logically rigorous. Proposition A is true, and it follows that proposition B is true, because the truth of proposition B is contained in proposition A.

Note that being logically rigorous doesn’t necessarily mean that the conclusion is correct. For example, if an idea you believe in turns out to be wrong, then it’s wrong to draw a conclusion.

Standard deductive reasoning consists of major premises, minor premises and conclusion: All birds can fly, and this is a bird, so it can fly.

Deductive reasoning can also be divided into three elements: phenomenon, cause and solution: the phenomenon is the low quality of the developed code, the reason is that there is no unified code specification, and the solution is to develop a unified code specification.



This is a top-down method of reasoning, working down from known axioms, theorems, or ideas. Using this approach requires some experience and accumulation in the area where the problem arises.


5.2.2 Logical progression

Logical progression means that each thought needs to be arranged in a certain order. For example, the time dimension is arranged in advance, in the process and after, and the degree level is arranged in advanced, intermediate and primary. The advantage of such arrangement is that it conforms to the habit of understanding and memorizing.


6 Article Summary

For more on structured thinking, see my article on how structured Thinking can guide the optimization of technical systems. Answering questions like this, the conclusion is not the most important, because it is essentially the way of thinking, so the thought process is the most important.

Welcome to pay attention to the public account “JAVA Front” to view more wonderful sharing articles, mainly including source code analysis, practical application, architecture thinking, workplace sharing, product thinking and so on, at the same time, welcome to add my personal wechat “JAVA_front” to communicate and learn together