2024,江端さんの技術メモ

//  G:\home\ebata\hakata\src\others\main26\main.c

/*
このプログラムは、PostGISを使用したPostgreSQLデータベースに対して、ランダムウォークを実行し、その経路をCSVファイルに記録するものです。プログラムの概要を以下に説明します。

■プログラムの目的
出発ノードと目的ノード(天神駅に近いノード)を設定し、データベース上のノード間をランダムに移動しながら、最終的に目的ノードに到達する経路を記録します。
経路をCSVファイルに保存し、各ノードの緯度、経度情報を含めます。

■主な機能と処理の流れ
1.データベースへの接続
sql.Openを使って、PostgreSQLデータベースに接続します。接続情報はconnStr変数で定義されます。
2。出発ノードと目的ノードの設定
startNodeとして、仮に32758を設定し、goalNodeとして天神駅のノードIDである40922を設定しています。

3.CSVファイルの作成
os.Createでファイルを作成し、CSV形式で書き込むための準備をします。

4.ランダムウォークの実行
performRandomWalk関数内で、出発ノードから目的ノードへと移動を行います。
各ノードの緯度と経度を取得し、CSVファイルに記録します。

5.ノード間の移動の処理
getClosestConnectedNode関数を使って、現在のノードから接続されているノードを取得し、目的地に最も近いノードを選択します。
選択の基準として、訪問回数が少ないノードを優先し、ランダム要素を加えます(袋小路の回避)。

6.経路の記録
移動したノードの情報を、performRandomWalk関数内でCSVファイルに記録します。ノードID、緯度、経度が書き込まれます。

7.座標の取得
getNodeCoordinates関数で、ノードIDに対応する緯度と経度をPostGISの関数ST_YとST_Xを使用して取得します。

8.2点間の距離の計算
calculateDistance関数で、2つの座標間の距離を計算します。地球の半径を用いて、Haversineの公式で計算しています。

■プログラムの特徴

1. 訪問回数の管理: 同じノードを何度も訪問しないように、各ノードの訪問回数を管理しています(訪問回数が多いノードは回避します)。
2. ランダム要素の導入: 最短経路だけではなく、一定の確率で他の接続ノードを選択し、袋小路を避けるように工夫しています。
3. バックトラッキング: 袋小路に入った場合に、直前のノードに戻るバックトラッキングの処理を行っています。

■プログラムの全体の流れ
1.データベース接続を確立。
2.出発ノードと目的ノードを設定。
3.CSVファイルを作成し、ヘッダーを記述。
4.ランダムウォークを実行し、ノード間を移動。
5.各ノードで緯度・経度を取得し、CSVファイルに書き込む。
6.目的ノードに到達するまで、最も適切な接続ノードを選択し続ける。

このプログラムは、ランダムウォークアルゴリズムをPostGISとPostgreSQLの地理情報を活用して実現しており、目的地に到達するまでの経路を記録する機能を持っています。

*/

package main

import (
	"database/sql"
	"encoding/csv"
	"fmt"
	"log"
	"math"
	"math/rand"
	"os"

	_ "github.com/lib/pq"
)

const (
	connStr = "user=postgres password=password host=127.0.0.1 port=15432 dbname=hakata_db sslmode=disable"
)

func main() {
	// PostgreSQLデータベースへの接続
	db, err := sql.Open("postgres", connStr)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	// 出発ノードを設定(天神駅の最も近いノードを選択するなど)

	startNode := 32758 // 例として、初期ノードIDを設定
	goalNode := 40922  // 目的ノードIDを天神駅に設定

	// CSVファイルを作成
	csvFile, err := os.Create("random_walk_result.csv")
	if err != nil {
		log.Fatal(err)
	}
	defer csvFile.Close()

	writer := csv.NewWriter(csvFile)
	defer writer.Flush()

	// CSVのヘッダーを作成
	err = writer.Write([]string{"Node", "Latitude", "Longitude"})
	if err != nil {
		log.Fatal(err)
	}

	// ランダムウォークの実行
	err = performRandomWalk(db, startNode, goalNode, writer)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println("Random walk completed and saved to CSV.")
}

