Understanding Code and Investment Insights
Author: Wesley Wei – LinkedIn, Wesley Wei – Medium, Wesley Wei – Twitter
Initial Thoughts
As I’ve collected more knowledge points, many of which have remained unprocessed and untouched, each time I see these stored contents leaves me feeling exhausted. This is clearly an unhealthy state.
It’s like a squirrel storing too many acorns in its mouth; I can’t let the acorns stay there forever, as it will hinder my growth, and the prolonged storage may even corrode my mouth.
This requires me to further hone my ability to filter and select, as well as my action and persistence skills. Therefore, I’ll attempt to start a weekly journal, where I’ll output the contents I’ve collected over the past period after processing them through my own thinking, thereby converting others’ knowledge into my own, and finally archiving or deleting the corresponding stored content.
Code-Related
How to Understand Code
Original Chinese text: zhuanlan.zhihu.com/p/114868001
When reading code, it is essential to adhere to a fundamental principle: clarify your purpose. The process of reading code is like fishing, where you need to use the right net for the type of fish you want to catch. If you’re after big fish, you’ll use a large-mesh net and let smaller fish go; if you’re after small fish, you’ll adjust the mesh size to ensure they don’t escape. Similarly, when reading code, you should clarify your purpose before diving in.
After clarifying your purpose, it’s time to start reading. I recommend a step-by-step approach: top-down, repeated reading. Specifically, this means defining the scope of what you need to read and then repeatedly reading related code with increasingly finer granularity. Initially, get a general understanding of the data flow and treat function calls as black boxes; later, gradually delve into each function’s specific logic implementation.
Why? To avoid getting bogged down in details and losing your overall perspective. When you encounter difficulties while reading, it’s easy to feel frustrated and lose momentum. However, if you’ve already grasped the big picture, you’ll find that many logical puzzles become clearer after reading subsequent code.
Instead of drilling down into minute details, expand your scope and look at the bigger picture first. This approach is more efficient and helps you avoid getting stuck in a rut.
When following the top-down principle, you should typically be able to gain a rough understanding of the current code’s purpose, design, data flow, and relationships with other modules after one or two readings. With this understanding, you can then delve into the details and make progress more efficiently.
Throughout the reading process, you need to overcome a psychological habit: the tendency to try to understand everything in one pass. Many people have this inclination, but it’s unrealistic because it doesn’t align with human cognition rules.
Limited by the brain’s limited working memory capacity, humans recognize complex systems through hierarchical abstraction. We need to compress details into concepts and store them in long-term memory before processing multiple concepts in working memory and storing the results back in long-term memory. This process is a fundamental rule of human cognition.
Trying to understand a complex module in one pass will only lead to a never-ending cycle of reading and re-reading, with each new detail covering up previous ones like a dog chasing its tail.
By following the top-down principle, your early readings serve as black boxes for establishing concepts in working memory, which are then stored in long-term memory. Later readings will repeatedly recall and fill these concepts, gradually deepening your understanding of the entire content.
Personal understanding:
I also believe that reading with questions is the most effective way. Whether it’s a book or code, understanding requires progressive learning.
When you read with questions, you’ll utilize your curiosity and desire to learn better, asking yourself what the initial question was each time you encounter something unknown. This helps you quickly escape from reading difficulties and understand something thoroughly.
As you repeatedly explore different aspects of a project, you’ll gradually gain insight into its overall scope. With repeated practice, I believe you can also discover your best approach to reading.
Investment-Related
The World Economy is a Scam
Original Chinese text: 2024 October Long-Term Index Investment Plan (Part II): Selling at 150
Youval Harari’s book “A Brief History of Humankind” says that humans are able to have a shared vision and confidence because they can tell stories. Financial markets are also a story. As long as we believe that banks will return our money with interest, and stocks will continue to rise, we will invest.
There are many stories in the stock market. You’ll hear media outlets, institutions, and netizens telling you various stories about companies and industries.
You believed it, got hurt deeply. You didn’t believe it, didn’t make any money.
Here’s another classic quote:
The world economy is a continuous drama based on illusions and lies. To gain wealth, one must recognize these illusions, invest in them, and then exit the game before the public recognizes the truth.
In this context, “economy” can be replaced with “company,” “industry,” or “wind direction.”
Following hot trends and chasing profits is not wrong. However, you need to deeply understand what a story is, who is telling it, and what the truth is.
Personal understanding:
I believe that all financial systems in the world are, to some extent, Ponzi schemes, because each individual is pursuing low-buy-high-sell while believing that others will take over.
I think that for rational people, they should divide their assets into three levels: high, medium, and low. Of course, how these three levels are divided depends on one’s assets, thinking, and understanding. Once you’ve divided your own assets, you can reduce many risks and navigate different crowds in Ponzi schemes with ease.
At the same time, we all know that in the investment field, people cannot earn money beyond their recognition, so investing should not be about seeking to get rich quickly. All those who have gotten rich are not because they invested well, but rather because they possess rich knowledge, are good at learning, and have good personal qualities.
Such individuals will not be weak in any field, and the cause-and-effect relationship must not be reversed. Moreover, we should not be misled by the myth of getting rich quickly.
Tennis and Investment
Original Chinese text: Tennis and Investment: The Power of 1% Difference | New Finance, Sina Finance, Sina Net
The 1% difference is insignificant but crucial
1% differences in investment can be referred to as “incremental improvements”.
Investors aim to consistently outperform the market over the long term, making small improvements each day. They often review past decisions, develop better techniques, and conduct deeper research. These efforts may take a lot of time, but they typically only yield a 1% competitive advantage. However, this 1% advantage can compound over time, leading to significant returns.
No need to get every decision right
Achieving long-term results does not mean that every decision is correct. The best tennis players do not necessarily win more than 50% of their matches. Top-ranked tennis players may only win around 54% of their matches. In tennis, a match often hinges on a few key moments, and top players succeed by investing energy in these critical moments, reducing non-forced errors, and staying focused when mistakes occur.
Similarly, achieving long-term excellent investment returns means not being distracted by short-term noise. Investment success often requires adopting an anti-thesis approach. Therefore, noise is unavoidable. Many investors are attracted to widely popular securities. However, contrarian investment choices mean that the market may need time to recognize its true value.
Personal understanding:
In most cases, it’s difficult to maintain a slight advantage over others in investing. This requires constantly refining your strategy and believing in yourself during low periods.
Investment and sports have similarities. As an amateur athlete, you can’t compete with professional athletes. Many people choose to rely on companies or professionals who are experts.
If you don’t want to rely on professionals, you need to find a way to stand out with a slight advantage, but this choice is clearly difficult.
More Series Articles about Enlightening Weekly:
[to be added]
And I’m Wesley, delighted to share knowledge from the world of programming.
Don’t forget to follow me for more informative content, or feel free to share this with others who may also find it beneficial. it would be a great help to me.
See you in the next article. 👋
中文文章: https://programmerscareer.com/zh-cn/enlightening-weekly-01/
Author: Wesley Wei – LinkedIn, Wesley Wei – Medium, Wesley Wei – Twitter
Note: Originally written at https://programmerscareer.com/enlightening-weekly-01/ at 2024-10-27 22:10.
Copyright: If there is a violation of rights, please comment or contact me to remove it.
Comments