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

Amazonに発注した物品の未着率が5割を超えるようになり、Amazonのカスタマーセンタとチャットで議論した件

カスタマーセンタの『後ほど連絡します』を許さずに、「今すぐ調べろ」とゴネると、解決は早いです。

If you don't allow the customer center to say 'I'll call you later' and gong to 'check it up now', the solution will be reached soon.

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

元首相の国葬について、「国を二分する」とまでの規模ではありませんが、議論が噴出しているようです。

Controversy seems to be erupting about the state funeral of former prime ministers, although not on the scale of 'dividing the country in two'.

議論自体は良いことだと思いますが、私が首を炊げているのは、国葬の経費です。

I think the debate itself is a good thing, but I don't understand the the cost of state funerals.

―― 安倍元首相「国葬」経費 約2億5000万円支出を閣議決定

"Cabinet approves expenditure of about 250 million yen for former Prime Minister Abe's 'state funeral'."

これ本当? めちゃくちゃ安くない?と思いました。

"Really, It's too cheap isn't it?" I thought.

お金持ちの家、一件分くらいですよ。

A rich man's house, about the price of one.

-----

だって、国賓レベルの人が大量に国内にやってくるんですよね。

Because people at state guest level are coming to the country in large numbers.

仮に100人の国賓の人がやってきたと仮定すると、そのガードに10人が付いたとして、一人あたりの諸経費が1日50万円として、ざっくり、500万 x 100人 = 50億円ですよ。当然、2~3日滞在するとして、これで、もう200億円です。

Let's assume that 100 state guests arrive, and that 10 people are attached to guard them, and that the overheads per person are 500,000 yen per person per day, roughly, 5 million x 100 people = 5 billion yen. Of course, if they stay for two or three days, that's another 20 billion yen.

今回の、参加予定者は6000人と発表されています。

This time, the number of expected participants is announced to be 6,000.

当然、交通規制、運行制限なども行うわけですから、地方の警察官の動員もかかるでしょうし、国賓は日本国警察の威信をかけて要人警備をするはずです。

Naturally, traffic and operational restrictions will be imposed, so local police officers will have to be mobilised and the prestige of the Japanese police force will be put on the line to provide security for dignitaries.

もし、要人が国内で暗殺されたら、国交断絶のリスクだってあります。

If a key figure is assassinated in the country, there is even a risk of a breakdown of diplomatic relations.

これらをひっくるめれば、500億円なんぞ軽く突破すると思います。

If you put all these together, I think it will easily break the 50 billion mark.

もしも、ですよ。仮に、私が、自分の葬式を6000人規模でやるとしても、会食や接待、移動費用で、一人1万円、6000万円は必要になると思います。

If. If I were to hold my own funeral for 6,000 people, I would need 10,000 yen per person, or 60,000,000 yen, for dinner, entertainment and travel costs.

この私ですら、です。

Even this me.

-----

私は、「金額」についてとやかく言うつもりはありません。

I am not going to quibble about 'amounts of money'.

ただ、数字で連載コラムを担当しているライターとしては、とり急ぎ、"2.5億円"の見積書の概要(項目)を見たいです。

However, as an engineer who is in charge of a serial column with figures, I would like to see an overview (items) of the "250 million yen" quotation at the earliest opportunity.

と、ここまで書いて、『周辺の警備にあたる警察官の人件費などは含まれていないということです』というフレーズを見つけてしまいました。

And then I wrote this far and found the phrase 'This does not include the cost of police personnel to guard the area'.

そりゃ、そうだろう。

That would be.

ではお願いを修正して、「警備のコスも合わせた見積の開示」と致します。

We will now amend our request to "Disclosure of the estimate with security cos.

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

『行政府は、霊感商法等による民事事件係争中、または、損害賠償の確定判決が出た宗教団体とは、今後一切の関連を断つ』

The executive branch will no longer be associated with any religious organisation that has a pending civil case or a final judgment for damages due to psychic or other commercial activities.

と、閣議決定すればいいだけ、という気がするし、

I think that the Cabinet should just decide the above.

または、通常国会でも臨時国会でもいいので、

Or, in the regular or extraordinary session of parliament,