// performRandomWalk ランダムウォークを実行し、結果をCSVに保存
func performRandomWalk(db *sql.DB, startNode, goalNode int, writer *csv.Writer) error {
	currentNode := startNode
	visited := make(map[int]int) // ノードの訪問回数を追跡
	pathStack := []int{}         // バックトラッキング用のスタック

	for currentNode != goalNode {
		// 現在のノードの緯度と経度を取得し、CSVに書き込み
		lat, lon, err := getNodeCoordinates(db, currentNode)
		if err != nil {
			return err
		}
		fmt.Printf("Node %d: Latitude: %f, Longitude: %f\n", currentNode, lat, lon)
		err = writer.Write([]string{
			fmt.Sprintf("%d", currentNode),
			fmt.Sprintf("%f", lat),
			fmt.Sprintf("%f", lon),
		})
		if err != nil {
			return err
		}
		writer.Flush()

		// 現在のノードを訪問済みとして記録
		visited[currentNode]++

		// 次のノードを取得(目的地に近づくノードを優先)
		nextNode, err := getClosestConnectedNode(db, currentNode, goalNode, visited)
		if err != nil || visited[nextNode] > 2 { // 訪問回数が多い場合バックトラック
			if len(pathStack) > 0 {
				// スタックから一つ戻る
				fmt.Printf("Backtracking from Node %d\n", currentNode)
				currentNode = pathStack[len(pathStack)-1]
				pathStack = pathStack[:len(pathStack)-1]
				continue
			}
			return fmt.Errorf("no viable path found")
		}

		// 次のノードをスタックに追加
		pathStack = append(pathStack, currentNode)
		currentNode = nextNode
	}

	// ゴールノードの座標をCSVに保存
	lat, lon, err := getNodeCoordinates(db, goalNode)
	if err != nil {
		return err
	}
	fmt.Printf("Arrived at Goal Node %d: Latitude: %f, Longitude: %f\n", goalNode, lat, lon)
	err = writer.Write([]string{
		fmt.Sprintf("%d", goalNode),
		fmt.Sprintf("%f", lat),
		fmt.Sprintf("%f", lon),
	})
	if err != nil {
		return err
	}
	writer.Flush()

	return nil
}

// getClosestConnectedNode 現在のノードから接続されているノードのうち、目的地に最も近いノードを取得
func getClosestConnectedNode(db *sql.DB, currentNode, goalNode int, visited map[int]int) (int, error) {
	// 現在のノードから接続されているノードを取得
	query := `
		SELECT target 
		FROM ways 
		WHERE source = $1
		UNION 
		SELECT source 
		FROM ways 
		WHERE target = $1;
	`
	rows, err := db.Query(query, currentNode)
	if err != nil {
		return 0, err
	}
	defer rows.Close()

	// 接続ノードのリストを作成
	type NodeDistance struct {
		ID       int
		Distance float64
	}
	var connectedNodes []NodeDistance
	for rows.Next() {
		var node int
		if err := rows.Scan(&node); err != nil {
			return 0, err
		}

		// ノードの座標を取得
		lat, lon, err := getNodeCoordinates(db, node)
		if err != nil {
			return 0, err
		}
		// 目的地との距離を計算
		goalLat, goalLon, err := getNodeCoordinates(db, goalNode)
		if err != nil {
			return 0, err
		}
		distance := calculateDistance(lat, lon, goalLat, goalLon)

		// 訪問回数が少ないノードを優先
		if visited[node] < 3 {
			connectedNodes = append(connectedNodes, NodeDistance{
				ID:       node,
				Distance: distance,
			})
		}
	}

	if len(connectedNodes) == 0 {
		return 0, fmt.Errorf("no connected nodes found")
	}

	// 目的地に最も近いノードを優先して選択
	var closestNode NodeDistance
	minDistance := math.MaxFloat64
	for _, node := range connectedNodes {
		// 最も目的地に近いノードを選択
		if node.Distance < minDistance {
			closestNode = node
			minDistance = node.Distance
		}
	}

	// ランダム選択の要素を追加(袋小路を避けるため)
	if len(connectedNodes) > 1 && rand.Float64() < 0.2 {
		return connectedNodes[rand.Intn(len(connectedNodes))].ID, nil
	}

	return closestNode.ID, nil
}

// getNodeCoordinates ノードIDに対応する緯度と経度を取得
func getNodeCoordinates(db *sql.DB, nodeID int) (float64, float64, error) {
	var lat, lon float64
	query := `
		SELECT ST_Y(the_geom) AS lat, ST_X(the_geom) AS lon
		FROM ways_vertices_pgr
		WHERE id = $1;
	`
	err := db.QueryRow(query, nodeID).Scan(&lat, &lon)
	if err != nil {
		return 0, 0, err
	}
	return lat, lon, nil
}

