Reading Notes on 'The Psychology of Money'

Some excerpts and notes from reading "The Psychology of Money: Timeless lessons on wealth, greed, and happiness" Knowing is not the same as doing Financial success is not a hard science, but a soft skill - how you do it is more important than how much knowledge you have. An individual investor's willingness to take risks depends on early personal experiences. What determines the outcome in investing is not intelligence, not education or experience, but the time and place where a person is born - purely luck factors. Survival first Getting rich requires a spirit of adventure, an optimistic attitude, and the courage to let go. But what needs to be done to keep wealth is completely opposite to adventure. Keeping wealth requires humility and awe, a clear understanding of how quickly wealth comes and how easily it goes. Keeping wealth requires frugality and acknowledging that part of the wealth you have comes from luck, so don't expect to replicate past successes indefinitely.

Remove Copyright Information from Copied Content in Apple Books

Recently, I've been reading on Apple Books on my computer. The experience is decent, but there's one annoying aspect when taking notes: When you copy content from a book, Books automatically adds quotation marks and appends copyright information. This can't be removed through citation settings, which means that every time you paste a note, you have to manually delete this extra information. It's quite a hassle.

"If there is evidence that allocating empty sets can harm performance, it can be avoided by repeatedly returning the same immutable empty set, because immutable objects can be freely shared (Item 17). The following code does just that"

Excerpt From effective java 3rd Chinese edition wizardforcel This material may be protected by copyright.

Vue3 Slot

In Vue components can set a slot tag in the template, which is used to pass some content when using this component to replace the slot.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<FancyButton>
  Click me! <!-- slot content -->
</FancyButton>

<button class="fancy-btn">
  <slot></slot> <!-- slot outlet -->
</button>

// final output
<button class="fancy-btn">Click me!</button>

Hugo English Content Appears on Chinese Pages

After setting up my English blog, I accidentally noticed English content tags appearing on the tag pages during an update yesterday. Initially, I thought there was an issue with the logic of generating the tag pages. The variable used for generation was $.Site.Taxonomies.tags, which seemed to have no issues. I thought about various filtering methods, but none seemed to solve the problem.

Setting up My English Blog By Hugo

A few days ago, I came across something quite infuriating on Twitter: A blog post written by a user I follow was translated into English and reposted on Medium, garnering a significant number of views, as well as thoughtful and heartfelt comments from users. I've often seen articles from English-speaking communities translated into Chinese and repurposed as content farms, but this was the first time I'd seen the reverse—Chinese content translated into English for reposting. It was even more frustrating to see. The blogger quickly reported the user who had reposted the translated article, and tried translating some of his own blog posts into English with the help of ChatGPT and posting them on Reddit. The response was very positive, with one post even topping the channel. As someone whose work is always related to internationalization,…

Rethinking Investment

After reading some of Meng Yan's views on value investing in my senior year, I started consciously considering the matter of investment. Since 2019, I have been regularly investing in domestic funds, from initially buying index funds to track overall development, to later choosing some highly-rated aggressive funds for better returns, my investment philosophy began to gradually shift. However, no matter how I chose, it couldn't resist the overall environment and trend. When the entire domestic market was in poor shape, the choice was essentially meaningless. Coupled with the discovery of various oddities, I became more clearly aware that the domestic stock and investment market is a joke. Why did I gradually lose faith in long-term value investing? In my understanding, value investing is essentially using money to support and accompany a company's growth, and then to gain a portion of the value from this growth. The essence of the stock market should be to help companies raise funds for better development and growth.

2023 Annual Record

Last weekend, I had the idea of writing an annual summary. After creating a new file and dictating a lot of content, it felt like I was pouring out my own thoughts, something that could only be written for my own eyes. So, I set it aside for a week and chose to create a new file to rewrite a version that could be published. This year is actually an important milestone, marking the transition from being a student to a worker. The changes in identity, role, and environment have brought me a lot of thoughts and ideas. However, I don't have much time to work on a regular basis, and many ideas that pop up in my mind may not be thought through, or they might be forgotten because I didn't record them. So, I decided to take this opportunity of writing an annual record to summarize some thoughts.

Advent of Code 2023: Day5

The specific problem can be seen here A simple summary description is: Given some integer inputs as seeds, and some mappings (list list (dst, src, length)), if a seed falls in the range [src, src + length], it is mapped to (dst + seed - src). The question is to find the minimum value among the seeds after several mappings. Brute Force with F# A very intuitive idea when seeing the problem is to scan all mappings for each input seed, get a final seed, and find the minimum value from it. Part1 is easily passed, but when it comes to part2, each pair of seeds represents all seeds in the range [seed1, seed1 + seed2], adding up to more than 19.8 billion seeds. At first, I wrote a brute force simulation in F#, but it was interrupted after running for a while, possibly because there were too many seeds.

