Extra Meal 03 User Kaito Hoping to Grow Under Pressure

Extra Meal 03 User Kaito Hoping to Grow under Pressure #

Last time, I shared the Redis learning path that I summarized. Through the exchanges and interactions in the comments section, I gained a lot of new insights. Today, I would like to share my understanding of learning and my learning methods, including psychological preparation for staying ahead, efficient learning methods, and tips for improving efficiency.

Stay Ahead: Curiosity and No Limits #

In my opinion, when it comes to learning in any field, before diving into specific methods, we need to stay ahead of others mentally. What does that mean? It means establishing and maintaining curiosity and not setting limits for ourselves.

I’ve noticed that many people lack curiosity, which is evident in their shallow understanding of things and their inability to think critically and explore problems.

Let me give you a small example. When you first encountered Redis, you probably heard the phrase “Redis is single-threaded and high-performance.” Most people just take it at face value and move on, but curious individuals would think further: “How does a single thread handle multiple client network requests? If it uses only one CPU core with a single thread, how can it achieve high performance?”

If you follow this line of thinking in your learning process, you will discover that Redis, although single-threaded, utilizes multiplexing technology to handle multiple client network requests. Moreover, since it stores data in memory and utilizes efficient data structures, it can process each request at high speed.

You see, when we approach problems with curiosity, the results we obtain far exceed our expectations. Therefore, we should always maintain curiosity and the spirit of in-depth exploration, as they are the driving force behind our continuous progress.

Now, the second point I want to make is: Do not set limits for yourself.

Do not say “I can’t do it” without even trying anything. If you do so, you are essentially giving up on your growth opportunities in advance. I particularly love the mindset of: “Even though I don’t know it now, as long as I have time, I can learn it.”

Speaking of this, I want to share a little story with you.

When I was working in the business department as a developer, most of my time was spent writing business code. I only had a superficial understanding of Redis and did not know its principles, let alone analyzing and troubleshooting performance issues.

Later, by chance, I had the opportunity to work in the company’s infrastructure department, where I would be involved in database middleware-related tasks. I was very hesitant at that time: on one hand, I knew this work required a thorough understanding of all aspects of Redis, which was extremely challenging, and I felt that I might not be able to handle it; on the other hand, I really wanted to step out of my comfort zone and push my limits. In the end, I chose to accept the challenge.

At the beginning, I faced unimaginable difficulties, such as being unfamiliar with the running principle of Redis, being confused when reading the Redis source code, and being lost when the system encountered problems, and so on. Fortunately, facing the pressure, my fighting spirit was ignited, so I started cramming knowledge about data structures, network protocols, operating systems, and so on. Bit by bit, I delved into the source code…

After truly stepping out of my comfort zone, I witnessed my rapid growth and progress. Not only did I quickly become competent in my new job, but I also gained more and more confidence. From then on, I would no longer be afraid when encountering new problems because I knew that as long as I spent time studying them, I could conquer anything.

So, I really want to tell you that you should never easily miss any opportunity that can contribute to your personal growth, and you should never set limits for yourself. You must believe that your potential will be ignited as you face challenges, and its power is immense!

Working Smarter, Not Harder: Effective Learning Methods #

Having a strong desire to learn is not enough; we also need to quickly find scientific and effective learning methods in order to work smarter, not harder. Next, I will talk about my own learning methods.

Firstly, we need to learn how to quickly gather the materials we need. When searching, we should try to simplify the search content and avoid unnecessary keywords. For example, if we want to search for the question “How does Redis Sentinel achieve consensus during leader election in a cluster?”, I would typically search for “Redis sentinel raft”. By searching only for key terms, we are more likely to get more results that align with what we are looking for.

If we encounter detailed questions or cannot find answers while researching, do not hesitate to look at the source code. Source code is objective and represents the most detailed implementation. Don’t just rely on obtaining information from others; learn to find what you need on your own. Source code often provides clear and understandable answers.

For example, the Redis String data type is implemented by the Simple Dynamic Strings (SDS) structure. When the length of the value to be modified changes and the original memory space is not sufficient to store the new content, SDS needs to request additional memory space for expansion. So, how much memory is allocated each time?

If you look at the sdsMakeRoomFor function in sds.c, you will find that when the memory space being requested is less than 1MB, SDS will allocate double the memory space to avoid frequent memory allocations and the resulting performance overhead. When the memory space being requested is greater than 1MB, to avoid memory waste, only 1MB of memory space is allocated each time it is expanded. Similar questions like this can be quickly answered by examining the source code.

Many people find reading source code difficult and are reluctant to take this step. I used to be the same way at first, but one day I suddenly thought of the “Pareto Principle”. In my understanding, the “Pareto Principle” states that 80% of people are content with mediocrity and will stop when faced with slightly challenging problems, while the other 20% of people never want to stay in their comfort zones and will keep moving forward once they have set their goals. Of course, I hope to be part of that 20%. So, whenever I feel pressure or find something difficult, I remind myself to persist, as this is the only way to surpass 80% of people. I have to say, this approach is quite effective.