『国会議員は、霊感商法等による民事事件係争中、または、損害賠償の確定判決が出た宗教団体とは、今後一切の関連を断つ』

Members of Parliament will no longer associate with any religious organisation that has a civil case pending against it or a final judgment for damages.

という議決をすればいいだけ、という気がするけどなぁ。

I think that all they have to do is to make a resolution like that.

あとは、賛成しなかった議員を"by name"で教えて貰えれば、それで十分です。

It would then be sufficient if they could tell us the councillors who did not vote in favour of the proposal "by name".

-----

そうすれは、地方自治体や、地方議会にも、その影響は及ぶはずです。

These would then have an impact on local authorities and on local councils.

「宗教の自由」とのバランス上、立法手続なしで、この問題を解決する方法は、これしかないと思うのです。

On balance with 'freedom of religion', I think this is the only way to solve this problem without a legislative process."

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

発明王エジソンの格言に

In the aphorism of Edison, the king of inventors,

「人生に失敗した人の多くは、諦めたときに自分がどれほど成功に近づいていたか気づかなかった人たちだ」

'Most people who fail in life are those who didn't realise how close they were to success when they gave up.'

というものがあります。

私、半世紀を生きてきて分かったことがあります。

I, having lived for half a century, know what I know.

―― エジソン、バカ

"Edison, you idiot"

-----

「諦めないこと」は大切なことかもしれませんが、「諦めないこと」には、膨大な時間やコスト、そして、回りの人へのインパクト ―― 自分だけでなく、回りの人を不幸にする ―― という負のコストがあります。

'Not giving up' may be important, but 'not giving up' has a negative cost in terms of enormous time, cost and impact on those around you - making not only you but also those around you unhappy.

特に、自分へのインパクトは『自分の"心"を殺し、最悪、自分を殺す(自死)』ことです。

Especially, one of the impact to me, is "destory my mind, and to the worst, kill myself".

「始めること」は簡単なんです。

'Getting started' is easy.

ところが、それを「諦めること」は、その100倍以上も難しく、苦しい。

However, 'giving it up' is 100 times more difficult and painful than "getting started".

それが、「サンクコストの呪い」です。

That is the 'curse of sunk costs'.

「諦めること」は、「始めること」より難しく、それ故に、価値があります。

'Giving up' is harder than 'getting started' and, therefore, more worthwhile.

バカなエジソンは、それに気がつかなったようですが、私は、それを知っています。

Stupid Edison didn't seem to realise it. I, however, know that.

-----

最近、カルトに関する本を、片っ端から読んでいます。

I have recently been reading a lot of books on cults

カルト教団を脱退できない人の心理に、「サンクコストの呪い」があることが分かってきました。

The 'curse of sunk costs' has been found to be a psychological factor in people's inability to leave cults.

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

「最初に学ぶプログラミング言語」と聞いて、一瞬"?"と思ってしましました。

When I heard the phrase "The first programming language we should study", I thought "what?".

確かにプログラミングに関しては、現時点で、「体系的な教育法」というのは、ないかもしれません。

Certainly, in the case of programming language, there is no systematic education at the present.

私の場合、一番最初に学んだ言語はBASICでした。

For me, I studied "BASIC" for the first time.

次に覚えたのはPascalで、その次がAssembler、で、その次がCでした。

Next, I learned "Pascal" and the next is "Assembler", and the next is "C"

私の見解ですが、プロセスやらスレッドやらは考える必要はなく、プログラムポイントは1つだけの方が良いと思います。

In my opinion, "processes" and "threads" is no needed, and it is better to have only one programme point.

コンパイルとかライブラリとか、そういう面倒なことも、最初は関わらなくてすむなら、なお良いかなぁ、と。

It is rather good that we don't have to study annoying something like compiling, libraries.

オブジェクトとかの概念も、最初は覚えない方がいいと思う。

I think that no need to learn the concept of objects.

いずれにしても、適当に、その場面に応じて、プログラム言語を使ってきた私には、この件については、何も語れそうにありません。

Anyway, I, who used several programming languages as appropriate and case by case, am not proper person to talk about this issue.

-----

