2021/08,江端さんの忘備録

最近、次女がバイト先から持ち返ってくる、食料(パン、おにぎり、弁当)が、一人で自宅勤務を続ける私の食事(昼食)となっています。

Lately, the food (bread, rice balls, and lunch boxes) that my junior daughter brings back from her part-time job has become my meal (lunch) as I continue to work alone at home.

―― もう気分は、被介護人

"I'm already in the mood to be a  care-receiver"

私は、簡単な軽食なら、サクッと作ってしまいます。

I can make a light meal if it's simple.

江端:「で、持ち返らない弁当はどうなるんだ」

Ebata: "And what happens to the lunches that you don't bring back?"

次女:「ん? 普通に廃棄でしょ?」

Daughter:"The lunch will be discarded"

という一言が、決め手でした。

That's what made up my mind.

-----

「食材を捨てる」というのが、私は、どうにもダメでして。

I just can't get over the whole "throwing away food" thing.

最近は、フードロスのブームもありまして、野菜の皮を剥く作業も省略するようにしております。

Recently, there has been a boom in food loss, and I am trying to skip the process of peeling vegetables.

というか、そもそも「野菜の皮」は、本質的に『旨い』です。

I mean, to begin with, "vegetable skins" are essentially "delicious".

最近の私のブームは、じゃがいもやニンジンの皮を剥かずに、カレーに突っ込んでいますし、ネギやほうれんそうも、ヘタっている部分以外は、全部使い切ります。

My latest craze is to shove potatoes and carrots into curry without peeling them, and to use up all the leeks and spinach except for the sticky parts.

りんごは皮の部分が美味しいので、丸ごと食べますし、最近は、長女に、梨の丸かじりがイケていることを教えて貰いました。

I eat apples whole because the skin part is delicious, and recently, my senior daughter taught me that biting into a whole pear is a good idea.

料理の手が抜けて、かつ、美味しい。

The food is both easy to cook and delicious.

皮付き野菜、皮付き果物、是非お試し下さい ―― そもそも、「皮を向いて食べる」などという風習は、ごく最近(数百年間程度)の、ちょっとした「意識高い系」のトレンドです。

Vegetables with skins, fruits with skins, please try them -- to begin with, the custom of "eating with the skin on" is a very recent (a few hundred years or so) and somewhat "conscious" trend.

そのような軽佻浮薄(けいちょうふはく)な風俗は、今世紀中に終えてしまいましょう。

Let's end such frivolous customs in this century.

2021/08,江端さんの技術メモ

// position_log_sample.go

// position_logから座標情報を読み出すサンプル (要pq)

// go get github.com/lib/pq

package main

import (
	"fmt"
	"os"

	"database/sql"

	_ "github.com/lib/pq"
)

const port int = 8910 // DBコンテナが公開しているポート番号

func trackUser(db *sql.DB, userID int, dateIndex int) {
	// SQLステートメント
	sql := "SELECT id, to_char(time, 'HH24:MI:SS'), x, y, satisfaction FROM position_log "
	sql += " WHERE date_index = $1 AND user_or_bus = 'USER' AND id = $2;"
	prepared, err := db.Prepare(sql)
	rows, err := prepared.Query(dateIndex, userID)

	if err != nil {
		fmt.Printf("error : %v", err)
		os.Exit(1)
	}

	fmt.Printf("time, x, y, satisfaction (userID: %v)\n", userID)
	for rows.Next() {
		var id int
		var timestr string
		var x float64
		var y float64
		var satisfaction float64 // 満足度・現実装では、リクエスト発行直後に変化する
		rows.Scan(&id, &timestr, &x, &y, &satisfaction)
		fmt.Println("-", timestr, x, y, satisfaction)
	}
}

func trackBus(db *sql.DB, busID int, dateIndex int) {
	// SQLステートメント
	sql := "SELECT id, to_char(time, 'HH24:MI:SS'), x, y FROM position_log "
	sql += " WHERE date_index = $1 AND user_or_bus = 'BUS' AND id = $2;"
	prepared, err := db.Prepare(sql)
	rows, err := prepared.Query(dateIndex, busID)

	if err != nil {
		fmt.Printf("error : %v", err)
		os.Exit(1)
	}

	fmt.Printf("time, x, y (busID: %v)\n", busID)
	for rows.Next() {
		var id int
		var timestr string
		var x float64
		var y float64
		// var satisfaction float64  バスの満足度はNULL
		rows.Scan(&id, &timestr, &x, &y)
		fmt.Println("-", timestr, x, y)
	}
}