// calculateDistance 2つの座標間の距離を計算
func calculateDistance(lat1, lon1, lat2, lon2 float64) float64 {
	rad := func(deg float64) float64 {
		return deg * math.Pi / 180
	}
	lat1Rad, lon1Rad := rad(lat1), rad(lon1)
	lat2Rad, lon2Rad := rad(lat2), rad(lon2)
	dlat := lat2Rad - lat1Rad
	dlon := lon2Rad - lon1Rad
	a := math.Sin(dlat/2)*math.Sin(dlat/2) + math.Cos(lat1Rad)*math.Cos(lat2Rad)*math.Sin(dlon/2)*math.Sin(dlon/2)
	c := 2 * math.Atan2(math.Sqrt(a), math.Sqrt(1-a))
	const EarthRadius = 6371e3 // 地球の半径(メートル)
	return EarthRadius * c
}

2024,江端さんの技術メモ

上記のDBはpostGISで構成されており、ways, ways_vertices_pgr があり、SQLでダイクストラ計算が行えます。

ここで以下のようなステップを行うランダムウォークをpostGISを使ったpostgreSQLを使ってGo言語で作成してみました。

(Step.1) ランダムォークの終了地点は、天神駅とする

(Step.2) 出発地点を乱数デ適当に選んで下さい。出発地点は、天神駅から1km程度の地点を適当に抽出する

(Step.3)天神駅の座標から最も近いNode(以下、これを天神ノードといいます)と、出発地点から最も近いNode(以下、これを出発ノードと言います)を抽出する

(Step.4) 出発ノードと天神ノードを直線で繋いで、出発ノードから-90度から+90度の範囲のノードを一つ選ぶ

(Step.5)上記で見つかったノードを次の出発ノードとする。正し、すでに出発ノードとしたノードを、新しい出発ノードにはできないようにする

(Step.6)上記(Step.4)に戻って、天神ノードに到着するまで、出発ノードを更新し続ける。なお更新される出発ノードは全てノド番号と緯度と座標を表示させる

というようなアルゴリズムで、ランダムウォークを作ろうとしたのですが、ダメでした。

一言でいうと「どんつき」の路地に入る→袋小路に入ってしまって、そこで動けなくなるからです。

これを回避するアルゴリズムを考えるの面倒になって、pgr_ksp()を使うことにしました。

pgr_ksp()は、最短経路問題の1、2、3、4番目を出してくれるので、これで1000番目とかを仕えば、そこそこランダムウォークになるかな、と思いまして。

// G:\home\ebata\hakata\src\others\main25\main.go

package main

import (
	"database/sql"
	"encoding/csv"
	"fmt"
	"log"
	"os"

	_ "github.com/lib/pq"
)

const (
	connStr = "user=postgres password=password host=127.0.0.1 port=15432 dbname=hakata_db sslmode=disable"
)

type PathResult struct {
	PathID int
	Node   int
	Lat    float64
	Lon    float64
}

func main() {
	// PostgreSQLデータベースへの接続
	db, err := sql.Open("postgres", connStr)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	// すべてのパス結果を一度に取得
	results, err := getPathResults(db)
	if err != nil {
		log.Fatal(err)
	}

	// 各パスIDの結果をCSVに保存
	pathIDs := []int{1, 5, 10, 100, 1000, 10000}
	for _, pathID := range pathIDs {
		filename := fmt.Sprintf("path_id_%d.csv", pathID)
		err := saveResultsToCSV(results, pathID, filename)
		if err != nil {
			log.Fatal(err)
		}
	}

	fmt.Println("CSV files created successfully.")
}

// getPathResults すべてのパス結果を取得
func getPathResults(db *sql.DB) ([]PathResult, error) {
	// クエリで指定のpath_idの結果をすべて取得
	query := `
		WITH ksp_result AS (
			SELECT * FROM pgr_ksp(
				'SELECT gid AS id, source, target, cost FROM ways',
				35382,  -- 出発ノードID
				40922,  -- 目的ノードID
				10000,   -- 上位10000本の経路を取得
				false   -- エッジの向きを考慮しない
			)
		)
		SELECT ksp.path_id, ksp.node, ST_Y(wv.the_geom) AS lat, ST_X(wv.the_geom) AS lon
		FROM ksp_result AS ksp
		JOIN ways_vertices_pgr AS wv ON ksp.node = wv.id
		WHERE ksp.path_seq > 0
		ORDER BY ksp.path_id, ksp.path_seq;
	`

	// クエリの実行
	rows, err := db.Query(query)
	if err != nil {
		return nil, err
	}
	defer rows.Close()

	// 結果をメモリに保存
	var results []PathResult
	for rows.Next() {
		var result PathResult
		err := rows.Scan(&result.PathID, &result.Node, &result.Lat, &result.Lon)
		if err != nil {
			return nil, err
		}
		results = append(results, result)
	}

	return results, nil
}

