2023,江端さんの忘備録

今日は新学期始めての全体ゼミの発表の日です。

Today is the day of the presentation of the first general seminar of the new semester.

発表時間は7分ですが、調子にのって、資料を46ページも作ってしまいました。

The presentation time is 7 minutes, but I ended up making 46 pages of materials.

コラム執筆のノリで作ってしまいました。

I made it with the feel of writing column.

しかし、修正している時間がないので、プレゼン発表の方でなんとかします。

However, I don't have time to fix it, so I will do something about it in the presentation presentation.

つまり、『運用』でなんとかします。

In other words, we will do something with "operation".

-----

バグのあるプログラムを、バグを修正しないままにリリースしなければならないことがあります。

Sometimes I have needed to release a buggy program without fixing the bug.

この場合、そのプログラムの利用者に対して『こういう操作をしないようにお願いする』という対応があります。

In this case, there is a response to the user of the program to "ask not to perform this kind of operation".

これを『運用で対応する』という言い方をします。

This is called "responding with operation".

『過去の私と現在の私の間で行われる、共同開発』

-----

私の人生において『運用で対応する』は、もっとも使われてきたフレーズの一つです。

In my life, "respond with operations" is one of the most used phrases.

"入試"であれ、"仕事"であれ ―― そして"結婚生活"であれ。

Even if it's "entrance exams", "work" or "marriage."

2023,江端さんの忘備録

GO言語のhttp.HandleFunc()の解釈を豪快に間違えていました。

I was boldly misinterpreting http.HandleFunc() in the GO language.

Golangのサーバなんか大嫌い

加えて、長期間ウソを垂れ流してきました。

In addition, I have been lying for a long period of time.

本当に申し訳ありません ―― が、誰からもクレームが付かないということは、もはや「オオカミ少年」と同じ扱いなのかもれれません(単に興味がないだけかも)

I am truly sorry -- but the fact that no one has complained about it suggests that it is now treated like the "boy who warned wolf coming" (or maybe they are just not interested in it).

私、これでも研究員なので、ファクトチェックには気を付けるようにしているです。まあ、努力目標ですが。

I am still a researcher in this, so I try to be careful about fact-checking. Well, it is an effort goal.

-----

これを発見することができたのは、自分の作ったプログラムの動作不良です。

I was able to discover this because of a malfunctioning program I created.

repeated read on failed websocket connection

というか、『今まで、よく問題なく動いてきたなぁ』と逆に感心してしまったくらいです。

In fact, I was so impressed that I was even saying to myself, 'How has it been working without any problems up to now?

これまで専用端末として使っていたものを、公開サービスに作りかえようとして、今回の発見に至りました。

I came to this discovery in an attempt to recreate what I had been using as a dedicated terminal into a public service.

ですが、私は、すでに間違った解釈のプログラムを、バラまいています。

But I am already spreading around a program that is misinterpreted.

-----

『他人の作ったプログラムを、安易に流用すると、こういう怖いリスクが待っている』

"If you easily use a program created by someone else, this kind of scary risk awaits you."

ということは、覚えておいて欲しいです。

So, please keep that in mind.

決して『言い訳』ではありません。

It is never an 'excuse'.

2023,江端さんの忘備録

ノンアルコールビールとは、ビール風味の炭酸水飲料であり、基本的にはコーラなどの炭酸飲料と同じです。

Non-alcoholic beer is a beer-flavored carbonated water beverage, basically the same as cola or other carbonated beverages.

もちろんアルコールはゼロ(*)ですし、カロリーを鑑みても、他の飲料水よりも、はるかに健康的な飲み物のはずです。

Of course, it has zero alcohol(*), and in light of the calories, it should be a much healthier drink than other drinking water.

(*)アルコール度数1%未満のもので、ノンアルコールビールと称呼しているものもありますが、ここでは対象外とします。

(*) Some beers with less than 1% alcohol by volume are called non-alcoholic beers, but are not included here.

―― なぜ、ノンアルコールビールを駅の自販機で取り扱ってくれないの?

"Why don't they carry non-alcoholic beer in the station vending machines?"

私は、普通に通勤や通学や会社の食堂で、普通に飲みたい。

I like to drink normally, on my way to work, to school, or in the company cafeteria.

-----

そもそも、あの缶のデザインからして、まぎらわしい。