func main() {
	// db: データベースに接続するためのハンドラ
	var db *sql.DB
	// Dbの初期化
	dbParam := fmt.Sprintf("host=localhost port=%d user=postgres password=ca_sim dbname=ca_sim sslmode=disable", port)
	db, err := sql.Open("postgres", dbParam)
	if err != nil {
		fmt.Println("cannot open db")
		os.Exit(1)
	}
	dateIndex := 1 // 1日目
	busID := 8     // バス番号
	userID := 11   // ユーザ番号
	trackBus(db, busID, dateIndex)
	trackUser(db, userID, dateIndex)
}

2021/08,江端さんの技術メモ

PostgreSQLのデータベースは、全部Dockerの中に閉じ込めることにしたので、バージョン管理とかを忘れることができてストレスフリーです。

でも、Windows10から、ちょいちょいっと、DBの中を見たい時にpsqlがないのは不便です。

ですので、ここを参照させていただきpsqlだけインストールしました。

【PostgreSQL】Windows に psql コマンドだけをインストールする手順

ちなみに、どのシェルでも使えるように、私は、PATHはこっちに書き込みました。

 

 

以上

 

2021/08,江端さんの忘備録

パラリンピックの開会式の演説を見ながら思ったのですが、

I had a thought while watching the opening ceremony speech of the Paralympics.

―― 演説者の横に、キッチンタイマーの大型版を用意する、というのはどうでしょうか。

"How about setting up a large version of a kitchen timer next to the speaker?"

というか、日本全国に用意しろ。

Or better yet, have them available all over Japan.

特に、プレゼン能力絶無の小中校の学校の校長の話。

Especially the principal of an elementary or middle school with no presentation skills.

この大型キッチンタイマーがあれば、生徒たちも『覚悟』ができます。

With this large kitchen timer, the students will be 'prepared'.

そして、自分の学校の校長の知性と技能の有無を、客観的に把握できます。

They can then objectively ascertain the intelligence and skills of their school's principal.

あるいは学術会議の方式を取り入れても、いいかもしれません。

Alternatively, they could adopt the method of academic conferences.

大体の学会の発表時間は『討議を含めて』15分間です(予鈴:10分;終鈴:12分;打ち切り鈴:15分)。

The presentation time at most conferences is 15 minutes "including discussion" (10 minutes for the preliminary bell; 12 minutes for the final bell; 15 minutes for the closing bell).

という訳で、夏休みの自由研究のネタで困っている子どもたちに、ネタを提供します。

So, for those children who are having trouble finding a topic for their free research during the summer vacation, I will provide the story.

『どうして、校長先生の話は、こんなに長くて、つまらないのか?』

"Why are the principal's stories so long and boring?

-----

私、以前、日本の障がい者数/雇用者数のスケール感をざっくり理解する、というのを試みたことがあります。

I once tried to get a rough idea of the scale of the number of people with persons with disabilities/employees in Japan.

で、65歳以上/以下で、身体の障がい者の数も比較もしてみました。

I also compared the number of people with persons with physical disabilities in the 65+/under age groups.

要するに

In short,

―― 人間、いずれは、全員が障がい者になる

"Humans, eventually, will all be disabled"

という、当たり前の事実に気がついて、ハッとしたことを覚えています。

I was startled that I noticed the natural fact.

江端:「パラリンピックというのは、つまるところ、『私たち全員に係わる舞台』と言える訳だ」

Ebata: "The Paralympics is, in essence, a stage that concerns all of us".

と、パラリンピックの開会式を見ながら私が呟いていると、嫁さんに言われました。

When I was muttering to myself while watching the opening ceremony of the Paralympics, my wife said to me

嫁さん:「いや、それは違うと思う。パラリンピックのアスリートの人たちの、あの物凄いパフォーマンスを、私たちの人生の一場面と見なすのには、無理がある」

Wife: "No, I don't think so. I don't think it's possible to watch those amazing performances of the Paralympic athletes as a scene from our lives."

と言われました。

一瞬で、納得してしまいました。

In a moment, I was convinced.

2021/08,江端さんの忘備録

1000年単位のベストセラー、仏教の経典、コーラン、そして新約聖書に学ぶところは多いと思っています。

I believe there is much to be learned from the best seller of the millennium, the Buddhist scriptures, the Koran, and the New Testament.

