9
头图

Hello everyone, my name is Yang Chenggong.

Today is May Day, which marks the end of April and the beginning of a new month. First of all, I wish everyone a happy holiday!

Originally, my plan was to go home during the May 1st holiday. As a result, the epidemic situation in Beijing became more and more serious, and it was difficult to get out of Kyoto. Every day, the community was shouting loudspeakers to go downstairs to do nucleic acid. The most embarrassing thing is that starting from today, all restaurants in Beijing will stop dine-in. I can only stay at home and silently take out the Baixiang instant noodles that I have stocked for a long time...

Closer to home. Since I have to do something at home, let's review the past April first.

In fact, I have been very busy and tired throughout April, and the reason is that I have done a small and medium-sized thing- daily update article !

"Daily change" means to write an article every day for a month, which is a test of endurance.

Why do this thing? It is because my knowledge of data structure is relatively weak, and I have been looking for opportunities to make up for it. I bought a book before, called " JavaScript Data Structures and Algorithms ", which is just right for me to learn. The result was that it had been sitting in a drawer eating ashes for months.

Later, I thought that this would not work, and I had to focus on breaking through. It just so happened that it was almost April, so I decided to spend a month in April learning a piece of content every day. Input first by yourself, carefully understand and read through, and then use simplified language to sort out the key content and write it as an article output, one per day.

I am also a person with average self-discipline. In order to urge myself to continue to update and complete my goals, I set a flag with me and my friends in the group at the beginning of April. In April, I will try daily update, write an article every day, and join everyone Learn data structures, and then have everyone supervise me.

Once you have a plan, you are done. I wrote other articles on April 1st, and started the daily data structure journey on the 2nd. Each article is about 1500 words, mainly classified according to the chapters of the book. Divided into two or three articles, you must first understand the code and then type it again to ensure that you really master it.

Today, this difficult April is finally over, and I still have some feelings. Below, I will summarize and share the problems and challenges encountered in this process, as well as what I have gained.

how to use time

The first and biggest problem encountered during the daily change is how to arrange and utilize time.

I usually go to work on weekdays, starting from home at 8 am every morning, and arriving home at 7 or 8 am at night, so I don’t have much time to stay to read and write. In order to achieve the goal of daily shift, I need to ensure that I wash up at 6:20 every morning, sit in front of the computer, and start recording while turning over the book, so that I can use 1.5 hours in the morning.

When I get off work, I will have enough time. After eating, I will dawdle for a while, and then I can start studying at 9 o'clock in the evening. No matter what time it starts in the evening, it will end at 12 o'clock, because after 12 o'clock it is the next day, so I have to ensure that the article is finished and sent out before 12 o'clock, so that today's task is completed.

According to this schedule, there are almost 4 hours a day that can be used, but the actual situation is often less than 4 hours. For example, sometimes I will work overtime or be delayed by other things, and the time will be very tight.

I usually make good use of time in the morning. I have maintained the habit of getting up early for many years, and I basically never oversleep. Coupled with the energy in the morning, the thinking is also very active, and I can complete almost half of the tasks.

Although the time at night will be longer, the efficiency will drop a lot, because it is always difficult to concentrate well. But stop and write, you can almost finish the task in a pinch (always pinch a little).

On the weekends, all day long, it is reasonable to say that this time is sufficient, but in fact, it is not used much more than usual. I usually squeeze time on weekdays, but I want to go out for a walk on weekends, so I only take a long time to write, so the calculation output is similar to usual.

In this way, the time arrangement within the plan continues until the end of the month. If it is not planned, it is interrupted for a total of 5 days in the middle. These 5 days are due to various reasons for not completing the task.

Think about it, there are so many things every day, how can it be guaranteed that there are 4 hours every day? That's probably what I told myself at the time. But looking back later, it was not because of lack of time. The more reason is poor self-control, being distracted, and spending a lot of time on other meaningless things, which is the root cause.

Therefore, how to stay focused in a limited time becomes very important.

How to stay focused

Making the most of your time consistently can be difficult, mainly because there are so many distractions that distract you from your goals.

For example, I sometimes suddenly go into a daze, or occasionally chat on WeChat, make phone calls, swipe a video, etc., and the time will pass.

