@kyanny's blog

My thoughts, my life. Views/opinions are my own.

Olympic games

Like many other Japanese, I doubt the Tokyo 2020 Olympic games.

Last year, we postponed it for one year. One year later, what's the status? The number of infected people is roughly about ten times. The vaccination rate is still low. Is there a reason we can do it this year while we didn't do it last year?

As a citizen of Tokyo city, I don't mind if we have to pay much taxes to IOC as compensation. As long as we live, we can earn money. No sports events worth doing in exchange for humans life.

Success

Although I don't follow social news actively, sometimes I see social news accidentally. Say someone gets promoted; someone wrote a blog post to announce resignation with implying a better job, etc.

I don't regret my career decision. I stopped pursuing promotion in the organization hierarchy because being a leader/manager was so stressful that I lost my health physically and mentally. It was an inevitable decision to survive.

It's been about a year since I got a job as an individual contributor. Today I am very healthy physically and mentally. I'm not so stressed (almost none of the stress, comparing to a few years ago) that I am happy.

However, when I see someone looks successful, I get nervous and depressed. I feel someone blames me for my escape from the competition in the market.

This night, I felt the same. I went to walk to stop thinking myself the answerless question.

Short English writing to keep Grammarly streaks

I use Grammarly to improve my English writing skill. As of today, I have 36 weeks streaks in a row.

For security reasons, I can't use it in my work time. I uninstalled it from my laptop. However, I don't want to lose my streaks.

To keep my weekly writing streaks with Grammarly, I start to write something very short in English by using the Grammarly mobile keyboard on my smartphone.

To check if I meet the quota, I use DotHabit to record. I post my texts to this blog instead of Twitter because I want to avoid blow up.

Generate random password-ish string in Ruby

gist.github.com

Notes

For generating string of random numbers, SecureRandom#random_number can be used. However, it doesn't guarantee returning fixed length of string.

irb(main):011:0> loop { s = SecureRandom.random_number(10**10).to_s; break "#{s} is #{s.size} length of string" if s.size != 10 }
=> "99743850 is 8 length of string"

It might be better to exclude some symbol characters like whitespace, single quote, double quote and backslash because they make output string hard to see.

# symbols without whitespace, single quote, double quote, and backslash
def generate_random_symbols_without_some_chars(length)
  chars = 0.upto(127).map(&:chr).select{|c| c.match?(/[[:print:]]/) } - [' ', "'", '"', '\\'] - (0..9).to_a.map(&:to_s) - ('a'..'z').to_a - ('A'..'Z').to_a
  length.times.map{ chars.shuffle.first }.join
end

出版禁止 死刑囚の歌

奥さんが買ってきた本。面白いよと感想を聞いていたので読み始めたら続きが気になって止まらなくなり、翌日仕事だというのに朝まで読み耽ってしまった。真面目に謎解きをしたくなるミステリーで、これはと思うシーンを何度も読み返しながら推理して余計に時間がかかったけど、とても楽しめた。

奥さんは陰惨なミステリーは苦手なのだけどこの作品は相当面白かったらしく、同じ作者の他の著作も買い揃えて読んでいた。おれもいずれ読む。