To begin with, the design of that can is confusing.

あれでは、本物のビールを飲んでいるように見えます。

That design makes it look like you are drinking real beer.

私、ノンアルコールビールを飲みながら運転することがありますが、多分近い未来、警察に捕まるでしょう(直ぐに解放されるとは思いますが)。

I sometimes drive while drinking non-alcoholic beer and will probably be caught by the police in the near future (although I am sure I will be released soon).

私は、ビールの代替品として飲んでいるのではなく、あのビール独特の麦の味が好きなのです。

I don't drink it as an alternative to beer, I like the unique barley taste of that beer.

そして、せっかくお金を払うのであれば、好きなものを飲みたいのです。

And if I am going to pay for something, I want to drink what I like.

-----

缶のデザインを、本物のビールとそっくりに作っているのは、味覚だけではなく、視覚的にも、『自分はビールを飲んでいるのだと、騙されたい』と思うユーザが多いからだろうなぁ、と思っています。

I wonder if the reason why the can design is made to look exactly like real beer is because many users want to be fooled into thinking that they are drinking beer, not only in terms of taste, but also visually.

気持ちは分かる。

I understand how you feel.

実際、ノンアルコールビールは、飲酒運転防止に大きく貢献していると思っています。

思わず、「アッラーアクバル!」と叫びそうになりました。

In fact, I believe that non-alcoholic beer contributes significantly to the prevention of drunk driving.

まあ、嫌なものが見えてきたりもしますが。

―― アルコール摂取量に応じた、人格の崩壊の有様

Well, sometimes I see things I don't like.

-----

我が家では、私が飲まなくなったことにより、アルコールリテラシーが著しく低い家庭になってしまいました。

My family has become significantly less alcohol literate since I stopped drinking.

なにしろ、『麦茶を炭酸水で割れば、ノンアルコールビールになる』と信じていていた者がいたくらです ―― 嫁さんと次女です。

After all, there was persons who believed that "if you mix barley tea with soda water, you can make non-alcoholic beer". They were my wife and my second daughter.

2023,江端さんの忘備録

NHKスペシャル 「ナチス 科学者たちの罪と罰」を見ました。

I watched NHK Special "Crime and Punishment of Nazi Scientists".

まあ、題目からも明らかなように、ナチス・ドイツの様々な非人道的な政策に対して、科学的根拠(お墨付き)を与えるだけに留まらず、積極的に協力してきた科学者たちの話です。

Well, as is clear from the title, this is a story about scientists who have not only provided scientific evidence (endorsement) but have actively cooperated with Nazi Germany's various inhumane policies.

この番組を見て思ったことは、『科学者が"正義"を持つと、ろくなことにならん』というあたりまえの感想ではありません。

What I thought when I watched this program was not the obvious impression that "it is not good when scientists have "justice". It was, that

―― ああ、私だって、簡単に、そっち側になる

"Yeah, I could easily be on your side, too."

ということでした。

そもそも、今でこそ"ナチズム"は、完全否定される"悪"として断罪されていますが、当時のドイツ国内では"正義"であったし、いまでもナチズムの信奉者は少なからず存在します。

To begin with, "Nazism" is now condemned as an "evil" that is completely denied, but at that time it was "righteous" in Germany, and even now there are not a few adherents of Nazism.

そもそも"正義"と"悪"の概念は、時代と環境に応じて変化するものです。

To begin with, the concepts of "justice" and "evil" change with the times and the environment.

特に『権力サイドに忖度しなければ、殺されてしまう』という状況では、"正義"や"悪"などの概念を易々と越えてしまいます。

Especially in a situation where "if you don't give the power side the benefit of the doubt, you will be killed," the concepts of "justice" and "evil" are easily transcended.

-----

という話、これまでもいくつも書いてきたなぁ、と思い、同じことを繰り返して言う「認知症的症状」が顕著になってきているので、この話はここまでにしておきましょう。

I have written about this many times in the past, I thought. I have recently been suffering from "dementia-like symptoms" of repeating the same thing over and over again, so I will leave this story at this point.

―― 江端さんって、ナチズムの信奉者なのですか?

とは言え、私が録画している番組の多くに、「ヒトラー」「ナチス」「ナチズム」が入っています。