The first week before the start was okay, I felt more fulfilled, and the time was fully utilized. From the second week onwards, it will be a little slack, because sometimes I just want to listen to the songs for a while, just want to swipe the vibrato for a while, but once this thing starts, it is difficult to stop.

I'm not sure about everyone, anyway, this is how I am: listening to songs and videos, I will fall into it for 20 minutes, and it is difficult to withdraw. This kind of feeling is amazing, you clearly know that you have been relaxed for so long, and there are still things to do. After a while, it is time to sleep. In the end, he was still physically honest, motionless, just enjoying himself while blaming himself, it was so fucking amazing.

After more than half a month, I concluded that the biggest stumbling block was Douyin .

The time to swipe Douyin is very fast. I think I can control myself, but in fact, I always pick up my phone and start swiping for no reason. I have tried two methods, the first is to uninstall Douyin, but I can't even brush it. But now flipping salted fish and Taobao are all short videos, sometimes inexplicably reprinted, which is very embarrassing.

The second method is easier to use, which is to shut down the network . When you want to make the most of a period of time, say two or three hours, you turn off the network and temporarily isolate yourself from the online world. At this time, you may still pick up your phone unconsciously, but there is no network when you click on it, and you will realize what you should do now. After picking up the phone many times, you finally put it down and continue to read.

So the key to staying focused is to remove distractions and try to keep yourself with only one choice. In addition to that, give yourself a time limit to let yourself know that this uncomfortable state will end, and that end point is getting closer.

Where is the driving force?

It's really hard to make efficient use of this lack of time and stay focused. How can you hold on to it? Is it just self-discipline?

In fact, it is not. Whoever has such a great self-control ability must have other driving forces. There are two motivations for me to do this:

  • Open goals, accept supervision
  • continuous positive feedback

It's very simple to make your goals public, that is, your bullshit is out. If you don't act, others will think you're talking shit, just talk and don't practice. Everyone wants credibility, and this will vaguely generate a driving force in your heart.

Let's say you set yourself a goal and stick it on your desk, even though it stands out every time you look at it, you know it's time for you to learn. But sometimes when you are lazy, your subconscious mind will tell you: Maybe tomorrow, anyway, if the task of the day is not completed, others will not know it, and there will be no loss to yourself. I will study tomorrow, and lie down today.

In this way, the first time will be followed by the second and third time. Although it seems that the number of times is small, the actual effect is not simply calculated in quantity. Every time you give up is a negative feedback to yourself, and this feedback effect will be multiplied. In the end, you will only come to one conclusion, that is: "I can't do it, let it go."

So the second key point is continuous positive feedback , what does it mean?

For example, every time I finish writing an article, I will post it on the official account, and then share it in the group, and everyone will read it if they are interested. Sometimes if someone thinks it is good, they will like it and leave a message. You will be encouraged when you see the number of readings and good comments. This is a kind of positive feedback, which will motivate you to continue tomorrow.

Others followed my code and implemented it themselves, and found that there was a mistake in writing somewhere, and then told me that this place seemed to be wrong, and I would correct it immediately when I checked it.

This will make you feel that this is not just about you, you are not just writing, but someone watching someone learn, you must ensure the quality and be responsible to others. So I will check again and again every time I post, which improves the quality of the output.

As for other things, it's not very important. The important thing is these two points. You need to create some external force to force yourself.

The results are here

So many personal feelings have been shared before, so let’s summarize the actual results~

The overall content of the JavaScript version of the data structure includes the following aspects👇

  • array
  • stack
  • queue
  • linked list
  • gather
  • dictionary
  • hash table
  • Tree
  • picture

There are 30 days in April, I updated 25 days, and broke 5 days. The full content that has been published is as follows:

These articles have not been updated except for part of the tree and the graph, and the rest of the data structure has been updated. There are also two articles posted on other platforms that have not been synchronized to the official account. These contents will be combined with the tree, and the pictures will gradually be completed this month.

All the existing and the next updated content can be found in the data structure collection , and you are welcome to collect and study.


杨成功
3.9k 声望12k 粉丝

分享小厂可落地的前端工程与架构