というか、「学ぶプログラミング言語」というフレーズに馴染めません。

Or rather, I am not familiar with the phrase 'programming language to learn'.

「プログラミング言語」は「使うもの」です。

'Programming languages to use' is right.

「使う」プロセスで、必要に応じて仕方なく「学ぶ」ことがある、とは思いますが ――

I suppose there are times when the process of 'using' forces you to 'learn' by necessity, however,

目的のないプログラミングの学習は、必ず行き詰まります。「必ず」です。

Learning programming without a purpose will always fail. Absolutely.

ですが、プログラミングの経験のない人は、プログラムで何ができるのかを知りません。

But people with no programming experience do not know what they can do with a programme.

そういう人に、『目的を持ってプログラミングをやれ』というのは、もう滅茶苦茶な話なのです。

To tell such people to 'do programming with a purpose' is already a mess.

-----

という訳で、この件に関して、私は語るべき言葉がありません。

Therefore, I have no words to say on this matter.

ただ、私は、今なお「プログラミング教育」は、失敗する運命にあるんだろうなぁ、という悲観論は取り下げていません。

However, I have not dropped my pessimism that 'programming education' is still probably doomed to fail.

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

今回の、総理大臣のコロナ感染は不幸なできごとですが、現時点で軽症であるというのは、幸いなことです。

The Prime Minister's corona infection is an unfortunate incident, but it is fortunate that the disease is mild at the moment.

これによって、政府中枢のオンラインによる命令指揮系統が、きちんと確立するのであれば、メリット・デメリットは、イーブンに持ち込めると思います。

If this incident become a triger of making online chain of command at the center of goverment, I think the advantages and disadvamtages is going to be even.

現場に出なければ、全く仕事にならないという職業もありますが、政府行政、官僚機構というのは、リモートワークが進めやすい職場ではないか、と思います。

Some works need to go on-site, however, I think the goverment admisstion and bureaucracy are workplaces where remote working can be easily promoted.

もちろん、政治というのが、要領、印象、パワハラ、業務命令、根回し、怒号、泣き落とし、恫喝(どうかつ)、懇願、妥協、人脈、という『腹芸』から構成されるのは、よく分かっています。

Of course, I know well that politics is made up of the 'tricks of the gut' - the art of the gut, impressions, power harassment, work orders, laying the groundwork, shouting, crying wolf, bluster, pleading, compromise, and connections.

その『腹芸』が、密室や料亭でアルコールを投入しなければ、実施できない ―― というのは「甘え」でしょう。

It would be "naive" to think that this 'belly art' can only be carried out in a closed room or at a ryotei with alcohol.

これからは、『リモートワークで腹芸ができてこそ、一流の政治家であり、官僚である』という時代にしていかなければなりません。

We need to move to an era where 'you are a first-class politician and bureaucrat only if you can work remotely and play with 'belly art'.

-----

そういうことになると、私たちITエンジニアの市場も広がるんですよ。

When that happens, the market for us IT engineers will expand.

例えば、AI技術を使った、『腹芸アシストシステム』です。

An example is the 'Belly Art Assist System', which uses AI technology.

会議システムとは別の画面に

On a separate screen from the conference system,

-「泣落し」のセリフがでてくるとか、

- the lines "weeping drop" are popped-up.

- パワハラにならない恫喝のアドバイスが出てくるとか、

- the advice on non-power-harassing threats will be given

ワクワクするような楽しいシステムが、山のように頭に浮んできます。

A mountain of exciting and fun systems come to mind.

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

csvファイルではなく、直接Golangからブラウザにデータを叩き込む方法

の続編です。

Golangから送り込んできたデータを、chartjs-plugin-streaming(リアルタイムストリーミングデータ向け Chart.js プラグイン)で表示してみました。

まず、main13.go(プログラム本体)とindex.htmlのあるディレクトリに、4つのjsファイルを放り込んでおきます。

main13.goの内容

// main13.go

package main

import (
	"flag"
	"fmt"
	"log"
	"math/rand"
	"net/http"
	"time"

	"github.com/gorilla/websocket"
)

var upgrader = websocket.Upgrader{}