// saveResultsToCSV 指定されたpath_idの結果をCSVに保存
func saveResultsToCSV(results []PathResult, pathID int, filename string) error {
	// CSVファイルの作成
	file, err := os.Create(filename)
	if err != nil {
		return err
	}
	defer file.Close()

	writer := csv.NewWriter(file)
	defer writer.Flush()

	// CSVのヘッダーを作成
	err = writer.Write([]string{"Node", "Latitude", "Longitude"})
	if err != nil {
		return err
	}

	// 結果をCSVに書き込む
	for _, result := range results {
		if result.PathID == pathID {
			err := writer.Write([]string{
				fmt.Sprintf("%d", result.Node),
				fmt.Sprintf("%f", result.Lat),
				fmt.Sprintf("%f", result.Lon),
			})
			if err != nil {
				return err
			}
		}
	}

	return nil
}

 

1番目、10番目、1000番目を表示してみました。
まあ、ランダムウォークという感じではないですが、私たちが移動するときも、まあ、こんな感じだと思うので、とりあえずこれで進めようかなと思います。

2024,江端さんの忘備録

本日、長女の結婚式と披露宴に出席してきました。

Today, I attended my eldest daughter's wedding and reception.

私はもともと「本当に結婚式なんてやるの?」と否定的でしたが、終わった今でもその気持ちは変わりません。

I was initially pessimistic about the whole thing, thinking, “Do they have to have a wedding?” that feeling has not changed.

ただ、娘の希望には応えるのが親というものですから、準備を進めてきました。

However, as parents, we must respond to our daughter's wishes, so we have been preparing.

- 髪を伸ばしたり(基本的に私はほぼ丸刈りに近いスポーツ刈り)
- 髪を染めたり(人生初の経験)
- オールバックにするためにジェルで髪を固めたり
- ダイエットしたり(これは人間ドック対策も兼ねていますが)

- Growing my hair out (basically, I have a close-cropped sports cut)
- Dyeing my hair (a first for me)
- Using gel to make my hair stand up in an 'all-back' style
- Dieting (this is also partly to prepare for a full medical check-up)

こうして、娘の希望に合わせて自分の見た目を変えてきましたが ―― まあ、それはいいんです。

This way, I have changed my appearance to suit my daughter's wishes, but that's okay.

---

一番気が重かったのは「バージンロード」のイベントでした。

The event that made me feel the most nervous was the “Aisle of Roses” event.

このイベントは「新婦のエスコート」や「新婦の引き渡し」と呼ばれるものだそうです。

This event is called “escorting the bride” or “handing over the bride.”

しかし、「これって、現代の価値観に合っているの?」と感じずにはいられません。

However, I can't help but wonder, “Does this fit with modern values?”

少し調べてみたところ、「父親が新婦をエスコートしてバージンロードを歩くのは、新婦のこれまでの人生を守り育ててきた象徴」とされていますが、私はそんなに娘の人生を守り育てた覚えはありません。

After researching, I found that “the father escorting the bride down the aisle is a symbol of the father protecting and raising his daughter's life until now,” but I don't remember protecting and raising my daughter's life so much.

娘は自分の力で、自分の人生を生きてきたと信じています。

I believe that my daughter has lived her own life by her strength.

私が提供したのは、資金とちょっとしたアドバイスくらいです。

All I provided was a little bit of advice and some funding.

また、「新婦を家族間で承認し、祝福する」という意味が含まれるそうですが、結婚は当事者の意思で行われるべきもので、他人の承認は必要ないと思います。

It is also said to include the meaning of “approving and blessing the bride by the family,” but I think that the will of the people involved should do marriage and that the approval of others is not necessary.

「バージンロードでの新婦の受け渡し」という表現にも違和感を覚えます。

I also feel uncomfortable with the expression “handing over the bride on the aisle.”

私の娘を「荷物扱い」するのか、と。

I thought they were treating my daughter like luggage.

こう思う父親は、私だけではないと思うのですが。

I don't think I'm the only father who thinks this.

---

とはいえ、娘の希望ですから、否応なく任務を果たしました。

However, since it was my daughter's wish, I fulfilled my duty whether I liked it or not.

何十年ぶりかの「演技」を披露した感じです。

It was like performing an “act” for the first time in decades.

私は元演劇サークルのメンバーですから、「普通の父親」を演じるのは簡単なことです。

I used to be a member of a theater club, so it's easy for me to play the role of a “normal father.”

エルカン文章第3弾 - 祝・江端智一君御成婚記念メール

---

長女のイベントが無事終わりましたが、次女は「今日以上の盛大な結婚式」を希望しているようです。

The eldest daughter's event went smoothly, but the second daughter seems to be hoping for a “more grand wedding than today's.”

私の娘たちの保守的なイベントへの情熱には驚かされます。

