2023,江端さんの技術メモ

WSLでUSBカメラをどうにかしたくて、すったもんだしていました。

で、管理者モードでPowershellを立ち上げて

PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* docker-desktop-data Stopped 2
Ubuntu-20.04 Running 1
docker-desktop Stopped 2

の部分の1を2にしなければならないことが分かったので、

Windows10のWSLをWSL2に変換する手順

を参考にさせて貰って、

PS C:\WINDOWS\system32> wsl --set-version Ubuntu-20.04 2

をやりました、

ところが、数分どころか、いつまで経っても終わらないのでCrtl-Cで強制打ち切りをしたら、wslが全く動かなくなってしまいました。

いろいろやったのですが、最終的には、

起動しなくなったWSL2を復活させるまでにしたあれこれ

を参考にして、元に戻すことができました。

(大変失礼ながら、以下コピペをさせて頂いております。上記のページのリンクが切れると、私がパニックになりますので)

WSL2無効化→有効化

Ubuntuアンインストールでダメな場合(ダメでした)、WSL2を一回機能をオフにして再起動します。

「コントロールパネル -> プログラム -> Windowsの機能の有効化または無効化」を選択します。

「Linux用Windowsサブシステム」のチェックを外して再起動します。

で、チェックを外してから、なかなかシステムが終了を出してこないのですが、ここばガマンです。それでも10分はかからないと思います。

でもって次は、「Linux用Windowsサブシステム」のチェックを付けて再起動します。これも、いい感じでまたされますが、我慢します。

で、これらを終えて、やっと、コマンドプロンプトから、

$ wsl -d Ubuntu-20.04

と入力したのですが、それでも動きません。

管理者モードでPowershellを立ち上げて、

$ wsl --update

をして、別画面を経ち上げなおして、再度、

$ wsl -d Ubuntu-20.04

をしたところ、やっと、元の環境に戻りました(多分)。

「WSLでUSBカメラをどうにかする」をとっとと諦めていれば、こういう目に合わないのですが ―― エンジニアの性(さが)ですかねえ。

まあ、「別のマシンで同じ環境のシミュレータが動いている」という安心感があってのことでしたが。

で、まあ、ここからまた挑戦するんですよ。性懲りもなく。

 

2023,江端さんの忘備録

どの会社でも、ボーナス支給前に、その内容について上司から説明を受けると思います。

I think that in every company, your supervisor explains the bonus's details before the bonus is paid.

今回も、これまでと同様、私の評価は「普通」でした。

Again, as in the past, my rating was "normal."

妥当な評価だと思います。

I think it is a fair assessment.

文句はありませんが、

I have no complaints, though; I think

―― ラクしようとして、手を抜いた仕事はない

"I never cut corners on my work to make it easier."

とは、思っています。

つまり、私は「全力疾走」をしていて「普通」なのです。

In other words, I am "running at full speed," and it is "normal."

-----

この原因は、

The reasons might be, I think,

(1)そもそも私の能力が低い、あるいは、

(1) My ability is low, to begin with, or,

(2)全力疾走の方向が的外れ、あるいは、

(2) The direction of the all-out effort is off the mark, or,

(3)上記(1)(2)の両方

(3)Both (1) and (2) above

なんだろうなぁ、と思っています。

さらに、悪いことに、私には、その上記(1)~(3)に思い当たる節がある、ということです。

Worse, I know the above (1)-(3).

-----

『外側から見える自分の評価は、自分の中から見える評価の半分以下である』は、よく聞かれる話です。

It is often heard that "the evaluation of oneself as seen from the outside is less than half of the assessment seen from the inside.

私には2つの選択、(A)上記(1)~(3)を改善する努力をするか、あるいは、(B)「自分の評価は自分が決める」と割り切るか、があります。

I have two choices, (a) make an effort to improve (1) - (3) above, or (b) be prepared to "let my reputation be my own."

私は「ラクな道」を選びます ―― 息が切れそうですけど。

I'll take the "easy way out" -- even though I'm out of breath.

『それが無ければ、社会で人並に評価されない』という残酷な世界の「個性」です。

 

2016

(昨日の続きです)

(Continuation from yesterday)

やる気さえあれば、装置と計器で美味しいラーメンを作ることができ、

We can make delicious ramen with devices and instruments if we are ambitious.

その気になれば、1ヶ月で左官の仕事の基礎の習得を完了できる、

If we are full of vigor, we can complete the primary stage of plasterer craftworkers.,

