@kyanny's blog

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

Happy birthday, Nekoko!

f:id:a666666:20210601231511j:plain

Today our second cat Nekoko became age four. We don't know what's her birthday actually because she was a stray cat. So my wife decided that June 1st is her birthday.

We celebrate cats’ birthday, and the day they came to our house, every year. At every anniversary we buy a cake for them.

Comparing to the past year, she has been getting used to us. She stopped peeing on the futon (hopefully!), and she sleeps in the futon even we are sleeping! I hope she allows us to hug this year.

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