例えば、ヨハネによる福音書第8章3~11節の中に、姦通罪で捕らえられた女性をめぐって、イエスと律法学者たちが対決する場面が出てきます。

For example, in the Gospel of John, chapter 8, verses 3-11, we can read a scene where Jesus and the scribes confront each other over a woman caught in adultery.

旧約の律法では、姦通罪は石打ちの死刑にされることになっていました。

In the Old Testament law, adultery was punishable by death by stoning.

判断を求められた主イエスは、次のように言いました。

When asked for his judgment, Jesus said

=====

あなたたちの中で

罪を犯したことのない者が

この女に、まず石を投げなさい

"All right, but let those among you who have never sinned throw stones at this woman"

=====

深い言葉です。

These are profound words.

-----

現代では、三権分立と言論の自由の保障のもと、政策実行の主体である「政府」または「地方自治体(例:東京都)」は、新型コロナ感染対策について、国民や県民等から、批判されています。

Today, under the separation of powers and the guarantee of freedom of speech, the government or local government (e.g., Tokyo Metropolitan Government), which is in charge of implementing policies, has been criticized by the public and prefectural residents for its measures against the COVID-19 infection.

コロナ禍の中、判断を求められた、エンジニアの江端は、次のように言いました。

Asked to make a decision in the midst of the COVID-19 disaster, Ebata, who is an engineer, said

=====

あなたたちの中で

不要不急の外出をしたことがない者が

政府または東京都に、まず石を投げなさい

"All right, but let those among you who have never gone out unnecessarily throw stones at the government or the Tokyo Metropolitan Government"

=====

-----

―― いやいや、そうじゃない

"No, no, no way!"

政府や地方自治体は、国民や住民の行動変容も含めて、その責任があります。

Governments and local governments have the responsibility to include behavioral change in their citizens and residents.

行政府に対する「批判」は、その批判そのものが価値があるものです(代替案を伴う必要もない)。

Any "criticism" of the executive branch is worthy of its own criticism (and need not be accompanied by an alternative).

それに、ヨハネによる福音書第8章3~11節を絶対正義と見なしてしまえば、「法治国家」の否定になります。

Besides, if we regard John 8:3-11 as absolute justice, it would be a denial of the "rule of law".

-----

とは言いつつ、私の身の上ならば、

Having said that, if it were up to me,

「路上飲みをしている奴」とか、「飲酒を伴う深夜をの宴会をしている居酒屋」に向けて、

To "street drinkers" and "taverns that host late-night drinking parties",

『軽石』か『ピンポン玉』くらいなら、投げつける権利はあるのかな、と思っています。

I think I have the right to throw "pumice stones" or "ping pong balls" at them.

2021/08,江端さんの忘備録

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

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

 

踊るバズワード ~Behind the Buzzword(14)STEM教育(2)

“手作りのラズパイ教室”に見るプログラミング教育の縮図

 

Dancing Buzzword - Behind the Buzzword (14) STEM education(2)

The epitome of programming education in the "homemade Raspberry Pi class"

-----

長女は、昨年、国内の女子大を卒業したのですが、以前、興味深いことを言っていました。

My senior daughter graduated from a women's university in Japan last year, and she once said something interesting.

―― 『女性の社会的な立ち位置や、将来の女性の生き方に関する考え方』について強く意識したカリキュラムになっていて、そして、「ほんのわずかだけど、窮屈(きゅうくつ)だと感じることもあった」

"The curriculum was strongly focused on women's place in society and how women should think about their future lives," and "however, there were times when I felt cramped, but only slightly."

と。

私は、「そりゃまあ、女子大こそが、そういう学問の中心的役割をすべきだから、そのカリキュラムは当然だろうと思う」と、応えておきましたが。

I responded, "Well, I think it's natural for women's universities to have such a curriculum, since they should play a central role in such studies."

ただ、そういう社会を作ることを「使命」とされられるような空気があれば、それは、確かに『窮屈と感じるかもしれないな』、とは思いました。

However, if there is an atmosphere in which it is considered a "mission" to create such a society, I thought to myself, "That may indeed feel constricting.

-----

さて、この話、

Now, this story connects to

「女の子だから、コンピュータは苦手だろう」と思っている親は、間違いなく「コンピュータが苦手な女の子」を製造している訳です。

I responded, "Well, I think it's natural for women's universities to have such a curriculum, since they should play a central role in such studies."

の話に繋がります。

何十年か前の「女性に学歴は不要だ」という考え方は ―― もちろん、今の常識からは『ナンセンスの極み』以前に ―― 今や、子ども(特に女性)の生存権を脅かす『テロリズム』とも言えます。

