multi-step script naming

しばしば,一つの目的のために,複数のスクリプト(例えば7個)を次々と実行する必要が出てくる.これは一つのスクリプトにまとめるには,処理が複雑になりすぎるからである.この場合に,お勧めなのが,一つの目的に対して一つのディレクトリを作り,その中に,

step1_....py

step2_....py

のように,step1, step2, をファイル名の最初につけて,どういう順序でスクリプトを実行すればいいかが分かるようにすることである.実行の順序を問わない場合は,

step2a_...py

step2b_...py

などとしてもいいだろう.

こうしておかないと,スクリプトの依存関係を忘れてしまうと(そして時間がたてばかならず忘れる),スクリプトの中を詳しく調べて,実行順序を見つけ出さなくてはならず,その作業にかなりの時間が必要となる.

Often we need to conduct multiple (e.g., seven) scripts for one purpose, because it can be too much complicated if we combined them into one script. In this case, I would like to recommend to make a directory for that purpose, and name scripts like

step1_....py

step2_....py.

The important point is to start names with "step1", "step2", etc., so that we can know immediately the order of executions of those scripts. If either one of two scripts can be conducted first, you can name them

step2a_...py

step2b_...py,

though this is not necessary.

By doing so, when you forget the dependencies among scripts, you need to check very closely those scripts just in order to know the order of execution by taking much time.