Nevertheless, many of the programs I record have "Hitler," "Nazis," and "Nazism" in them.

案外、私の家族が、私のことを『ナチス党員』または『ネオナチのシンパ』と思っているかもしれんなぁ、と心配になることがあります。

I sometimes worry that my family might think I am a 'Nazi Party member' or a 'neo-Nazi sympathizer.

------

念に為に、繰り返し申し上げておきますが、

Just to be sure, let me reiterate,

―― 「逆だよ! 逆! 私は『ファッキン、ナチ』の側だよ」

"It's the other way around. I am standing on the side of "Fucking Nazi!""

です。

2023,江端さんの忘備録

ここ1週間ほど、横浜市交通局バス関連リアルタイム情報の取得手段と、それを使ったビューアを作っていました。

「Protocol Buffersって何? 」から、「公共交通オープンデータ」を攻略する

For the past week or so, I have been working on a means of obtaining real-time information related to Yokohama City Transportation Bureau buses and a viewer that uses this information.

昨日1日で、基盤のコードを差し替えて、AWSにアップして、TLS対応して、最終的にサーバ化に成功しました。

Yesterday in one day, I replaced the code of the infrastructure, uploaded it to AWS, TLS support, and finally succeeded in making it a server.

しかし、私ですら、これがたった1日で完了するとは思っていなかったので、驚いています(大抵の場合、完工までは、見積の3~10倍になります)

But even I was surprised, as I did not expect this to be completed in just one day(In most cases, the estimated cost will be 3 to 10 times the estimated cost until completion).

どうして、こんなミラクルができたのか?

How was this miracle possible?

―― 過去の私が助けてくれたから

"Because my past helped me"

です。

-----

私、2020年5月に、自分のホームページのプラットフォームをWordPressに置き替えました。

I, in May 2020, replaced my website platform with WordPress.

で、そこに、ジャンル無視で、メモを書きまくり、無節操に公開してきました ―― よくご存知だとは思いますが。

And there I have been writing notes all over the place, ignoring genres, and publishing them in an uncontrolled manner -- as I'm sure you are well aware.

もちろん、そのメモは『私だけが分かれば良い』というものであって、前提条件や構築環境や指定するディレクトリなどは、全部無記載のままです。

Of course, the notes are 'only for me to know', and all the prerequisites, construction environment, and directories to be specified are left undocumented.

正直『私以外の他人が読んでも、まったく分からんだろう』と思います。

I honestly think, 'If someone else other than me reads it, they won't understand it at all.

しかし、書いてきた私にだけには『分かる』。

But only I, who have been writing, 'get it'.

これ、結構、重要です。

This is pretty important.

-----

このようなメモであれば、別にブログで公開しなくても良いと思いますよね。

If it is a memo like this, it doesn't needs to be published on a blog.

しかし「ブログ」にすると、『置き場所が分からなくなること』を防止できるのです。

However, "blogging" prevents 'misplacing'.

WordPressで一元管理すると、私がどこにいようが(会社、実家、大学、その他)、キーワード一発で、過去もメモを探し出すことができるのです。