I'm amazed at the passion my daughters have for conservative events.

どうやら私は、もう一度「髪を伸ばし、染め、ジェルで固め、娘のエスコートをする」ことになりそうです。

I'll have to do it all again: grow my hair, dye it, gel it, and escort my daughter.

---

結婚自体が難しいこの時代に、こんな些細なことで文句を言える自分は、随分と贅沢なことを言っているんだ、と自覚してはいるんですけどね。

Nowadays, when getting married is difficult, I'm aware that I'm being selfish by complaining about such a trivial matter.

未分類

エルカン文章シリーズの中では、最高級の作品として半永久的に江端書房に保管さ れるであろう見事なレポートが提出されました。

私がレポートを書くよりずっと面白いと思うので、本「エルカン文章」を持って、 私の結婚式の御報告に換えさせて頂きます。

本日は、この文章を御笑納頂き、後日改めて御挨拶申し上げたく希望しております。

---------

それでは御笑納下さい。江端さんのひとりごと特別編、エルカン文章第3弾「祝・ 江端智一君御成婚記念メール」です。

------------------------------------------------------------------------


 


 

Tomoichi Ebata
Wed Apr 17 13:29:08 JST 1996

2024,江端さんの忘備録

私は、これまでずっと「夢」と呼ばれるもののの「害悪」や「呪い」について、散々述べてきました。

I have been talking a lot about the “harm” and “curse” of what is called a “dream.”

そして『「夢を諦める」という行為の正しさを評価し、それをいくつもある選択肢の一つとしなければならない』と、何度も繰り返し言ってきました。

I have said many times that we must evaluate the correctness of 'giving up on a dream' and consider it one of the many options available.

あなたの夢を諦めないで

私は、子どもたちに、常に「7~8割で切り上げよ。決して100%を目指すな」と言い聞かせてきました。

―― エジソン、バカ

―― 「夢を諦める」ことは、「夢を叶える」ことと同程度に有意義である

元高角三(げんこう かくぞう)という生き方

「体罰」を放棄する代償

それに、まあ、ぶっちゃけ、研究員なんぞ、「サンクコストの製造装置」といっても、いいくらいです。

21世紀に残したくない曲 100選

ただ、「夢を諦める」ことは、「失敗」ではありませんが、「大変痛い」です。

However, “giving up on your dreams” is not a “failure,” but it is “excruciating pain.”

「夢を諦めない」ほうが、圧倒的に"楽"で、痛みを感じることは"少ない"です。

It is overwhelmingly easier and you feel less pain if you “don't give up on your dreams”.

なにしろ、今迄やってきたことを止めて、新しいことを始めるのは、恐しくコストが高く、そして恐しいからです。

After all, stopping what you have been doing and starting something new is frighteningly expensive and frightening.

『あの10年、全くの無駄だった』と思うと、やはり悔しい思いはあります。

それでも、私が「夢を諦める」ことを強く勧めるのは、夢に拘泥すると、『自死に至るケース』が無視できないレベルに多いからです。

Even so, I strongly recommend that you give up on your dreams because there are too many cases of people who become so obsessed with their dreams that they end up killing themselves.

なにしろ、私は、その経験者の一人です。

After all, I am one of those who have experienced it.

(↑クリックするとコラムに飛びます)

(Click to go to the column)

-----

しかし、私が20年近く語ってきたことも、この本の説得力には遠く及びません。

However, what I have been saying for nearly 20 years is far from the persuasiveness of this book.

(↑ クリックするとAmazonに飛びます)

(Click to go to Amazon)

のんきに「夢は実現しなければ、意味がない」などと本気で考えていると ―― いずれ「自分で自分を殺すこと」になります。

If you naively think that “dreams are meaningless unless they come true,” you will eventually “kill yourself.”

マジです。

I'm serious.

逆に、そこまで至っていない人の言う"夢"なんて ―― 所詮はポップミュージックで叫ばれているような、ふわふわした願望程度のもので―― そんなものは、"夢"とは呼びません。

On the other hand, the “dreams” of people who haven't gotten that far are just wishful thinking, like the kind you hear in pop music, and I don't call those “dreams.”

2013,江端さんの忘備録

あまりにも腹が立ったので、数日、この日記をリリースするのを差し止めていましたが、数日経過しても、私の気持には揺らぎがないことを確認したので、リリースします。

------

教育現場において「体罰」に「効果」があるのはあたりまえです。

「銃を付きつけられたら、誰だって従う」という、この野蛮な理屈と同じであるからです。

私は、少くとも我が国は、

―― 「体罰」に「効果」はあるのは知っているが、それを「止めよう」と決めた国

