0207|09|
2007|09|10|12|
2008|01|02|03|
2009|01|05|08|10|11|12|
2010|01|02|03|04|09|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|

2014-06-19 ―― そのプログラムコードを、誰かの役に立てたい [長年日記]

今、週末研究員の立場で、C(C++ですらない)を使って、シミュレータ作っています。

Now I am making a simulation program based on "C" language (still not "C++").

オブジェクト指向という概念を知ってプログラムを書き始めて、20年という永遠に近い悠久の時を経て、今、改めて思っているのですが、

After knowing "Object-oriented programming", more than twenty years, through eternity time, has passed. I re-think again that,

"I wonder if the concept of object-oriented is really needed."

と、思い始めています。

-----

■可読性、すごく悪いですよ。(なんで自分の書いたソースコードの追跡がこんなに大変なんだっけ?)

- Readability is very bad. (Why should I feel hard to track my source codes?)

■インターフェイスが一義的でないので、どのメソッド読んでいるか特定できないし、

- An interface is not unique, so I cannot specify which method I should read.

■オブジェクトの定義が、別のファイルに入っていると絶望的に追跡が面倒になるし、

- If the definition of an n object is in another file, code tracking is terrible complicated.

■知らないところで、継承されたオブジェクトが使われているかと思うと、怖くてメソッド叩けんし。

- If someone made an inherited object, I feel fear to make the method because I don't estimate results.

いや、勿論、クラスを「データのおにぎり」化できるという点では、めちゃくちゃに便利だと思いますよ。

Of course, I know it is very convenience in order to make like a "rice-ball of data", though,

でも、それって、structを使えば足るでしょう?

I think that "struct" is enough.

「おにぎり」の中に「おにぎり」を正方体に変形させるメソッドなんかがいるかなぁ?

Do we really need a method to change the "rice-ball of data" with "rice-square of data”?

「おにぎり」は、外部のファンクションさんに、握り直して貰えばいいと思うのですよ。

I think external functions are good to do the processes if we need them,

-----

いや、勿論、この理屈は不当です。よく分っています。

I know better that this logic is unfair.

しかし、私は、もう誰かと共同でシステム開発をする予定はないし、私の私による私だけのシミュレータなのですから、インターフェイスなんぞ、私の好きなように定義します。

In my case, I have no plans to develop a system with someone in the future. The simulation program is just mine, so I will define the interface as my favorite.

もう、フリーダムです。

It is freedom.

■グローバル変数を使いまくり、

- I am going to use global variables,

■数値を直接ソースコードに書き込み、

- write numeric in source code directly, and,

もう、近い未来には、あの毛虫のように嫌われた" GOTO"さえも復活させるかもしれません。

- reuse the "GOTO" that is hated as a caterpillar, in the near future.

-----

という訳で、私はこれからも、趣味で作ったシミュレータのソースコードを全部開示していく予定ですが、

However I am going to open my entire program I make as a hobby, the goody-goody feeling that

―― そのプログラムコードを、誰かの役に立てたい

"I want to make the program codes open for someone's help."

などという殊勝な気持ちは、欠片もありません。

is not a trace.

私のシミュレータの追試をしたいという人は、それなりの覚悟で取りかかって下さい。

If you want to do additional test of my simulator, you should be working on in its own way of preparedness.