そういう世界で、最後に残るものは何か?

What is the remaining value in the world, finally?

どのように呼んでも構いませんが、それは、「他の人にない自分だけの才能」、つまり「個性」です。

It must be your talent, "individuality," "and uniquity" Any expression is O.K., but it is "originality" after all.

-----

ただし、それは、これまでのように『無責任に賞賛されるだけの「個性」』ではなく、

However, not just "originality" is admired without reason.

『それが無ければ、社会で人並に評価されない』という残酷な世界の「個性」です。

It is in a sadistic world, which means nobody approves you as a member of society if you don't have "it."

さらに言えば、その「個性」なるものは、単に人との差異があるだけでは価値はなく、

In addition, "it" is not enough to have a difference between the others,

金銭的な対価とならないのであれば、何の意味も持たないという、

it is considered "worthlessness" if it doesn't have counter value.

そういう恐しい世界の「個性」です。

It is "originality" in the fearful world

2023,江端さんの忘備録

最近は、リモート会議の様子が自動的に録画、録音されていて、後で自分の会話をレビューすることができますが ―― レビューしない方がいいです。

These days, remote meetings are automatically recorded, and you can review your conversations later -- but it's better not to review them.

一度、私、自分のしゃべっている英語をレビューして、(気分は)自殺未遂寸前になったことがあります。

Once, I was on the verge of (feeling like) attempting suicide after reviewing my own spoken English.

―― これが、人類のしゃべる言語か?

"Is this the language that mankind speaks?"

と。

-----

最近、特許出願の相談を受けることが多いです。

Recently, I have been asked to consult on a patent application.

私が役に立てる数少ない分野の一つですので、できる限り受けるようにしています。

It is one of the few areas where I can be helpful, so I try to take on as much as possible.

で、よせばいいのに、今日、その打ち合わせの録音を聞いてしまったのです。

I listened to the meeting recording today, even though I should not have done so.

私は、高音域の音声で、声が大きく、そしてしゃべる速度が早い。

I have a high-pitched voice, a loud voice, and a fast speaking rate.

―― しゃべり方が、すでにパワハラっぽい

"The way I speak already sounds like power harassment."

『これは、本当にマズい』と思いました。

I thought, 'This is bad.'

普通にしゃべっているだけで、相手にプレッシャーをかけていたとしたら、シャレにならない。

It would be embarrassing if I were putting pressure on others just by talking usually.

ましてや、相手をメンタル障害や自殺に追い込んだりしてしまったら ―― 私は、存在自体が「凶器」になってしまう。

And if I drive the other person to mental disorder or suicide -- I would be a "deadly weapon" in my very existence.

-----

という訳で、日本中の全ての管理職のみなさん。

So, to all managers throughout Japan.

一度、自分の声の入った部下の会話の録音と、真正面から対峙してみましょう。

Once you face a recording of a subordinate's conversation with your voice in it.

あなたが『自殺未遂寸前』の気持ちになることは確実ですが ―― それでも、部下に自殺されるよりは、ずっとマシです。

I am sure you will feel 'on the verge of a suicide attempt' -- but still, it is much better than having your subordinate commit suicide.

「『異性から告白されたことがない女性なんかいる訳ないよね~~』とか、だ」

2018,江端さんの忘備録

本日は、コラムがリリースされた日なので、日記はお休みです。

Today, new my column is released, so I take a day off.

世界を「数字」で回してみよう(46) 働き方改革(5):

あなたは“上司”というだけで「パワハラ製造装置」になり得る

Let's turn the world by "Number" : Work style reform(5) "

If you are a boss, you can be a "power harness manufacturing equipment" simply"

-----

「私たちは生きている限り、からなず『パワハラの加害者』になっている、という意識が大切だと思う」

"As long as we are alive, we should have a consciousness that we become a perpetrator of power harassment"

と、私は家族に言いました。

I said to my family.

「パラハラのほとんどは、悪意のない無意識から発生しているんだ ―― 例えば」

"Most of the parahara are caused by Unconscious without malice, for example "

「『異性から告白されたことがない女性なんかいる訳ないよね~~』とか、だ」

"There is no woman who has never been confessed from heterosexuality, is not there?",

と私が言うと、

However,

嫁さんと長女が、

my wife and senior daughter interrupted quickly,

「いやいや、そんな女性はいないでしょう。ありえないって」

""No, no, no such woman! No way!"

いきなりつっこんできました。

-----