The idea of "women don't need education" some decades ago can now be called "terrorism" that threatens the right to life of children (especially women) -- Of course, from today's common sense, it is 'extreme of nonsense'.

これに対して、私が提示した『「コンピュータが苦手な女の子」の作り方』の話は、なかなか微妙な立ち位置にいます。

In contrast, the story I presented on "How to Create a 'Computer-Hard Girl'" is in a rather delicate position.

というのは、「コンピュータを勉強したいという女の子」の邪魔をしたいという保護者はいないからです(まあ、一部には、そういう低能な保護者もいるでしょうが、レアケースでしょう)。

This is because no parent or guardian wants to interfere with a "girl who wants to learn about computers" (well, there are some parents who are that inept, but they are rare cases).

ただ、保護者は、「コンピュータを勉強したいという女の子」を見つけ出す手段がなく、仮に見つけ出したとしても、コンピュータを教える手段を知りません。

However, parents do not have the means to find girls who want to learn computers, and even if they did, they do not know how to teach computers.

それ故、「コンピュータを勉強したいという子ども」が、自然発生的に出現してくることはありません。

Therefore, there is no spontaneous emergence of "children who want to study computers.

なぜなら、人生の中で、コンピュータを勉強するチャンスは、(『プログラミング教育』でもない限り)、おそらく一生に一度もやってこないからです。

That' s because we probably won't get a chance to learn about computers in our lifetime (unless we have a "programming education").

「数学」も「物理」も「化学」も「生物」も、そういう機会はありませんが、腹だたしいことに「英語」だけは、何度もチャンスがあるのです。

About math, physics, chemistry, and biology, we don't have such opportunities, but about English, to my chagrin, we has many chances.

例えば、毎年、1月と4月だけにバカ売れする「ラジオXXXXX英会話テキスト」が、"それ"です。

For example, "Radio XXXX English Conversation Textbooks" sell like hotcakes only in January and April every year.

-----

ちなみに、江端家のプログラミング教育の環境は、完璧です。

By the way, the environment for programming education in the Ebata family is perfect.

コンピュータは潤沢にあり(ラズパイを入れれば20台はある)、5つのコンピュータ言語に精通し、クラウドからエッジまで、なんでござれのITエンジニアがいます。

We have plenty of computers (20 if you count Raspy), we have IT engineers who are fluent in 5 computer languages, and can handle anything from the cloud to the edge.

問題は、ただ一つだけです。

There is only one problem.

それは、

―― 娘が「プログラミングを教えてくれ」と言い出さないこと

"My daughters don't ask me to teach programming."

です。

-----

まあ、それはそれでいいかな、と思っています。

Well, that's a good thing, I guess.

家の中に『プログラミングをすることが「使命」とされられるような空気』を作るなんてこと、私だって、ゴメンです。

I don't want to create an atmosphere in my house where programming is considered a "mission".

2021/08,江端さんの忘備録

現在、あるテーマで書籍化を検討しているのですが、Latexに近いもの(Re:View等)をもう一度やらなければならないかもしれません。

I am currently considering making a book on a subject, and I may have to do something similar to Latex (Re:View, etc.) again.

私、入社直後、Latexにハマっていて、カンファレンスペーパーも、研究報告書も、それ以外のものも、片っ端からLatexのテンプレートを使って作成していました。

I was hooked on Latex right after I joined the company, and I used Latex templates to create every single conference paper, research report, and other things.

しかし、その後、MicrosoftのWordで、会社が(というか"世界が")侵略され、私はLatexを断念して、Word, PowerPointで自分の世界を変更しました。

But then Microsoft Word invaded the company (or rather, "the world"), and I gave up Latex and changed my world with Word, PowerPoint.

で、実際のところ、会社の業務は全て、Microsoft Officeで、そして、EE Times Japan編集部への入稿も全てWordとPowerPointで行っています。

And, in fact, all of my company's work is done in Microsoft Office, and all of my submissions to the EE Times Japan editorial office are done in Word and PowerPoint.

なのに、

However,

―― もう一度、転向しろってか?

"Will the world expect me the turnabout again?"

いや、それは無理だ。

No, I can't do that.

もはや、世界はMicrosoft帝国の支配下にあり、おそらく、今現在、ドイツ第三帝国よりは、よっぽど信用できる『1000年王国』の最初の世紀の中にある、と思っています。