When I centralize my notes in WordPress, no matter where I am (office, parents' house, university, etc.), I can find my past notes with a single keyword shot.

そして、WordPressは、コードを綺麗に表示したり、情報を貼り付けたりするのに、とても便利なのです。後日の追記も簡単です。

And WordPress is a great way to display code nicely and paste information. It is also easy to add later.

これに慣れてしまうと、メモ作りなんぞ、アホらしくてやってられません。

Once I get used to this, making memos is just plain stupid.

-----

もちろん、私のプライベートに関わるものもあるのですが、そのような情報は非公開にしています。

Of course, some of the information concerns my personal life, but I keep such information private.

ところが、WordPressは、この「非公開機能」が、あまり当てにならない。

WordPress, however, is not so trustworthy with this "private" feature.

で、今日、セキュリティ上の深刻な問題点を見つけてしまったので、大慌てて対応していました(本日の4時間を持っていかれてしまいました。まだ完了していません)。

So, today I found a serious security issue and was in a big hurry to deal with it (it took 4 hours of my day. It has not been completed yet).

-----

私、分からないことがあると、Googleよりも、自分のブログで検索をします。

When I don't know something, I search on my blog rather than Google.

相当高い確率で、私のブログは、私の疑問に応えてくれます。

At a fairly high rate, my blog answers my questions.

私自身は、『情報発信』なんぞは比較的どーでもよく、『過去の私に助けて貰う』という視点からブログを使い倒しています。

I myself am relatively unconcerned about "information dissemination" and use blogs from the perspective of "getting help from the past me.

そのツールとしてWordPressはお勧めです。

I recommend WordPress as a tool for this purpose.

まあ、私、ブログのプラットフォームとしては、ベタベタなhtmlとWordpressしか知らないので、比較のしようがありませんが。

Well, I only know sticky html and WordPress as blogging platforms, so I have no way to compare them.

2023,江端さんの技術メモ

"github.com/gorilla/websocket"の有名なバグ(らしい)

■PruneMobile側(sever.go)

■gtfs_hub側(gtfs_hub.go)

■対策

[Go言語/JavaScript]WebSocketsでチャットアプリを実装!~ユーザーリスト表示編~


PruneMobile側(sever.go)の方が先に落ちる(確認) → で書き込みできなくなってgtfs_hub側(gtfs_hub.go)も落ちる、と、多分、そんな感じ。

"repeated read on failed websocket connection"を普通に読めば、「間違ったWebsocket接続で、*何度*も読み込みを繰り返している」なので、read errorが発生したら、即コネクションクローズして、クライアントも落してしまえばいいのかな、と考えました。→ ダメでした。サーバが落ちて処理が止まります。

で、以前、

Golangのサーバなんか大嫌い

で、

"http.HandleFunc()"は、クライアントがやってくるごにに一つづつ立ち上があるfork()のようなものである

てなことを書いていたので、read errorqを検知したら、forループから直ちにbreakして、クライアントをクラッシュさせてしまうこと(ができるものと)しました。→ ダメでした。サーバが落ちて処理が止まります。

 

for (){
      (色々)
           err = webConn.ReadJSON(&locMsg2) // ここでPanic serving  ... repeated read on failed websocket connectionが発生している可能性あり
           fmt.Printf("c6: ")
           if err != nil{
              fmt.Printf("Before webConn.close(), After c6:")
               webConn.Close()
               break → ダメ
           }
}

javascript (onload.js) の方にも、終了理由がでるように、以下のコードを追加しました。

// サーバを止めると、ここに飛んでくる
  socket.onclose = function (event) {
      console.log("socket.onclose");
  
      let obj = JSON.parse(event.data);
  
      console.log("socket.onclose: obj.id:", obj.id);
      console.log("socket.onclose: obj.lat:", obj.lat);
      console.log("socket.onclose: obj.lng:", obj.lng);
      console.log("socket.onclose: obj.type:", obj.type);
      console.log("socket.onclose: obj.popup:", obj.popup);
  
      socket = null;
  
      // 切断が完全に完了したかどうか
      if(event.wasClean){
          var closed = "完了";
      } else {
          var closed = "未完了";
      }
      info.innerHTML += "切断処理:" + closed + "<br>";
      info.innerHTML += "コード:" + event.code + "<br>";
      info.innerHTML += "理由:" + event.reason + "<br>";
  
  }
  
  window.onunload = function(event){
      // 切断
      ws.close(4500,"切断理由");
  }

上記の「ダメ」の対策中

https://ja.stackoverflow.com/questions/12389/golang%E3%81%A7%E3%83%9A%E3%83%BC%E3%82%B8%E3%82%92%E5%86%8D%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF%E3%81%99%E3%82%8B%E3%81%A8websocket-server%E3%81%8C%E8%90%BD%E3%81%A1%E3%82%8B


■問題解決編

色々問題があったのですが、順番に説明していきます。


	var addr = flag.String("addr", "192.168.0.8:8080", "http service address") // テスト
	....
	.....
	http.Handle("/", http.FileServer(http.Dir(".")))


	http.HandleFunc("/echo", echo)                                           // echo関数を登録 (サーバとして必要)
	log.Fatal(http.ListenAndServeTLS(*addr, "./cert.pem", "./key.pem", nil)) // localhost:8080で起動をセット
}

まず第一に、http.HandleFunc()の誤解がありました。私は、これを、fork()のようにプロセスかスレッドを発生さるものと思っていましたが、これは、一言で言えば、単なるコールバック関数でした。