「な。ほら、すでに、これで『パワハラ成立』だ。たった今、日本中の何万人かの女性が、お前たちを『絞め殺してやりたい』と思ったハズだぞ(*)」

"Here, the "establishment of power hara" has alreay set. Now,hundreds of thousands of women in Japan have thought that they want to kill you "(*)"

(*)日本の女性の人口の1%で、60万人

という私の意見に、次女は反論しませんでした。

My junior daughter seemed to agree with me.

さらに、

In addition, I said to them

「私の例では、『結婚なんて簡単だ』といい放った奴を、『絞め殺してやろうか』と思ったことがある」

"In my case, I thought that I wanted to kill a guy who had said to me "Getting married is easy."

なども付け加えておきました。

-----

忘れてはならないことは、

I think we should not forget

(1)「自分に簡単なことは、他人も簡単なはずだ、と考えて、私たちは生きている」ということであり、

(1)we live our life with thinking "what is easy for us" is equal to "what is easy for others"

(2)「生きている限り、私たちは、必ず誰かを傷付け続ける」という事実で、

(2)As long as we life, we have to continue to hurt someone absolutely"

(3)「それを回避する手段はない」ということです。

(3)There is no way to avoid it

----

私たちにできることは、

What we can do is

―― それを自覚し続けること

to be aware of it

これが、精一杯なのです。

This is our limit.

2023,江端さんの忘備録

会社でモノを買うのが面倒なので、最近は自費購入を検討するようになってきています。

Buying things at the company is a hassle, so I've recently considered buying things at my own expense.

「申請」の手続は面倒なのですが、それと同様に「滅却」がもの凄く面倒です。

The "application" process is tedious, but the "disposal" process is just as tedious.

1年以内で"滅却"するものの為に、半年以上の手続が必要となることもあります。

For items to be "disposed" within a year, more than six months of processing may be required.

まあ、法律上の仕組みとして、仕方がないことだと理解してはいるのですが。

Well, I understand that as a legal mechanism, it is inevitable.

-----

私には、これといった金のかかる趣味がありません。

I have no expensive hobbies.

スポーツ、イベント、旅行、自動車、コレクションなどに、興味がありません。

I am not interested in sports, events, travel, cars, collections, etc.

私のやっていることと言えば「文章を量産すること」くらいでしょうが ―― これは時間はかかりますが、金はかかりません。

I guess the only thing I do is "mass-produce texts" -- this takes time, but it doesn't cost money.

-----

物品を自腹で購入すると『それを使い倒そう(or もとを取ろう)というモチベーション』が働くので、技術が身につきます。

Purchasing goods with one's own money motivates one to "use it up" so one acquires skills.

とは言え、これは、たまたま、私の欲しいものが、私の持っているお金の範囲であるから、できることです。

However, I can do this because, as it happens, what I want is within the money I have.

例えば、スパコンの研究や、電気自動車の研究している人が、自腹を切るのは無理でしょう。

For example, someone working on a supercomputer or researching electric cars would not be able to pay for themselves.

まあ、20年も経てば、自分のお金でなんとかなるかもしれませんが、その時は遅いんでしょうね。

Well, after 20 years, they may be able to get by on my own money, but by then it will probably be too late.

なるほど、『私たちは、みんな、20年前のスパコンを使っている』ことになる訳です。

2023,江端さんの忘備録

この年齢になって分かってきたのですが、

I've come to understand at this age,

―― 上司の個人的コメントは、部下にとっては「命令」になる

"A supervisor's "personal comment" becomes an "order" to his/her subordinates."

という現実と、

This is a reality of the situation, and

それに気がついていない上司が、恐しいほど多いということです。

The fact is that there are an alarming number of bosses who are unaware of this.

----

私、特許創成に関する、課長クラスの集りの時に、

At a gathering of section chiefs regarding patent creation, I said that

『君たちのコメントは、部下にとっては"神の言葉"なのだから、むやみに自分の"個人的コメント"を口にしてはならない』

Your comments are the "word of God" to your subordinates, so don't be careless with your "personal comments."

と言いました。

そして、「部下は、必ず上司に忖度する」という実例を語って聞かせました。

And I said that real-life examples of how "subordinates will always surmise their superiors."

ところが、課長の一人から、

However, one of the section chiefs said to me,

「江端さんが特許について語るとき、"神の言葉"になっている、という事実に気がついていますか?」

"Are you aware that when Mr. Ebata talks about patents, it will be the "word of God"?"