であると思っていました。

例えば、クラウゼヴィッツを出すまでもなく「戦争は政治(外交)の延長である」のは自明です。

しかし、戦争が、どんなに優れた外交的効果が期待できたとしても、我が国は、

―― 決して戦争をしない、

―― 決して核兵器を持たない

と決めました。

本当に凄いことだと思います。

一方、

―― 我が国の教育現場は、「体罰」を絶対的な意味において封印した

この教育方針は、この「戦争放棄」の理念と並び立つ、我が国が誇る教育信条であると、私は、ずっと信じていました。

-----

「今まさに、自殺をしようとしている子供を力づくで止める為に、止むなく体罰を行使した」という、緊急避難的な状況での話なら、ともかく、だ。

高々「チームを強くする為」程度のことに、「体罰が有効だ」と、この教師は言ったそうですね。

多分、この教師は人気があって、生徒からも同僚からも信頼を得ていて、間違いなく人間として尊敬するに足ると思われている人間だろうとは思います。

なにせ「校長」から体罰を「看過」して貰っていた程の人間ですから。

だが、私は、そんなことはどうでもよいのです。

この教師は、「効果」として「体罰」をいう手段を行使した ―― この一点において、私はこの教師を絶対に許せない。

この教師は、信じられないくらい、無知で、低能で、下劣で、百万の罵声を浴びせても、まだ足りないくらいに、「最低な奴」と、私は決めつけます。

その程度の知性しかない人間が教師をやっているかと思うと、絶望的な気分になります。

『「体罰」以外のありとあらゆる手段を考えて、試して、実施して、それでも上手くいかなくて辛くて、悔しくて、そうして一人で泣く』 それが、教師だろう、と思うのです。

私は、この教師を含め、「体罰」に「効果」を求める全ての教師を、問答無用で、絶対に許しません。

-----

何度も書きましたが、私は、学生の頃、ギリギリまで迷い、最後の最後で「教職」を断念した人間です。

私は、自分のことを

『効率的な手段を求めて、簡単に「体罰」を行使するタイプの、狭量で卑怯な人間だ』

と自分自身で、よく判っていたからです。

だから私は、「教師」を選んだ奴には、絶対に優しく接しない。

教師という、この世で一番辛い職業を選んだのであれば、一番辛い道を歩け。

その覚悟がないなら、初めから教師なんか選択するな、馬鹿野郎めが。

-----

しかし、教師が生徒の全ての責任を負わされる、という今の状況は、絶対的な意味で、間違っていると思います。

「体罰」以外の方法を全て試みても、なお、思いの届かない子供もいます。

それは、もう、

―― 諦める

という選択をする時期に来ているのではないか、と思うのです。

 

それは、教師、子供、保護者、社会の全てを不幸にするものではありますが、「どっちもダメ」などと、外部の者が勝手に言うことは、甚しく卑怯であると思えるのです。

「体罰」を放棄する代償として「諦める」というのは、概ね、妥当な対価であると、私には思えます。

今回のケースに当て嵌めるのであれは、

「体罰を行使してまで強くしたチームの実力など、髪の毛程の価値もない」

で良いのです。

-----

金八先生や、GTOや、ごくせんは、どこにもいない。

どこにもいないからこそ、これらがドラマとして成立する。

そんなことは、もう誰もが知っていることです。

2012,江端さんの忘備録

たまたま見た、ドラえもんのアニメだったと思います。

ストーリは概ねこんな内容だったかと。

(1)のび太が、タイムマシンで見てきた未来を、「占い」として皆にしゃべっていた時、元高角三という小説家を目指しているもののデビューできずにいる男から、『自分が作家になれるか否かを占って欲しい』と言われる。

(2)のび太は、5年後へ見に行くが、彼は作家としてデビューできていなかったので、その旨を告げると、彼は「きっぱり諦める」といって去っていった。

(3)のび太は、再度、5年後の未来へ行って彼の様子を見にいくと、彼は、アルバイトを続けながら、小説を書き続けていた。

(4)のび太が「どうして、やめなかったのか」と尋ねると、彼は「小説を書いていることが、楽しいから」と笑顔で応えた。

(5)その時、沢山のテレビ局や新聞社の人が家にやってきて、彼の小説が文学賞を受賞したという報告を受ける。

-----

この話、(5)があっただけで、全てが台無しになった。

(4)で終っていれば、名作中の名作で終った筈なのに、「立身出世」「成功賛美」を描いただけの駄作に堕ちた、と思う。

-----

「楽しい」だけで、自分の好きなことを続け、世間に対して揺がない人生は、

『それ自体が「奇跡」と呼べる程の大成功である』

