Improve work efficiency with programming knowledge

I. Background

Programmers have learned to some extent, more inclined to technology, work, live link, find some commonality.

Life knowledge to use analogies to learn techniques, and the use of technology to promote the improvement of living knowledge of reverse efficiency.

This article describes several techniques to improve work efficiency.

Here are a few chestnuts.

 

Second, two examples

More than 2.1-threaded thinking

If it is single-threaded stuck, you can not perform follow-up tasks. Java Multithreading is a very important concept, it can execute concurrently.

Figure 2.1

It's like we write the code as if stuck, probably did not switch to another task, the card may have been a few minutes, tens of minutes or even hours.

In fact, the human brain is like a single-core CPU, we accomplish more by concurrent form.

If you get stuck somewhere, if not very urgent to switch to other tasks, and then switch back out (get it working for help, and sometimes can not be seen yourself how others look to get to the cause, saving a lot of time), you can maximize overall efficiency.

 

2.2 priority queue thinking

So work, too, rarely only one task, it may be doing doing new tasks must be inserted.

It's kind of like a priority queue, high priority in front.

Note: not Videos FIG substructure FIG priority queue level, but illustrating a convenient understood.

Figure 2.2-1

If the new task with a higher priority, so pay close attention to switch to the new task up.

Figure 2.2-2

Such a task to be immediately executed, task d in, d high priority, is inserted into the front b.

The priority here is often just one dimension, such as the importance, such as the degree of urgency.

 

But we can not just be decided according to the urgency of priority, there is a classic four-quadrant rule to guide our work life.

Figure 2.2-3

Four-quadrant rule is an important concept of time management theory is due to focus time and energy on the main focus placed to deal with those important but not urgent work, so you can plan ahead and take preventive measures. In people's daily work, often they tend to have a good opportunity to plan and complete a project.

But often there is no time to do it but, over time, cause a decline in the quality of work.

Therefore, should the main focus on the important but not urgent "quadrant" of the transaction is necessary to focus on.

We should focus primarily on the important but not urgent transactions, need a good sense of timing.

A good approach is to create an appointment. The establishment of a reservation, their time will not be occupied by others, in order to effectively carry out its work.

                                                                                                                                                               "Baidu Encyclopedia"

Only when usually spend more time on the important and not urgent matters, it will reduce an important and urgent matters.

Or focus on important urgent matters at the same time, do not overlook important not urgent matters.

For example, while working to complete the project of human development is an important and urgent task, but to consolidate his spare time professional basis, professional reading classic books, learning the core technology stack source so it is important not urgent tasks.

These important and not urgent tasks for the development of great help, and the reverse facilitate future project development.

 

It's like a lot of college students signed up forty-six and then leisurely, then quick examination about the assault, some on the basis of the difference, but again and again.

Final exam with the original title, the difficulty of some of the low final exam, the final exam may assault, resulting in many people develop this kind of thinking inertia, others are always lazy, always a lot of things to the front was anxious, too late for some things I went back to the countless days.

 

2.3 thread consumption switching thinking

In addition, we know that common thread frequently and destruction, thread switching and so time-consuming, and frequently work when the switch is switched every time the content of the work will be a waste of time. ,

In the past we just need to do a lot of repetitive tasks efficiently, so "switch and replace" is not important.

Today, we are faced with the task always keep a little bit to change the shape.

To accommodate this change, we can not be one mind, it should be: the experience with different working on shortening the switching time.

                                                                                                                 "Finishing Art 2" time to sort out surgery 05 Never one mind

When the task less time, use multiple threads to execute, but time-consuming and possibly longer, is the reason.

Shown in Figure 2.1, switching among multiple tasks is a "gap", and the human brain is not a machine, this gap may be very long, interrupted after switching to a new task may take a few minutes or even ten minutes of "Adaptation period".

So many programmers are willing to with headphones, avoid disturbed resulting in a "context switch."

In addition, I mention that reduce context switching time-consuming techniques Qiao

(1) record key information in a proper way cloud notes. For example, in a task list, respectively, to create demand, development, testing, and other on-line directory, then links each stage used, precautions recorded.

For example, you develop another project, others ask you questions before a project time, do not need to click on the login page to find a variety of pages and so on.

For example, you develop testing process has been put on the line precautions think it over, when ready to cut back on the line items, it will take less time to enter the state

Well used when testing SQL statements, use the URL, page screenshot and so record, if there are problems directly behind the reference before to find, you can quickly troubleshoot problems.

 

(2) develop good programming habits develop. Functions extraction, reduce the complexity of understanding of the code. As shown, if only need to modify the function of concurrent queries 10 to look directly Functions, reduce the difficulty of understanding the context. Also easily confused place to add comments, doing other functions when switching to here as quickly as possible to understand.

Figure 2.3-1

Also learn Pomodoro , focused for 30 minutes and then rest for 5 minutes and then focus on 30 minutes, ...