type GetLoc struct {
	ID    int     `json:"id"` // ここだけを使ってデータを運んでいる
	Lat   float64 `json:"lat"`
	Lng   float64 `json:"lng"`
	TYPE  string  `json:"type"` // "PERSON","BUS","CONTROL
	POPUP int     `json:"popup"`
	//Address string  `json:"address"`
}

func echo2(w http.ResponseWriter, r *http.Request) {
	conn2, err := upgrader.Upgrade(w, r, nil) //conn2でwebsocketを作成
	if err != nil {
		log.Println("websocket connection err:", err)
		return
	}
	defer conn2.Close()

	for {
		gl2 := new(GetLoc)
		gl2.ID = rand.Intn(20) // ここで乱数を発生されて、javascriptで受信させる
		gl2.Lat = 181.0        // 不要な定数
		gl2.Lng = 181.0        // 不要な定数
		gl2.TYPE = "BUS"       // 不要な定数
		gl2.POPUP = 101        // 不要な定数

		err := conn2.WriteJSON(&gl2) // JavaScriptの onmessageに向けて送信する
		if err != nil {
			log.Println("ReadJSON:", err)
			break
		}
		fmt.Println("echo2:", gl2)
		time.Sleep(time.Second * 3) // 3秒単位で送信する
	}

}

var addr = flag.String("addr", "0.0.0.0:5000", "http service address") // テスト

func main() {
	http.Handle("/", http.FileServer(http.Dir(".")))

	http.HandleFunc("/echo2", echo2)

	log.Println("server starting...", "http://localhost:5000")
	log.Fatal(http.ListenAndServe("localhost:5000", nil)) // サーバと立てる
}

index.htmlの内容

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>test</title>

</head>

<script type="text/javascript" src="moment.js"></script>
<script type="text/javascript" src="Chart.js"></script>
<script type="text/javascript" src="chartjs-plugin-streaming.js"></script> 



<script>  
    var ws;

    // websocketのオープン(この段階で接続完了)
    ws = new WebSocket('ws://localhost:5000/echo2')  // ユーザ登録画面

    ws.onopen = function (event) {
    }

    ws.onmessage = function (event) {
        // 送られてきたデータを受信して、JSON形式に変更
        var obj = JSON.parse(event.data);
        console.log("obj:",obj);
        console.log("obj.id:",obj.id);
        aa = obj.id;
    }
</script>  

<body BGCOLOR="black" text="white"  STYLE="overflow: hidden;">

	<center>
	  <font size="5">Waking Time(min.) <br></font> <!-- 意味のない表示 -->
	  <font size="5"> 歩行時間(分)</font> <!-- 意味のない表示 -->
	</center>
	
    <canvas id="myChart" width="100" height="85"></canvas>


<script>  
    var ctx = document.getElementById('myChart').getContext('2d');
			var chart = new Chart(ctx, {
				type: 'line',
				data: {
					datasets: [{
                        data: [],  // 1つめ
                        borderColor: "rgba(255,0,0,1)",
                        backgroundColor: "rgba(0,0,0,0)",  
                        lineTension: 0,
                        label: 'Time',
					}]
				},
				options: {
					scales: {
						xAxes: [{
                            type: 'realtime',
                            realtime: {
                                duration: 30000, // 300000ミリ秒(5分)のデータを表示 (コメントアウトすると早く動く)
                                onRefresh: function(chart) {
                                    chart.data.datasets.forEach(function(dataset) {
                                        dataset.data.push({
                                            x: Date.now(),
                                            //y: (Math.floor(Math.random()*16)+30) //30-45の乱数(整数)
                                            y: aa, // この"aa"が、送られてきたデータ
                                        });
                                    });
                                }
                            }

                        }],
                        yAxes: [{
					        ticks: {
					        	max: 20,
					        	min: 0
        					}
                        }]
					}
				}
			});

</script>

</body>
</html>

# go run main.go
として、ブラウザから、http://localhost:5000 で実施すると、以下のような表示がでてきます。

以上

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

私は、「映像の世紀」というNHKドキュメンタリー番組が好きです。

I like the NHK program whose title is "The 20th Century on Film"