というメッセージを送れる、稀有な機会であったはずなのに、と思えるのです。

2018,江端さんの忘備録

(昨日の続きです)

(Continuation from yesterday)

では、なぜ、そのような大人や教育者がいないかというと、

So, why such adults and educators do not exist, is

多くの大人や、教育者になるような人は、そもそも、「狂気と孤独の世界で、かつ、たった一人で楽しんで生きる」という人生を生きなかった(or 生きれなかった)人だからです。

Many adults and educators, initially, have not lived their lives (or have not been able to live their lives) "In a world of madness and loneliness, and enjoy living alone."

-----

加えて、

In addition, I refer to the following facts,

(3)高い目標をかかげる夢は、概ね挫折する

(3)A dream that needs aiming high is generally broken down.

という事実にも言及しておきたいと思います。

目標のある夢の中でも、特に定量化(合格する or NOT、800点以上 or NOT)する夢は、そこに達成できない間、ずっと自分を痛め苦しめ続けます。

You will continue to suffer from aiming high, which is significantly quantifiable, such as passing or not passing and scoring over 800 points or less.

自分を痛め苦しめ続けるようなことは、継続できずに挫折します。

It is impossible to continue, and finally, it will break you down.

挫折できたなら、まだ幸運です。挫折できない場合、自分の心や体を壊し、最悪の場合、自分を殺します。

Just "breaking down" is lucky for you. If not, the dream breaks your body and mind, and, in the worst case, you will kill yourself.

これは、私の独自の調査と、私自身の体験からも明らかです。

These were based on my research activities and my experiments.

ですから、以前から私が言い続けていますが、

The following, which I have been telling you for a long time, is

―― 「夢を諦める」ことは、「夢を叶える」ことと同程度に有意義である

"Abandon of your dream is valuable for you, equal to "make your dream".

という、私のポリシーに帰着します。

That is my policy.

-----

ところで、

By the way,

次女が、現在、「バクマン」という漫画に嵌っています。

my second daughter is really into a comic named "Bakuman."

この漫画が、素晴しい作品であることを認めるものの、私は好きではありません。

I admit these comics are masterpieces, but I don't like them.

2024,江端さんの忘備録

昨日、「シニアは世間のトレンド(コンプライアンス等)に対して、反応速度が遅い」というようなことを書きました。

Yesterday, I wrote, “Seniors are slow to react to societal trends (such as compliance, etc.).”

しかし、シニアであったとしても、別段努力しなくても、世の中に追従していきます。

However, even if I am a senior, I will keep up with the world without making any particular effort.

以前、こんな日記を掲載しました。

I have published a diary like this before.

「笑点」に笑えず、「サザエさん」に嫌悪感を感じる ――

昨日、嫁さんの会話の中で「さだまさしの『関白宣言』は昔から不愉快であったが、最近は我慢ができない程に不快になった」という話題が出てきました。

Yesterday, in a conversation with my wife, Sadamasashi's “Kanpaku Sengen” came up, and she said that she had always found it unpleasant but that recently, it had become so offensive that she could no longer bear it.

ここで重要なことは、当時の不愉快と、今の不愉快は、そのスケールが全然違う、ということです。

The important thing here is that the scale of the unpleasantness of those days and the unpleasantness of today are entirely different.

―― "ギャグ"の一言では済まされない歌だ

私が申し上げたいことは、「シニアは世間のトレンド(コンプライアンス等)に対して、反応速度が遅い」が、「反応しない訳ではない」ということであり、シニアの価値観も『完全に固定されている訳ではない』ということです。

What I want to say is that “seniors are slow to react to trends in society (such as compliance),” but that “it does not mean that they do not react” and that the values of seniors are “not completely fixed.”

まあ、世間に100%逆らいながら生きていくのは、恐しくエネルギーが必要であり、比して、得られるリターンは「世間からの嫌悪」です。これでは割に合いません。

Well, living your life in complete defiance of society requires a lot of energy, and the only thing you get in return is “hatred from society”. This is not worth it.

-----

「社会的価値観は、2週間単位でバージョンアップし続けている」と、私は言い続けています。

I keep saying, “Social values are being upgraded every two weeks.”

これに追従するのは大変ですが、それでもやっていかなければ、生きていくことはできません。

It's hard to keep up with this, but if we don't do it, we won't be able to survive.

―― そもそも、そういう下品なイベント以外に、自分たちが楽しめるイベントを自力で企画・運営できない

で、思うのですが、

So, I wonder

―― 今の政権与党のバージョンアップは、どのくらいの時定数(期間)なんだろう?

"how long is the time constant (period) for the current ruling party's version upgrade?"