In addition, I also want to say that the best way to master new knowledge is to teach it to others or write about it.

Especially when writing articles, we need to determine the structure of the article and organize the points of knowledge. During this process, we transform fragmented content into systematic and structured knowledge. Those scattered points form a “knowledge tree”, which is not only convenient for memory but also allows us to extend from the “trunk” to the “branches” when reviewing, enabling us to apply the knowledge more broadly.

Moreover, during the organization process, we often discover our knowledge gaps or gain new insights and understanding on certain topics.

For example, when I was writing the article “How does Redis persist data?”, I already knew about the RDB and AOF persistence methods. However, during the writing process, I realized that I wasn’t clear about the specific details. For example, why are the generated RDB files so small? How is this achieved? And in what scenarios are RDB and AOF more suitable?

After reviewing the source code, I discovered that RDB files are small because they store binary data and Redis applies further compression to different data types (such as using int encoding for numbers), which saves storage space. Therefore, RDB is more suitable for scheduled snapshot backups and full data synchronization between master and slave, while AOF records every change operation in real-time, making it more suitable for business scenarios with higher demands for data integrity and security.

This method of reinforcing knowledge by outputting it is also an effective means of strengthening what we have learned. I sincerely recommend that you give it a try as well.

Continuous Improvement: Effective Energy Management #

Having curiosity and finding the right methods is not enough to guarantee success in everything. We may still face a problem: “I really want to master a certain skill, but I am constantly interrupted and sometimes I feel lazy. What should I do?”

In fact, this is an efficiency problem. Human beings are inherently lazy, so we need something to motivate us to move forward. Think about it, when are we most efficient at work? Isn’t it usually when a deadline is approaching?

This indicates that we are motivated and efficient when we have goals and pressure. One method I often use when learning knowledge in a certain field is to break it down into modules from easy to difficult, setting clear learning goals for the overall framework. Next, I further break down each module, making it so that I immediately know what to do when I see a task. At the same time, I set a deadline for each task.

Let me give you a simple example. When I was learning about the basic data types in Redis, I first identified the five major modules: String, List, Hash, Set, and Sorted Set. Then, I broke down each module into smaller components. For example, the implementation of the Hash data type can be broken down into “compressed list + hash table” as two data structure implementations. After that, I continued to refine the content of these two modules until I had clear and specific goals.

How do I accomplish these goals? I use the Pomodoro Technique.

I add these refined goals to my list of Pomodoro tasks and arrange them by priority. Then, on workdays or weekends, I dedicate a block of time to complete these small goals. When starting a Pomodoro session, I quickly focus my energy on completing these tasks. At the same time, I put my phone on silent and place it out of reach. After one Pomodoro session (25 minutes), I take a 5-minute break, adjust my state, and then dive into another Pomodoro task.

During the implementation process, we may encounter obstacles, such as a task being more difficult than expected. At such times, I try to spend more Pomodoro sessions on it or lower its priority, completing other tasks first, and then spend time solving the more difficult problem later.

I have found that using this method for a long time greatly improves my efficiency. Moreover, after crossing off each Pomodoro task, there is a sense of achievement, which motivates me to continue learning.

Lastly, I want to emphasize the importance of investing enough time. Don’t always complain about not achieving what you want. Before complaining, think about whether you have invested more time and effort than others. If you want to be ahead of others, you must be prepared to invest enough time.

Sometimes, you may feel that learning a technology in a certain field feels boring because it involves many details and complexities. However, this is normal. Every technology we see today is the result of years of summarization and refinement by developers. It is a serious matter, and you must spend enough time analyzing, studying, and thinking about it. There are no shortcuts.

Don’t expect to understand a field of knowledge through fragmented learning. Fragmented learning has two meanings: fragmented content and fragmented time.

I don’t know if you have experienced this, but after reading a technical article, you may think that you have mastered the knowledge points. However, if someone asks you related questions, you may not be able to answer. This is because what you have learned is fragmented and has not formed a knowledge system.

Only through systematic learning can you see the complete picture of a technology, have a clearer understanding of its boundaries, know what it is suitable for and what it is not, and understand the reasons behind its design.

On the other hand, don’t fantasize that you can learn something while only spending a short time on the subway. This would be overestimating yourself. Because in a short period of time, we cannot deeply think about and understand the cause and effect of a knowledge point. You must set aside a block of time in the evening or on the weekend to clarify the relationships and boundaries between each knowledge point, and if necessary, engage in hands-on practice.

Therefore, if you truly want to master a certain skill, you must devote a significant amount of time to systematic learning.

Summary #

Today, I shared with you some of my learning summaries, including the psychology of staying ahead, efficient learning methods, and continuous energy management.

These principles are actually simple and easy to understand, but only 20% of people, or even fewer, can truly put them into practice. Therefore, I hope that we can all take real action and embark on the path of progress, as the road to improvement is long.

Finally, I hope that these contents are helpful to you, and I’m also looking forward to hearing about your learning methods or habits in the comments section. Let’s communicate and improve together.