Concluding Words Issue Overall Comparisons of Solutions Method More

Concluding Words Issue Overall Comparisons of Solutions Method More #

Hello, I’m Fu Jian, and this is the last lecture of this column. After a long journey, we have finally arrived here. Thank you for your support and perseverance, for not giving up halfway through the tedious process of learning source code.

Although this column only has over 20 lectures, it covers a wide range of knowledge, including not only the basics of Spring, but also higher-level applications like Spring Data. Through learning, you will find that the number of problems you encounter will definitely exceed the 50+ I have listed. And by solving one problem after another, you will realize the importance of understanding the principles of Spring.

Speaking of learning Spring, when you first start, you may find it to be a handy “black box”. But as you delve deeper into using Spring, you may feel like it’s a “fog” or a complex puzzle that can easily confuse and disorient you. However, after systematic learning, although we still cannot solve all problems, we do have a useful tool at hand and advancing further seems within reach. By analyzing the source code involved in various problems, there will be a transformative enhancement in the quality of your understanding!

But then let’s also consider a question: why do we encounter so many problems? Is it due to a lack of solid foundation or insufficient practical experience?

For example, in daily development, we often find that beginners can quickly complete a task and the functionality seems to work well. However, over time, many problems start to surface.

I remember that a novice colleague of mine used to casually use “System.out.println” to output logs in the production code. By the time I noticed this issue, the program had been online for a month and was quite stable. I had carefully examined the system, thinking that the console logs would ultimately be archived to an NFS disk mounted elsewhere, so I didn’t pay much attention to the files continuously increasing in size. But one day, the local disk was full and I couldn’t determine which file was large despite trying many Linux commands. All the files I saw were actually very small, so how could the disk be full?

In the end, I was lucky enough to use the lsof command to query the “deleted” files, and indeed, they were occupying a large amount of space. The root cause was the initial use of “System.out.println” by my colleague, which caused a file to continuously grow. Because it was being archived (deleted), it was difficult for us to immediately find it.

By carefully reviewing this problem, you will find that beginners have a characteristic of not deeply researching the principles behind each line of code and how to write it in the most appropriate way. When encountering a problem, they also tend to rely on various search engines to solve it. After one solution fails, they often continue to iterate and use other solutions, until it finally barely works. However, when another problem arises, you will find that their code is unnecessarily complex and more problems are likely to occur.

“Seeing through the subtle and gaining insight” and solid foundations are not achieved in a single day, and practical experience also takes time. My advice is: when you write code, ask yourself a few more questions. Is the way I am writing the code correct? Is my solution following the standard conventions? Will the way I solve the problem have any negative impact? And so on.

From another perspective, if you browse the various questions on StackOverflow, you will find that many problems are described with intricate details, but the root cause is often very simple. You can also try removing the complex and irrelevant parts of a problem, simplifying it to a “mini” version. This makes it easier to identify the “root cause”, which is the most important.

You see, isn’t this the design approach of our course? By using simplified examples, we allow you to understand the core of the problem and avoid stumbling into pitfalls. This is a great way to learn!

So, let’s summarize: when faced with an endless number of problems, how should we respond?

I believe that there are always more problems than solutions. In other words, problems can be categorized, so the root causes are limited, and consequently, the corresponding solutions can also be summarized.

When you encounter a problem, you can first consider these three points:

  1. Has this problem not yet been solved by others?
  2. Is the problem itself difficult?
  3. Is it because your current knowledge is insufficient?

Do not immediately label yourself as “incompetent” because even after working for 10 years, there may still be problems that you cannot solve. Some problems are just difficult, and it is normal not being able to solve them within a specified time. In other words, you need to have confidence in yourself .

Next, we can try some methods because the boss pays us to work, not to build our confidence, right?

  1. Simplifying the problem

Many problems are difficult to solve because there are many unrelated things that obscure the truth. But you have to believe that no matter how complex the appearance is, the root cause of the problem may not be too complicated. Just like a failed rocket launch in the former Soviet Union due to a decimal point error. Therefore, when you encounter a thorny problem, you must constantly “simplify” the problem until it becomes the simplest problem model, and then you can easily locate the source of the problem.

  1. Accumulate knowledge patiently

When you have roughly identified the scope of the problem but still cannot solve it, it is often because you lack relevant knowledge and skills. Just like asking you to write an Eclipse/IDEA plugin without ever having used them, do you think it’s possible? At this time, you must learn to fill in the gaps and build your knowledge network. Of course, this may not have an immediate effect, but in the long run, it will be very beneficial for your personal development.

  1. Seek help

If you can’t solve it on your own, it is also okay to seek help from others. But I suggest that you try your best before seeking help. Learning is like playing a game, solving each problem is like leveling up, and seeking help from others is like using cheats, which can only provide temporary relief. Also, seeking help has its tactics. Avoid stirring up trouble and instead seek help to find a way to locate and solve the problem.

Finally, I want to thank all the students for their trust. In this course, I have provided many problem scenarios and problem-solving ideas. I hope it can help you go further on the road of technology! If you have any comments or suggestions during the learning process, please feel free to let me know through the course survey below. I will take everyone’s voice seriously.

I am Fu Jian, goodbye to all!