今もコーディングしながら、NHKプラス(インターネットでのNHK放送)で、「映像の世紀バタフライエフェクト」を見ながら、コーディングとしています。

Now, white watching "The Century on Film -- butterfly effect" by the "NHK plus" (Internet VOD service), I am coding.

今は、4つほどの番組がアップされているようです。

Now four programs seem to be uploaded.

「太平洋戦争 "言葉"で戦った男たち」というという番組を見ています。

I am watching the program of "The Pacific War: Men Who Fought with Words".

この番組は、米軍が速攻養成した日本語情報士官の話です。

This program is about the US military's fast-track training of Japanese-language intelligence officers.

(1)この学校がコロラド州のボルダーにあったこと、(2)文法無視で、ひたすら読み書きのみで、1年間で日本語が使えるように教育した、という話に興味を引きつけられています。

I am fascinated by the story that (1) the school was located in Boulder, Colorado, and (2) the school ignored grammar and educated the students to use Japanese in one year by solely reading and writing.

私には、米国赴任時に、日本米を手に入れるために隔週でボルダーに通っていた(片道100km先)思い出があり、文法無視の速習語学勉強法にも驚いています。

I have memories of going to Boulder every other week (100 km away each way) to get Japanese rice when I worked in the US, and I was amazed at the grammar-ignoring, rapid-fire language study method.

もちろん、これらの(1)(2)は、番組の本質ではありませんので、興味のある方は、NHKプラスの登録を検討して、番組を見てみて下さい。

I have memories of going to Boulder every other week (100 km away each way) to get Japanese rice when I worked in the US. And I was also amazed at the grammar-ignoring, rapid-fire language study method.

-----

ところが、我が家では、この「映像の世紀」は評判が悪いです。

In the Ebata's, however, the 'The Century on Film' is not popular.

特に、次女は、この番組のテーマソングを聞くと、気分が悪くなるそうです。

In particular, the second daughter feels sick when she hears the programme's theme song.

(YouTubeに飛びます)

次女の学校の先生がこの番組のファンだったようです。

The teacher at my second daughter's school was a fan of the program.

その先生は、学校で、この番組を生徒に見せ続け、次女のトラウマにしてしまったようです。

The teacher kept showing the program to his students at school and the second daughter was traumatized.

-----

私にとっても、「映像の世紀」は、子どもに見て欲しい番組No.1ですが、トラウマにさせたら、逆効果です。

In my mind, "The Century of File" is the No.1 program I want my children to watch, however, it would be counteroffensive if they were to be traumatized by it.

彼女たちは、彼女たちなりのやり方で、独自の価値観を作っていくと信じましょう。

What we have to do, is to believe they create their values in their own way.

もっとも、「李登輝」も知らず「文革」も語れない自分の子どもたちが心配ではありますが、そこは私たちはガマンするしかないのです。

However, I am worried about my children, who do not know "Li Teng-hui" and cannot talk about the "Cultural Revolution", but we have no choice but to be patient.

実際に、歴史の教師は「歴史が重要だ」と言い続けていますが、はっきり言います―― 「古代エジプトのファラオが誰であろうか、その国が滅びようが、それが何だと言うのか」

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

訳あって、今、ビジネスホテルに、パソコン(デスクトップ)を持ち込んで作業をしています。

For some reason, I am now working in a business hotel with my computer (desktop).

ホテルでも有線LANが使えるので、大変助かっています。

I can use wire LAN, so it is very helpful.

原稿書いたり、資料作ったりしているのですが、一つ問題がありまして、LANのアドレス体系が自宅の環境と違うのです。

I am writing documents, and making materials, however there is one problem. The LAN address system is different from my home environment.

いや、「今どき、プログラムにIPアドレスハードコピーするのどうよ」と言われると、何も言えないんですけどね。

No, I can't say anything if you say, "How about hard-copying the IP address into the program nowadays?".

実験用プロトとは言え、TLS対応にしなければならないと面倒が増えます。

Even though it is an experimental prototype, it becomes more cumbersome if it has to be TLS-compliant.

別の鍵つくっても直ぐに捨てなければならないしなぁ~、仕方ないなぁ~、これではコーディングできないなぁ~、残念だなぁ~