Embracing AI with the Arc Browser

Despite my previous criticisms of the Arc browser in my usage notes, its unique features and aesthetic appeal are quite attractive to me. Hence, I often find myself switching my default browser to Arc on my computer. Overall, the user experience is quite good, except for the fact that the extension status is not visible and needs to be invoked from the menu when needed. After this switch and update to the Arc browser, I noticed that there's a new AI tab in the settings called Max, which seems quite interesting. Based on a quick look at this settings page, it has the following main features: Ask questions based on the current page content Generate a preview of the link content based on AI Use AI to intelligently name the title of the open tab and the downloaded file Invoke ChatGPT to ask questions After trying it out, I think the idea is quite good, but there is still room for further improvement.

How to Publish a Gradle Project to Maven Central Repository

How can you publish the output of a completed gradle project to the Maven Central Repository, so that everyone can benefit from your work? Last week, I went through the process and published a simple clipboard operation project I wrote. I found it a bit complicated, the process was long, and with gradle, the updates are too fast and compatibility is poor. This makes the documents found online somewhat inconsistent. What's worse, even the official gradle publishing tutorial from Sonatype is inconsistent with the latest gradle8 version. Therefore, I could only refer to the process inside, and the details had to be figured out by myself.

Clipboard Access in JVM

The idea originated from my desire to write a Kotlin script that reads the content of the clipboard and saves it to a file. However, after searching online, the methods given by Java and Kotlin both access the system clipboard through the awt package in the JDK. Since Kotlin scripts still run on the JVM target, the methods are universal.

A Brief Note on Using the Arc Browser

I had heard about the Arc browser, which claims to change the browser landscape and replace Chrome, but it was only available for Macos and not for Windows systems, so all I could do was wait and see. It wasn't until I got a Mac for work and bought a MacBook for myself that I finally had the chance to try it out. So, I immediately downloaded it, set it as the default browser, and started to explore. Upon opening the Arc browser, the first impression it gives is that it's visually appealing, with its design and animation effects giving a flamboyant vibe. It's said that these features come at a cost to performance, but I didn't notice any performance issues during actual use. In actual use, compared to Chrome-based browsers, Arc has the following main features: Vertical sidebar. Arc moves the top tab bar, address bar, bookmarks, etc., to the sidebar to provide more browsing height.

A Better Way to Write Scripts

During graduation season, I took some photos with my classmates. The photos shared later were in the HEIC format, which can be opened directly on the computer. However, the iCloud album only supports the jpg format for uploading photos. Even if these photos were taken with an iPhone, they cannot be uploaded directly. There was no choice but to manually convert the photo format. There are many online tools for converting HEIC to JPG, but they can only upload one by one, and then download one by one. This obviously is not a good solution for situations where a large number of photos need to be processed. Therefore, the natural plan was to write a script for conversion. Of course, now with ChatGPT, there's no need to write scripts personally. Just throw the problem at it, and we only need to do the code moving work. It looks very good. Copy it locally, replace the path and run it, only to find that the script cannot run properly.

Umami: A Simpler Self-Hosted Website Statistics Service

Previously, I used Google Analytics to provide website statistics services, tracking the visits to each page on my blog. It's usable, but Google Analytics offers too much statistical content, which is quite overwhelming. Moreover, Google's services always have accessibility issues. Therefore, after reading other bloggers' introductions to Umami, I decided to set up my own website statistics service and switch to it.

Umami is a simple, fast, privacy-focused alternative to Google Analytics.

Why Firefox?

I've been using Microsoft's built-in password management tool all along. The PC end can use the password filling and query functions provided by Edge, and the mobile end can use Authenticator launched by Microsoft as the mobile password management tool. Although it's easy to use, it essentially means that the PC browser needs to be strongly bound to Edge and Microsoft. It's not very convenient if you want to switch to other browsers. In the past two weeks, I started to use Bitwarden as a password manager, thus getting rid of the dependence on Edge. Therefore, I immediately updated the FireFox browser on my computer and tried to use it as the default browser. The user experience is not bad, it has all the features I need, and its performance is similar to Chrome and Edge. However, the performance of FireFox is just okay, there are not many outstanding aspects, it can only be said that it is close to or almost as good as Edge.