Figure 2.3-2

Software can be installed Pomodoro, I saw a colleague installation, worth learning from.

2.4 algorithm differences

As geeks time as concluding remarks referred to "10x programmer Work Act."

Difference in time complexity of the algorithm, such as the insertion sort time complexity of O (n ^ 2) while the average case quick sort time complexity is O (nlognn), their essential difference is that the number of comparisons quick sort less.

Insertion sort each cycle only concerned there is no link between the current target cycle, and quick sort in doing different division, under the last results of the help once, so it saves a lot of the number of comparisons.

Is the so-called optimization algorithm, using known information as possible, to do less unnecessary things.

So when we encounter problems, as much as possible to understand how to solve this kind of problem, summed up the law to do things, to master the method (troubleshooting the "code troubleshooting and avoiding mistakes correct posture" ), rather than once again Some asked similar questions.

In addition, I think that if you read the "wins the Offer" in fact you will find different different time complexity of the algorithm, often is not the same idea.

Therefore, the method is an important factor in determining effectiveness.

Each learning methods, like mathematics of different functions, such as a linear function, quadratic function, index, growth rate is not the same.

Each learning methods, like computer algorithms, such as quick sort, bubble sort, and so on, a lot of time complexity is not the same.

Thus I strongly recommend everyone to do more and to learn programming skills summary, troubleshoot and learn some of the ways to avoid mistakes, and not just focus on solving the problem at hand.

While talent may be more important, but for most people, the talent can not change, we can learn a good way to improve efficiency.

 

In fact, many people learn bad, one is too impetuous, on the one hand do not know the method, there is cause due to the comfort zone of exclusion even reluctant to try new approaches.

Like most people will think of IDEA Used IDEA are higher than the value of Yen Eclipse and plug-ins, but a novice when changing from Eclipse IDEA are somewhat inconsistent.

Before contact with a student, her word sucks, buy a copybook to practice for a few months, or the last to leave copybook change back.

She asked to know why? Her idea is that we are doing, ah, badly written teacher does not say buy copybook exercise?

I summarize before an English font written recommendations to the student, she did not seriously almost half a year, followed by determination to try, twelve weeks copybook big change.

In fact, a lot of people before the English font is not good, but with the nature of writing, did not follow certain tricks to write, not to summarize what is more aesthetic, did not spend much time effect.

 

Often I see a lot of people ask questions in the group, but few people pay attention to review and practice troubleshooting, avoid errors.

This is an important reason perhaps Matthew, so successful people more successful, most ordinary people will go on general.

 

Just do not want to waste time to learn more ways, resulting in each encounter problems are wasting more time troubleshooting.

It's like a lot of people in high school, never read the title wrong, wrong place wrong title set title lay there, not extracted in common, not summed up the law, not repeated to reflect, do not realize is essentially a knowledge point to grasp is not solid, there is no opportunity to grasp the knowledge points corresponding to the same cause problems, missed the first time the second large probability or wrong.

Third, sentiment

When learn more later, if we can find commonalities between the different knowledge, then knowledge will be very similar to learning easy.

Some people worry that if the die is replaced Java how to do?

In fact, learning is the ability to understand the needs of capacity, the ability to debug logic, the basis of professional ability, the ability to document and so on, can be migrated to other industries.

Programming languages ​​are the same, instead of Andrews Saipan, Saipan became the first batch of people about whom a lot of people to Andrews, earn pours.

We use life to help us understand the technology, and vice versa can use technology to help reverse our thinking and work life.

We have time to think more about how to use the programming knowledge to improve the efficiency of work to find common knowledge, and the ability to learn and use, and perhaps this is to learn the true value of knowledge, the "Learning"!

Then again, sometimes it is precisely because we do not want to waste time, waste more time.

We do not want the system to see Spring technical documentation, usage will not cause any individual, find information everywhere, leading to the BUG.

We do not want, do not know, do not take the initiative to understand Redis classic book, leading to the interview a lot of questions to answer wrong.

We context switching too often, I do not think this is a problem.

We have no record of the content of the work, I thought it was a waste of time, see no need, a problem also need to spend a lot of time to do some repetitive work.

We do not think that writing code readability, it is important to modify them behind very painful.

We have been learning that took time, and touched his very pragmatic, and sometimes does not find the method, this is just only on detours.

 

The last recommended a few books "art finishing" a total of four, which recommended a number of finishing techniques to improve the efficiency of skills, work and life is very helpful.

 

Writing is not easy, if you feel that this article has helped, thumbs welcome, welcome attention to me if there is supplementary to welcome the exchange of comments, I will try to create more and better articles.

Welcome to another planet my knowledge, knowledge Planet ID: 15165241 can talk about.

CSDN marked from the time of application https://t.zsxq.com/Z3bAiea.

Published 379 original articles · won praise 862 · Views 1.32 million +

Guess you like

Origin blog.csdn.net/w605283073/article/details/91127059