I believe that the world has been under the control of the Microsoft Empire, and that it is probably the first century of the "1000 year kingdom", which is much more credible than the German Third Reich at the moment.

-----

とは言え、私も「Markdown記法」はラクですし、githubでは、必須の記載形式です。

However, "Markdown notation" is easy to use, and in github, it is a required format.

Latex形式の記述も、多分、私は大好きになるだろうと思います。

I think I'll probably love writing in Latex format as well.

どちらも、サンプルの記載が、美しくて、とても綺麗なのです。

In both cases, the description of the samples is beautiful and very clean.

-----

だが、もう私も歳です ―― ここで、再度の転向をするのは、あまりにキツい。

But I'm too old now -- it's too hard to make another turn here.

なんとか、既存のWordのスタイルファイルで、お茶を濁して、晩年を送りたい。

I'd like to spend my last days with existing Word style files.

という訳で、現在、自分の納得のできるWordのスタイルファイルを求めて、ネットの海を探し回っています。

So, I am currently scouring the sea of the net in search of a Word style file that I can be satisfied with.

2021/08,江端さんの忘備録

(昨日の続きです)

(Continuation from yesterday)

高村薫さん、司馬遼太郎さんの小説で辛いのは、登場人物が多いということです。

One of the hardest things about Kaoru Takamura and Ryotaro Shiba's novels is that they have so many characters.

もちろん、作家の皆さんが、その問題を回避する為に、キャラの特徴付けに工夫をしているのは良く分かっています。

Of course, I'm well aware that the writers are working on characterization to avoid this problem.

あだ名を付けたり、特徴的な振舞いをさせたり、台詞の言い回しを変えたり ―― ですが、私の小さい頭のキャパでは、登場人物全員を覚えることはできないのです。

Give them nicknames, make them behave in a distinctive way, change the way they say lines of dialogue, etc., however, with my small brain capacity, I can't remember all the characters.

正直に言えば、犯人を追う側は3人、被疑者も3人くらいにして欲しい。

To be honest, I'd like to see three people chasing the killer and three suspects.

司馬遼太郎さんの、あの「竜馬が行く」については、小説の中で動かない人物すら登場してくるくらいの勢いで ―― 正直、内容の方は忘れてしまいました。

As for Ryotaro Shiba's "Ryoma Goes", he was so powerful that even the characters who did not move in the novel appeared -- honestly, I forgot about the contents.

-----

いわゆる「ラノベ」と言われているジャンルの本の優れている点は、挿絵(多くは「萌え絵」)で読者の理解を助ける点にあると思っています。

I believe that one of the best things about the so-called "Light novel" genre of books is that the illustrations (often "moe" pictures) help the reader understand the story.

そして、小説から全ての文字を追い出し、全てを挿絵にしたものが「映画」である、と思っています。

And I believe that a "movie" is what you get when you expel all the words from a novel and make everything into illustrations.

故に、「映画が小説より分かりにくい」ということは滅多にありませんが、小説が映画化された結果、激怒する人も多いのも事実です。

Therefore, it is seldom the case that a movie is more difficult to understand than a novel, but it is also true that there are many people who are furious as a result of a novel being made into a movie.

まあ、人それぞれ「作品への思い込み」がありますので、これは仕方がないことではあります。

Well, each person has his or her own "conception of the work," and this is something that cannot be helped.

ともあれ、私は、『長くて読みにくい小説を読破する』ということには価値を見い出せませんが、できれば、自分の頭の中で、『小説を小説のまま楽しみたい』と思っています。

Anyway, I don't find value in 'reading through long and difficult novels', but if possible, I would like to 'enjoy novels as novels' in my mind.

-----

私の場合、これまで自分の会ってきた人や見てきたモノに類似した人やモノをリンクさせて、本を読んでいます。

In my case, I read books by linking people and things that are similar to the people I have met and the things I have seen.

私以外の人は、小説の中の登場人物や、現場は、小説の中で、どのように「見えているのか」に興味があります。

I'm interested in how people other than myself "watch" the characters and the site, in the novel.

-----

とは言え、高村薫さんの小説に対して、『長いよ! もっと簡潔にしてよ!!』などと批評する資格が、私にはありません。

However, in response to Kaoru Takamura's novel, I am not qualified to criticize her novels with saying 'It's too long! Please make it more concise!'

なぜなら、私が寄稿するコラムは、つねに「長い」という批判をされ続けているからです。

This is because the columns I contribute are always criticized for being too long.