と思うことがあります。

少なくとも「2週間単位」ではないようように見えます。

It doesn't seem to be at least “every two weeks.”

なんか、投票日前にせっせと墓穴を掘っているように見えて、大変興味深いです(例:党非公認の候補者への資金提供)。

It's exciting to see them busily digging their graves before the election day (e.g., funding unofficial party candidates).

-----

私、現状を1mmも変えないまま、安全で平和な死を迎えたいだけの、バリバリの保守です(と自負しています)が、ちょっと厳しいなぁ、と思っています、

I am a staunch conservative (and I like to think so) who just wants to die peacefully and safely without changing the status quo even by 1mm, but I think it's a bit harsh.

2024,江端さんの忘備録

先日、学会のホテルの予約をしたのですが、間違って喫煙室を予約してしまいました。

The other day, I made a reservation at a hotel for a conference, but I made a mistake and booked a smoking room.

というか、今も「喫煙ルーム」って残っているんだなぁ、と、妙な感心をしてしまいました。

Or rather, I was strangely impressed that “smoking rooms” still exist.

私、以前、間違えて新幹線の喫煙席選んで、10分で頭痛がして、1時間半、ずっと立っていたことがあります(というか、昔は、新幹線に喫煙車両があったんですよ)。

I once mistakenly chose a smoking seat on the Shinkansen and got a headache after 10 minutes, so I had to stand for an hour and a half (or rather, there used to be smoking cars on the Shinkansen).

信じられないかもしれませんが、昭和は「禁煙エリア」が圧倒的に少数で、デフォルトが喫煙エリアだったのです。

Believe it or not, there were very few “no smoking” areas in the Showa period, and the default was a smoking area.

平成あたりから徐々に勢力図が変化してきて、今は、「喫煙エリア」が少数というか、かなり絶滅に置い込まれています。

Since around Heisei, the balance of power has gradually shifted, and now, “smoking areas” are few and far between or have almost become extinct.

-----

私の感じでは、米国から後追いで10~20年といったところでしょうか。

I think it will be 10 to 20 years behind the United States.

2000年あたりで私が米国で働いていた時は、オフィスの同僚は、完全防寒の装備をして、喫煙の為にマイナス10度の屋外に出ていきました(大袈裟ではないです。冬のコロラドは、本当にマイナス10度になります)。

When I was working in the US around the year 2000, my colleagues at the office would smoke outside in the minus 10-degree weather, fully equipped for the cold (I'm not exaggerating—it really does get minus 10 degrees in Colorado in winter).

江端さんのひとりごと 「ホワイトアウト」

『そこまでしても吸いたいのがタバコ』というものですよね。分かりますとも。

'Even if it means that much, I want to smoke.' I understand.

-----

喫煙エリアの縮小傾向の日米間の遅延は15年でしたが、国内における、関東エリアから地方エリアへの波及は、私の所感では「年速50km」という感じでしたね。

The delay between Japan and the US, where smoking areas were shrinking, was 15 years, but the spread from the Kanto area to the local regions of Japan was, in my opinion, like “50 km per year”.

うん、名古屋は、関東エリアから確実に6~10年は遅れていたと思う。基準は「飲食店」(の、特に"コメダ")ですね。分煙エリアがなくて驚いたことを覚えています(今は、すっかり変っていますが)。

I think Nagoya was 6 to 10 years behind the Kanto area. The benchmark is “restaurants” (especially “Komeda”). I remember being surprised that there were no smoking areas (although that has completely changed now).

これは、良いとか悪いとかの話ではなく、トレンドの浸透率には距離が関係しているという、一般の物理法則の話です。

This is not a discussion of whether something is good or bad but of the general physical law that distance is related to the penetration rate of trends.

あと世代間距離、というのもありますね。これは、コンプライアンスに関して顕著です ―― 年寄(シニア)の世間との"ズレ"というのは、避けられません。私もあなたも。努力は怠ってはなりませんが、私たち(シニア)が時代についていけないことは、もう諦めましょう。

There is also the issue of intergenerational distance. This is particularly noticeable regarding compliance - there is no avoiding the gap between the older generation and the world around them. Neither you nor I can prevent this. We must not neglect our efforts, but we must also accept that.

-----

西田敏之さんの代表作映画である「釣りバカ日記」が地上波で放映できないのは ―― まあ、いわゆる、放送できないんですよ。

Toshiyuki Nishida's masterpiece, “Tsuribaka Nikki,” can't be broadcast on terrestrial TV because it isn't available.

大炎上間違いなしですから(多くは語りませんが「コンプライアンス」です)。

It's sure to be a huge hit (I won't say much, but it's about “compliance”).