と言われて、呆然としたことがあります。

I was stunned by his comment.

-----

本当に、『それに気がついていない上司が、恐しいほど多い』のです。

"There are a frightening number of bosses who are unaware of this" is the fact.

「特許明細書のロジック」の説明の仕方

 

2023,江端さんの忘備録

自分で作ったコードは、原則として、他人の環境では動かない ―― これ、コードの常識です。

As a rule, your code will not work in someone else's environment -- this is common sense for code.

仮想環境やマイクロサービスは、その問題を解決する手段なのですが、その環境を作るのにも失敗する ―― これ、環境構築の常識です。

Virtual environments and microservices are a way to solve that problem, but they also fail to create that environment -- this is common sense in environment building.

総じて『人の作ったコードを、自分のパソコンで動かそうとすると、大変苦労する』というのは、 開発者の常識です。

It is common knowledge among developers that "it is tough to run code written by others on a computer.

で、問題はここからです。

And here comes the problem.

この常識を知らない人は、開発者に対して「なぜ動かないか?動かすにはどうしたらいいか?」と、平気で質問をしてきます。

People who do not know this common sense will ask developers, "Why doesn't it work? How do I get it to work?" they are not afraid to ask questions.

―― そんなもん分かるわけねーだろう

"How could I possibly know that?"

と、しか返事のしようがありません。

The only way I can reply is.

だって、私の環境では、コードは動いているからです。

Because, in my environment, the code is working.

-----

開発者に、質問者を『助けてやりたい』と思わせるか、『うっとうしい野郎だ』と思わせてしまうかを、分(わか)つ分岐点があります。

There is a dividing line between making the developer think, "I want to help you," and making the developer feel, "He's an annoying son of a bitch.

それは、『この問題を解決する為に、自分にできることは全てやりきった』ことを、できるだけ詳細に記載することです。

It is to describe in as much detail as possible how you have 'done everything you can to solve this problem.'

これによって、あなたの真剣さと、あなたの苦しみが、開発者に伝わ(ることがあ)ります。

This will let the developer know how serious you are and how much pain you are in.

後は、できるだけ丁寧な文面で、『時間があって、気が向いたら教えて下さい』というフレーズを、必ず加えることです。

After that, you should be as polite as possible and add, 'Please let me know when you have time and feel up to it.

善意かつ無償でコードを公開している開発者は、あなたの問題を解決する義務も責任も1mmもなく『気が向いたら助ける』が原則です。

Developers who release code in good faith and for free are not obligated or responsible for solving your problems but are there to "help when they feel like it."

-----

まあ、この辺の話は、ここの話と一緒です。

Well, the story here is the same as the story here.

2023,江端さんの技術メモ

https://development.relaxes.jp/windows11にwsl2+ubuntu20-04をインストールする/

これまで、VMWareやら、VirtualBoxやら、(Dockerも、)仮想環境というのは基本的に面倒くさい思い出ばかりなの(特に通信I/F回り)で、Windows10/11をインストールする時も、意図してWSLは弾いてきたのですが ―― そのツケが回ってきました。

Golangは、Windowsで実行するより、WSL on Windows10/11の方が実行速度が速い 

という驚愕の情報をデータ付きで教えて頂き、現在、WSLの環境構築と、Golangのインストールを実行しています。

以外に簡単でしたし、通信I/F回りも今のところ、あまり問題になっていないようです。


さて、wslのインストールがコマンドプロンプトから、

>wsl -d Ubuntu-20.04

の環境を立ち上げて、

>sudo apt update
>sudo apt install golang-go

をしました。これでgolangは動くようになりました。

で、実際のプロウラムを動かしてみると、

# m/AgentSimulation
./db_util.go:280:24: undefined: sql.NullInt16
note: module requires Go 1.17

というエラーが出て止まります。

Go 1.17にモジュールが必要と言われているようですが、

$ go version
go version go1.13.8 linux/amd64

と出てきます。全然足りないようです。

ここからは、めんどくないGoのバージョンアップ を参考にして作業を進めました。

$sudo apt install golang-go

では、失敗するようです。

やっぱり

$sudo add-apt-repository ppa:longsleep/golang-backports

が重要なようでした。

定番の

$sudo apt autoremove
$sudo apt update
$sudo apt install
$sudo apt upgrade
をやって、再度
$sudo apt install golang-go
を実施したら、
$ go version
go version go1.20.2 linux/amd64
となりました。
-----