Journal

Solving problems in practice

Reading Time: < 1 minute

Several weeks ago, I was watching a Vox video on Covid-19 vaccine distribution. The story was about how rich countries were first in line to get vaccines because they made individual deals with the pharmaceutical companies to invest in research, to guarantee they receive the first batch of vaccines. There was an organization formed for many countries to chip in, so the poor countries can also get vaccines. But the way it worked out is that rich countries both contributed to the organization and made deals with pharmaceuticals companies, since they have the money, so they still end up being first in line for vaccines.

The video ended by wondering why it didn’t work, but fall short to indicate that human behavior is the reason that the original plan didn’t work. When working with any human-generated data, we are required to look at how that data was generated. Sometimes, people approach the data from an objective approach and ignored the human factor. But for many years, humans have greed and desires. An there often isn’t a more deep explanation than, “I want that because I can”. People like to seek reason and wish there is an logical explanation, but we can more often approach from the angle that sometimes people do things for no reason.

Journal

Extend the free space on LVM

Reading Time: < 1 minute

I had to reinstall my ubuntu 20.04 server because a boot issue became impossible to fix. After installing the OS, I found that df -lh only give me about 200 GB of space. I had more hard drive. With a little search around, I found that the disk is mounted, but I meant to extended to be more flexible. I just want all the space there.

This post gave a pretty good description of the problem and what to do, but here is commands I used specifically. This post showed how to extend all the free space, without specifying the exact amount of space.

sudo vgs

  VG        #PV #LV #SN Attr   VSize  VFree
  ubuntu-vg   1   1   0 wz--n- <2.73t 2.53t

sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv

  Size of logical volume ubuntu-vg/ubuntu-lv changed from <2.15 TiB (563200 extents) to <2.73 TiB (714879 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resize

sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required
old_desc_blocks = 275, new_desc_blocks = 350
The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 732036096 (4k) blocks long.

df -lh
/dev/mapper/ubuntu--vg-ubuntu--lv  2.7T   11G  2.6T   1% /

AI

How to test a hypothesis by AI?

Reading Time: < 1 minute

The traditional hypothesis testing I learned in school involves this:

  1. Stating with null hypothesis, which assumes no effects, and
  2. Alternative hypothesis, which state there is an effect.

So we can make the null hypothesis that “Earth is flat”, and the alternative hypothesis that Earth is not flat.

For humans, we can explore the physical world and design experiments to disapprove the null hypothesis. But for a AI, assuming these is no way for the AI to interact with the world through physics. How we can we truly test the hypothesis?

One way to go about this is find a general consensus amongst human knowledge. For example, using Google search result to see whether human agree on the hypothesis. This of course doesn’t mean that human consensus is the truth. In the early times, the consensus was that “Earth is flat”, and the consensus only changed recently if we consider the whole span of human consensus. It is very likely that the human consensus will change over time.

So what then? Do we believe that if AI cannot interact with the physical world, then it cannot prove or disapprove a hypothesis? Is there any alternative? Is there even an approximation? Is it possible that we can deduce from logic and evidence, that upon the collection of enough evidence and applying proper logic that we can disapprove the null hypothesis without physically interact with the world? Sometimes theoretical physics prove the existence of certain things before experiment verification.

Journal, Misc

Server failed to boot after power loss

Reading Time: < 1 minute

So my ubuntu server failed to boot after a power outages. It just went into the boot menu. But no matter what I press, it have some error related to “need to load kernel first”. I went around with the error message, but none of the suggestions worked. Even using all the tools with boot-repair. Finally went back to this post. https://askubuntu.com/questions/397485/what-to-do-when-i-get-an-attempt-to-read-or-write-outside-of-disk-hd0-error

Most of the suggestions are correct, except this part ->

Grub> initrd /initrd.img

It happened that I don’t have /initrd.img. It maybe got removed somehow. But if I do initrd /boot/initrd.img* then I was able to boot. I will see if I have any more errors related to this.

Misc

Generosity and raising children

Reading Time: 2 minutes

Things started tonight, when I was kind of ignoring my son to play with him. My wife immediately complained that I didn’t spend enough with my son, and said I should be more generous with my son. From my point of the view, I spend a lot of time and much more willing to make sacrifices with my wife, because I know I’m going to spend the rest of my life with her. And there are plenty of “return” with my “investment”. But with my son, I know all the time I have with him is 18 years, and then I expect nothing in return from my son. That is, if I did my job correctly. I fully acknowledge that I don’t want to invest as much in my son as in my wife.

She also mentioned that she often don’t realize that she was being extra nice to someone until she noticed she wants something from that person. And I confirmed that we all have a fixed amount of will power, and we choose to spend that will power on the things we value. I rather spend that will power on learning than lavishly praise another person, maybe just for browny points. And I understand that there are people who choose to praise everybody, even though they won’t get anything in return. Perhaps that satisfactions of praising someone is the reward on its own for them.

I always know my father is stingy, beyond frugal. I always thought I’m not stingy, because I spend money on my wife and son much more than I spend money on myself. But perhaps being stingy is not all about money. I value my time on this world more than money. And spending time with people is not necessarily something I prefer. It may not be a bad thing to do, but it’s a lifestyle choice I made consciously.

But back to raising children. My wife asked if I could imagine seeing my son being successful in life is a good enough reward for me to spend time with him. That by being extra generous with my son, my wife is really invested in his future, without asking for anything in return. I don’t know if I can do that. Being trained in biology, I considered whether it’s a genetic thing. That by being a male, I tend to be less invested in one offspring, because I have the opportunity to spread my seed in multiple fields. Whereas for my wife, being a female, is more invested in a single offspring, because moms are evolutionarily the primary care giver for the offspring.

Just as always, the situations started out with I think I have a point, ended up being my wife is right, and I need to commit more family time to play with my son. And as she rightfully point out, even though I may still have 10 years to live with my son, he will soon realize that he doesn’t want to be around me any more. Probably wise to spend more time with him, until it’s too late. Or do I want one more of these devils. Ha ha ha …

AI, Journal

What to do if Ubuntu doesn’t wake up after sleep

Reading Time: < 1 minute

So I recently updated my linux machine to Ubuntu 20.04 and it didn’t wake up from sleep. The behavior is black screen and a restart after about 10 minutes of wait. The solution I found that worked is this -> https://askubuntu.com/questions/1298198/ubuntu-20-04-doesnt-wake-up-after-suspend

Hopefully that solves your problems! Anniversary Edition!

Journal, Misc

Chinese translation of western countries makes the Chinese love them more

Reading Time: 2 minutes

Back in the 1980s, there was a huge rise in the number of educated Chinese wants to immigrate to western countries. I think it’s partially due to how Chinese translations of some of the western countries. Even though the names have little to do with the countries or culture, it created a fantasized version of the country in the hearts of many Chinese people.

For example, the United States is translated as the “beautiful country”. France is translated as the “lawful country”. Germany is translated as the “honor country”. England is translated as the “handsome country”. Italy is translated as the “meaningful country”. Canada is translated as the “plus country”. Sweden is translated as the “intelligent country”. Ireland is translated as the “love country”. Czech is translated as the “fast country”. Of course, I romanticized a little bit here and added some of my personal touches, but the idea is not far from what people thought.

There are some that’s more on the quirky side. Like Span is translated as the “west country”, and Portugal is translated as the “grape country”.

These translations are due to the fact that Chinese characters have different tones for each pronunciation. Although differentiable by a native Chinese speaker, each tone does sound rather similar. And for each tone, there are many characters that sound exactly the same. For example, in English, the word “beat” can mean both sound rhythm or hit something. But you can expect upwards of tens of words that sound exactly the same in Chinese. So if you see a Chinese person with the same first or last name, you can probably expect tens of variations in Chinese, even though the Romanized spelling is the same.

Because of translation is mostly done by sound and each sound in Chinese could mean many different things, people often choose the word with the best meaning for translation. So the resulting country names are often carry well intentioned meaning. Because these western countries are the first contacted Chinese culture, their country name translations often took the best translations. Compare to African countries or Latin America countries, there are rarely any well meaning translations. They often just trying to stay on the non-offensive side.

Journal, Misc

Supreme Court decision on church gathering

Reading Time: 2 minutes

U.S. Supreme Court made the decision today on allowing non-essential church gatherings during this Covid19 pandemic, ruling against New York State Governor Cuomo. This is the first case after Justice Amy Coney Barrett becomes the deciding factor in a 5:4 vote. It also correctly reflect what I believe is the overall sentiment of US citizens. In the US people value freedom more than lives. In other words, people rather have the freedom to decide what they want to do, despite the high chance of death or permanent health damage.

I do think that the freedom to let people gather infringed the right of other people who want to live. If this is not an infectious disease that can easily spread to other people and cause death, then people can exercise their freedom as much as they want. They can commit suicide as many times as they wish. But because it is an infectious disease, the action of exercising their freedom potentially takes away other people’s freedom to live. Just because other people did not actively choose to gather, it does not take away their rights to live amongst society. At a minimum, the people who choose not to gather have to stay at home for longer periods of time and are prevented from going out and interact socially. And it does hurt society as a whole from the mid to long term, even for the people that want to gather, at least before an effective vaccine is available. I’m going to ignore the people who don’t believe in vaccines. Thankfully, they are still a minority of the US population.

I still remember the first time I saw New Hampshire’s state motto, “live free or die”. This reminds me of some of the things I was taught when I was little. Rather than falling on the conservative side in the US, it was taught by people more on the liberal side in China. So I think things on the extreme ends are rather similar, no matter where they are.

I personally value lives more than beliefs, but I understand why people values believe more than lives. Believes keep the human race advancing to the next stage because people believe there is always a better tomorrow. This belief comes at a cost though, so keeping the balance between beliefs and lives is the key. I’m more of a person that learns the rule than bend the rule. It is an easier option. But I do envy the people that at least attempt to bend the rule. That is why I think diversity is important. Not just race, gender, age, etc, but also in mindset and beliefs.

Journal, Misc

Thoughts on US election (system vs personality)

Reading Time: 2 minutes

I had some thoughts on the US election as I woke up this morning. From the conversation I had with some coworkers and what the people on Live streams are saying, I think that people in the US believe in the system of the US government enough, that despite the fact they don’t like the president as a person, they still think the policies will be carried out according to their plan.

After many years of living in the US, I think people believe strongly in the system rather than the person who is making the decisions. Because the system is putting up enough barriers to direct whoever is in charge to make the correct decisions, the personality of the person in charge does not matter.

This is a strong contrast to the Chinese government for example, in which people believe that a good leader can direct the country to a much better place. And there are many old stories and historical comments that show strong favor of a leader that is compassionate and listen to the people.

But my question is that do we want to leave up to chance that we have a good person in the leading position. Would it better to have a system that makes sure the leader does not waver from the people’s interests, no matter how deranged they might be?

Being trained from a scientific background, I believe in the system of discovery. That we should experiment using systematic approaches, rather than design experiments depending on how we feel it should be. And we should collectively build a system that essentially guarantees things do not fail. And we should consider the said system to be our grand achievement for the government and society, not celebrating the individual who makes great decisions for us.

As I can think of it, nobody is perfect. And we certainly should not rely on the hope that any leader will be perfect.

Journal, Misc

Random thoughts

Reading Time: 2 minutes

As it happens, sometimes I get into these rabbit holes to watch a specific type of Youtube videos. As of last weekend, I got into this type of video about a specific person with provocative views. The views they made are rather appalling, but if I listen to his explanations more and more, I don’t see a flaw in their reasoning. The reason that I feel these views are appalling is that they are different than the values I believe, at least on the surface. Yet it is also amazing that I arrive at the same conclusion if I listen to their reasoning.

It is not uncommon to feel this because I was listening to a math lecture and some guy proved that the sum of all positive integer is -1/12. The result is absurd and obviously wrong, but I cannot find where the equations went wrong. (I didn’t found out why later). So I listened to other people who have opposing views than them, and they were able to disarm all of the opposing views with ease. I understand that it is also possible that all the videos I saw purposely constructed in a way to prove they are right, further leading me to their side. After all, Youtube is famous for providing the videos that their customers like. There is a possibility though, that these views are correct. It doesn’t serve me right if I just completely ignore them because they are different than my views.

I recognize that these views are mostly on how to navigate the existing world. It’s more about the old rules that govern the world. So it’s self-serving that save these rules is correct because we have been operating under these rules for centuries. Sometimes, to have a better life, we need to break the currently working rules and create new rules. And because change is always hard, they are going to feel uncomfortable. It doesn’t mean the old rules don’t work, it only means there may be a better world we can strive for.

I don’t think that just because the current political world is more polarizing than ever, we should forget about extreme views and try to bring more things to the center. I think we should keep having discussion about the extreme views, evaluate why they are not a good idea, and potentially develop on some ideas that seem extreme, but actually build a better world. Although sadly to say, I’m still going to stay in the center for my personal actions. Maybe because that’s deeply ingrained on my personality already.

View More