乱暴に言えば、Webからアクセスがあると、echo()というファンクションに吹っ飛ばされる、という現象を発生させる"だけ"で、それ意外のことは何にもしてくれないのです。

では、echo()の方はどうなっているかというと、

func echo(w http.ResponseWriter, r *http.Request) { // JavaScriptとの通信
	webConn, err := upgrader.Upgrade(w, r, nil)
	if err != nil {
		log.Println("websocket connection err:", err)
		return
	}
	defer webConn.Close()

とすることで、webSocket通信の準備ができて、その通信路が"webConn"にできる、ということです。
で、それ意外のことは何もしてくれないのです。

つまり、2つのWebブラウザからアクセスがくると、その度、echo()に飛んできて、その度に、異なるwebConnを生成する、ということです。

ここまでの説明で分かると思いますが、つまり、Webブラウザがくる度に、それをどっかに格納しておかないと、通信路の情報が上書きされてしまいます

なので、基本的には、以下のwebConnを、配列に格納しておきます。

var clients = make(map[*websocket.Conn]bool) // 接続されるクライアント
という動的な配列を準備しておき、アクセスがある度に、
// クライアントを新しく登録(だけ)
    m1Mutex.Lock() // 同時書き込みを回避するため、ミューテックスロックで囲っておく
    clients[webConn] = true  // これで、Webからのアクセスがある度に、通信路情報が動的に追加される
    m1Mutex.Unlock()

というように、Webブラウザとの通信路を別々に管理しておきます。

もし、fork()みたいなことがしたいのであれば、goroutineを起動して、そのgoroutineにWebブラウザの通信路を明け渡す必要があります。それでも、通信路の全体管理は、echo()が握っているので、webConnを消滅されたい場合は、echo()の方でやって貰う必要があります。

この方法を実現する方法として、GO言語のサンプルプログラムで良く登場するのが、以下のような方法です。

// 江端のPCでは、c:\users\ebata\test20230412\main.go

package main

(中略)

func handleConnections(w http.ResponseWriter, r *http.Request) {
    // 送られてきたGETリクエストをwebsocketにアップグレード
    ws, err := upgrader.Upgrade(w, r, nil)
    if err != nil {
        log.Fatal(err)
    }
    // 関数が終わった際に必ずwebsocketnのコネクションを閉じる
    defer ws.Close()

    // クライアントを新しく登録
    clients[ws] = true

    for {
        var msg Message
        // 新しいメッセージをJSONとして読み込みMessageオブジェクトにマッピングする
        err := ws.ReadJSON(&msg)
        if err != nil {
            log.Printf("error: %v", err)
            delete(clients, ws)
            break
        }
        // 新しく受信されたメッセージをブロードキャストチャネルに送る
        broadcast <- msg
    }
}

func handleMessages() {
    for {
        // ブロードキャストチャネルから次のメッセージを受け取る
        msg := <-broadcast
        // 現在接続しているクライアント全てにメッセージを送信する
        for client := range clients {
            err := client.WriteJSON(msg)
            if err != nil {
                log.Printf("error: %v", err)
                client.Close()
                delete(clients, client)
            }
        }
    }
}

上記の例では、 http.HandleFunc("/ws", handleConnections) で、handleConnectionsをコールバック関数にしておき、こちらにWebブラウザからのアクセスを全部任せます

でもって、ついでにWebからやってくる通信の全てを受けつけています(ReadJSON())。さらに、webブラウザが突然閉じられた場合などは、通信エラーとして検知して、それをクローズした後に、webConnの配列から取り除いています。これで、このブラウザからの通信路は閉じらて、消されます。

で、この通信の内容を、チャネルを使って、go handleMessagerで作った、fork()みたいなgoroutineに流し込んでいます。

結論として、fork()みたなことがやりたければ、「自力で作れ」ということになります


しかし、WebSocket単位で別々のgoroutine作るのも面倒くさいです。それに、もしそのようなgoroutineを作ったとすれば、ブロードキャストを実現しなければなりませんが、チャネルには、ブロードキャスト機能がありません(どうしても使わなければならない時は、私はredisを使っています)。

ですので、私、チャネルの配列を作って疑似的なブロードキャストを実現しようとしたのですが、このサンプルプログラムが見るからなくて、困っていました。

『echo()関数の中で、全てのWebコネクションを相手にできないかな』と考え始めました。

基本形はこんな形

for {
     message <- channel // 外部から送られてきたデータ
     for client := range clients{ //clientsはWebConnのリスト
           client.WriteJSON(message)
           client.ReadJSON(message2}
     }
}

問題は、Webブラウザは終了処理などなどをせずに、閉じられてしまうことにあります(私たちが普通にやっていることです)。

とすれば、echo()の中でコネクションの切断を検知して、それをWebConnのリスト から取り除く必要があります。

で、こんなことやってみたんですよ。

for {
     message <- channel // 外部から送られてきたデータ
     for client := range clients{ //clientsはWebConnのリスト
           err = client.WriteJSON(message)
           if err != nil{
               client.Close()
               delete(client, clients)
           err =  client.ReadJSON(message2}
           if err != nil{
               client.Close()
               delete(client, clients)
     }
}

これでは、for ルーチンの中で、回している変数を減らすという処理が不味かったようで、この場合、 echo()が終了してしまうようでした。当然、repeated.....も含めて、エラーの嵐になりました。

なので、こんな風に変更しました。


var delete_client *websocket.Comm
for {
     delete_client = nil
     message <- channel // 外部から送られてきたデータ
     for client := range clients{ //clientsはWebConnのリスト
           err = client.WriteJSON(message)
           if err != nil{
               delete_client = client
           }
           err =  client.ReadJSON(message2}
           if err != nil{
               delete_client = client
           }
     }
     if delete_client != nil{
        delete_client.Close()
        delete(clients, delete_client)
}

つまり、ループの外でコネクション処理を行う、ということです。
ただ、この方法では、ループを回っている途中に2つ以上のWebブラウザが落された場合にどうなるか、という問題が残ります。
この場合、「次のループでエラーを検知するのを待つ」という処理で対応する、と腹を括りました。
なぜなら、repeat..... のエラーは、積り積って発生することを経験的に知っていましたので、それまで通信障害したまま走って貰えばいい、と割り来って考えることにしました。


結論としては、

(1)http.HandleFunc()は、Webからの接続要求時に、飛される先の関数を記述するもの(コールバック関数)であり、
(2)そのコールバック関数の中だけで、入出力処理がしたいのであれば、ループを壊さないような工夫をして、上手く運用すれば、上手くいく(ことがある)

という結論になりそうです。

 

2023,江端さんの技術メモ

公開回、秘密鍵の対応

log.Fatal(http.ListenAndServeTLS(*addr, "./cert.pem", "./key.pem", nil)) // localhost:8080で起動をセット

if httpErr = http.ListenAndServeTLS(*addr, "./fullchain.pem", "./privkey.pem", nil);

ということで、 cert.pem = fullchain.pem  key.pem = privkey.pem で良いのだろう

Let's encrypt を試してみた件(整理は明日)

2023,江端さんの忘備録

今、ガリガリと、英語のカンファレンスペーパーを書いています。

I'm scribbling away and writing a conference paper in English.

(私の執筆スタイルについては、こちらをどうぞ)

(For more information on my writing style, please click here.)

翻訳エンジンがあるからできることです。

This is possible because of the translation engine.

-----

私、一度、英文チェックの外注を通してから論文を学会に投げたら、学会のレビューアーから、

Once I pitched a paper to a conference after going through an outsourced English language check, from a reviewer at the conference, I was given the following message.

『英文がなっていない』

"Your English sentence is not good enough"

というレビューが返ってきたことがあります。

その件を、外注先にクレームとして報告したら、慌てて担当者を交代させてきました。

When I reported the matter to the subcontractor as a complaint, they rushed to replace the person in charge.

この外注先、いつもエラそうに、私の英語の品質に最低の評価結果を付けて戻してくるので(そんな、いらんこと、せんでもいいのに(多分、うちの会社が頼んでいるんだろうが))、久々に胸のすく思いがしました。

This subcontractor, who always comes back with the lowest rating on the quality of my English (even though they don't have to do that (maybe my company is asking them to do it)). Anyway I had felt happy for long time.

しかし、その後、私は、外注チェックの依頼をしなくなりました。

After that, however, I stopped asking for outsourced checks.

腹が立ってきたからです。

I was getting angry at the conference.

『私の英文が気にいらないなら、それならそれで構わん。それを理由にリジェクト(却下)してもらって結構だ』

"If you don't like my English, that's fine, and you can reject it for that reason."

という気持ちになりました。

I felt that.

私的な見解ですが ―― 現在のアカデミズムに決定的に欠けているのは『思いやり』なんじゃないかなぁ、と思うのです。

-----

確かに私たちノンネイティブが書く英語は、ネイティブから見れば、不自然なものかもしれません。

It is true that the English we non-native English speakers write may be unnatural from the perspective of native speakers.

勿論『意味が通じない』というのであれば、批判されて仕方がないと思いますが、『不自然』であるというコメントには、納得できません。

Of course, if it 'doesn't make sense', then I guess I can't help but be criticized, but I don't agree with the comment that it is 'unnatural'.

こちらにも書いていますが、私は、英語の種類は、世界の国の数だけ、あるいは世界の人の数だけある、と思っています。

As I wrote here, I believe that there are as many varieties of English as there are countries in the world, or as many people in the world.

 

『自分がラクして読めない英文を、寛容に受けいれることが、インターナショナルであり、多様性だろうが』と思うのです。

I think, 'Tolerance and acceptance of English texts that you cannot read with ease is what makes us international and diverse'.

-----

別の方向からも考えてみました。

I thought about it from another direction.

最近、「異世界ファンタジー」流行っているじゃないですか(流行っているんです)。

Recently, "otherworldly fantasy" has become popular (it is so).

で、ここで、『世界共通語が日本語であり、アカデミズムの世界では、日本語が研究分野の共通言語である』という異世界を想定します ―― ファンタジーの要素はなさそうですが。

So, here we assume an alternate world where 'the universal language is Japanese, and in the world of academia, Japanese is the common language of research fields' -- although there does not seem to be an element of fantasy.

そこに、漢字が誤記だらけで、"てにをは"が滅茶苦茶、関係代名詞"that"をそのまま「それは」とか翻訳したような文が提出されたとしたら、

If a sentence was submitted that was full of kanji errors, "te ni wo ha" was a mess, and the relative pronoun "that" was translated as "that",

『さすがに、これは読みにくいだろうなぁ』

'As expected, this will be hard to read'

とは予想できます。

そして、レビューアーの私は、

And I, as the reviewer, might responce the following,

『日文がなっていない』

"Your Japanese sentence is not good enough."

と返事をするかもしれんなぁ、と。

-----

あれ? というとは、私の論文の英文は、『そういう感じの英文』だったということ?

Huh? Does that mean that the English sentence of my paper was 'that kind of English sentence'?

と、今、いきなり弱気になっています。

And now I am suddenly feeling vulnerable.

2023,江端さんの忘備録

シニアは「窓際」というイメージがあります。

Seniors workers have an image of being "window-dressers".

『楽しい「追い出し部屋」ライフ』という観点からも、プログラミング技術の取得はお勧めです。

しかし、今の私は、窓の外にいます ―― 「屋外の工事現場」です。

But now I am outside the window -- an "outdoor construction site".

一人の労働者として、道路工事や建設現場でがんばっている高齢の職人さん達をみると、肩を組んで、歌いながら、一緒にお酒を飲みたい、という気持ちになります ―― 本当です。(私は、今、断酒中(4年目)ですが)。

As a worker, when I see elderly craftsmen working hard at road and building construction sites, I want to rub shoulders with them, sing with them, and have a drink with them -- really. (I am currently in my fourth year of sobriety).

-----

私の今の仕事を端的にいうと、「(有)江端ソフトウェア開発」という会社の個人事業者です。

To put my current job in a nutshell, I am the sole proprietor of a company called "Ebata Software Development, Inc."
(*)新会社法施行後「有限会社」は消滅していますが、ここでは、『有限責任』の概念として使用します。

但し、(1)発注仕様書を自分で作り、(2)納期を自分で決定し、(3)完工後のメンテナンスは自分の気分次第、という、他のソフトウェアの外注会社から見れば『激怒される』ような内容ですが。

However, at this company, (1) I make the order specifications myself, (2) I decide the delivery date myself, and (3) maintenance after completion depends on my own mood. From the perspective of other software outsourcing companies, this is the kind of work that would make them "furious.

まあ、だから「(有)江端ソフトウェア開発」であって、「(株)江端ソフトウェア開発」ではないのです。

Therefore, the company is not ordinary one.

-----

この状況は、深刻な人手不足がもたらしているのかもしれません。

This situation may be brought about by a severe shortage of labor.

新入社員の段階で、『上流工程』だの『コンセプト』だのと言うことはできても、モノを作った経験がないエンジニアが大量に送り込まれてくるからです。

This is because a large number of engineers are sent in at the new hire stage, who can talk about "upstream processes" and "concepts," but have no experience in creating things.

だから、私は、「昔取った杵柄(きねづか)」を、手放すことができないのです ―― 今や、私の「杵柄」はボロボロです。

That's why I can't let go of my "kinezuka" -- my "kinezuka" is now in tatters.

正直、私は『シニアになれば、新しい技術を使い倒す若者によって居場所がなくなる』と信じていました。

Frankly, I believed that 'when I become a senior, I will be displaced by young people who will use up all the new technology.

ところが、蓋を開けてみれば、道路工事や建設現場やシステム開発だけでなく、日本全体が「シニア」をアテにしているという状況(惨状)です。

However, when we open the lid, we find that not only construction sites and system development, but also the whole of Japan is relying on "seniors" (a disastrous situation).

-----

まあ、これ「彼ら」が悪いというよりも、「雇用主(会社)」が悪い。

Well, this is not so much "their (the newcomer's)" fault, but rather "the employer's (the company's)" fault.

趣味でも勉強でもバイトでも構いませんが、自力でシステムを組み上げたこともない人が、どうやってモノを作れるのか、私は今でも分からなのですが ―― 会社の募集要項に、確かに書かれているんですよね。

It doesn't matter if it's a hobby, study, or part-time job, I still don't know how a guy who has never put together a system on his own can build things.However the application guidelines certainly say that.

『プログラミング経験は、採用の要件ではない』、と。

Programming experience is not a requirement for employment."

確かに、プログラミングだけができても駄目ですが、プログラミングの経験すらない人が、システムを語れるのか、私には甚だしく疑問なのです。

Well, it is true that it is no good if one can only program, but I highly doubt that a person without even programming experience can talk about systems.

私は、過度な現場主義を嫌悪していますが、一人で、スクラッチからシステム(Webページくらいでも良い)を組み上げる経験をしたことをない人間を、モノ作りの仲間として認めるのは、大変難しいです。

I detest excessive fieldwork, but it is very difficult for me to accept a person who has never built a system (or even a web page) from scratch by themselves as a member of the manufacturing community.

-----

では、江端は入社時にプログラミングができていたのか?

So, was Ebata able to program when he joined the company?

実際のところ、入社時の私のプログラミングは、N80-BASICクラスの「動いているだけ」という程度のものでした。

In fact, my programming skills at the time I joined the company were about the N80-BASIC level, so called "just working".

本格的なコーディングは、入社後だったと思います ―― なので、入社時の私のスキルは、今の若い人と同じです。

I think the real coding started after I joined the company -- so my skills at the time I joined were the same as a young person today.

後は、個人的なイデオロギーの違いがあるだけです。

The rest is just personal ideological differences.

『"動いていない"は、"無い"と同じである』と、私は信じていますので。

I believe that "not moving" is the same as "not existing".

-----

とは言え、「(有)江端ソフトウェア開発」は、プログラミングだけしていればよい、という会社ではありません。

However, "Ebata Software Development" is not a company that only needs to do programming.

20ページのプレゼンテーション資料を1時間で作ったり、1日で研究報告書を執筆しろと言われたり、ソフト外注先のプログラムの動作不良を潰すことを頼まれたり、無茶な学会発表を命じられたり、予算の計算したり、各種の発注作業をしたり、大学の授業を受けたり、講義したり ――

The company was asked to create a 20-page presentation in an hour, write a research report in a day, crush a software subcontractor's program malfunction, present at a conference, calculate budgets, place various orders, take university classes, give lectures, and so on. --

それでも、

Howeve, it is

―― 『動かせ』と言われたら、"No"と言わない(言えない)会社

"The company that does't or cannot say "No", whenever asked to move something"

です。

『自作のプログラミングコード一本で、研究原資という"タマ"を取りに行く』