Even if I made another key, I'd have to throw it away immediately... I can't help it... I can't code with it... It's a pity...

という訳で、今は、NetFlix見ています。

So now I am watching the NetFlix.

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

私、今月のコラム執筆の為に、統一教会の経典「原理原本」の解説を読んでいました(その概要を、今月のコラムに掲載する予定です)。

For the purpose of writing this month's column, I read some commentaries on the Unification Church's scripture, the Original Book of Principle.

さらに、昨日は、統一教会のマインドコンロールから、家族を救出するまでのドキュメンタリーが記載された本を読んでいました(昔、読んだようにな気がします)

In addition, I read a documentary book about the rescue of families from the Unification Church's mind control.(I think that I read it a long time ago)

-----

あたらめて、統一教会のマインドコントロール(洗脳)は非常に強力で、なかなか解除できないものである、というのが良く分かりました。

Once again, I could understand that the Unification Church's mind control(brainwashing) was very powerful and difficult to break.

この洗脳を、非信者の視点から語るのは容易です。

I think that it is easy to speak about this brainwashing from the view of non-believer.

「原理原本」の内容が、目も眩むほどナンセンスだからです。

This is because the content of the "original principles" is blinding nonsense.

ただ、それは、「私が、統一教会の信者でない」から、そう思えるのです。

However, it seems that way because "I am not a member of the Unification Church".

もし、そうでなかったら、統一教会の教えを否定する者を『すべでサタンである』と考えてしまうのは、無理がないかもしれません。

If this were not the case, it might not be unreasonable to consider those who deny the Unification Church's teachings to be 'they are all Satan'.

-----

この、洗脳状態にある信者の気持ちを理解する方法はないか、と考えいたのですが、昨夜、一つ思いつきました。

I was thinking how to understand the believer's feeling under the mind control, and I came up with one last night.

―― この世界は2次元の平面世界であって、地動説など間違っている

"This world is a two-dimensional flat world, and geocentric theories are wrong"

と、言われたらどうでしょうか(実際に、現在も、そう信じている人がいます)。

What if you are said that (and indeed, some people still believe this to this day)?

「アンチ・コペルニクス・パラダイム」です。

It is the 'Anti-Copernican Paradigm'.

-----

親族やカウンセラーに取り囲まれて、

Surrounded by relatives and counsellors,

『江端! どうして、大地が動くなんてナンセンスな考え方ができるんだ!』

"Ebata! How can you think nonsense about the earth moving!"

『地球が動いていれば、お前だって無事でいられる訳がないだろう!』

"If the earth is moving, you won't be safe either!"

もちろん、私は、万有引力の法則(特殊相対論の等価原理)とか、惑星軌道の話とかを、一生懸命説明します。

Of course, I do my best to explain things like the law of universal gravitation (the equivalence principle of special relativity) and planetary orbits.

さらに、私が、GPS衛星の軌道計算方法や、位置測位のプログラムを出しても、全く彼らは理解しようとしません。

Furthermore, when I give them a programme on how to calculate the orbits of GPS satellites and positional positioning, they do not want to understand it at all.

そんな私に対して、親族やカンセラーは観測された自然現象の話で、反論してきます。

My relatives and counsellors argue against me with stories of observed natural phenomena.

彼らは、気の毒そうな目で私は見て、最後には深く溜息を付くでしょう。

They would look at me with a pensive look and finally sigh deeply.

怒りの限界に達した私は、叫びます。

Reaching the limit of my anger, I shout,

『地動説を理解できないお前たちは、みんな、サタンだ!』

"All of you who don't understand geocentrism are Satan!"

と。

-----

私たちが、カルト宗教によるマインドコントロールについて考えるのであれば、

If we are to think about mind control by cults, we must make an imagination,

『地動説を否定され、地動説を押しつけられ、"降参"と言うまで、絶対に開放して貰えない』

"They deny the geocentric theory, they impose the geocentric theory on us, and they will never let us go until we say, 'I give up'."

というくらいの想像まで、私たちの方から近付いていく必要がある、ということです。

It means that we need to approach them.