くぴんのブログ

くぴんのブログ

PR

プロフィール

くぴん74

くぴん74

カレンダー

カテゴリ

お気に入りブログ

マーケットスケジュ… New! どらりん0206さん

楽天ラッキーくじ更… New! じゃっかすさん

2021~24PF概況417位… みきまるファンドさん

千秋楽だ!! Maryu21さん

自分を愛することは… まりあのじいじさん

キーワードサーチ

▼キーワード検索

2017年06月01日
XML
カテゴリ: 仕事
Work starting with zero base is tough.
Since there are no standards, we must decide everything with trial and error.
So, usually, look for a precedent close to what you are going to do and modify it.
In that case, you do not have to change everything, only change the necessary parts.
It ends sooner than starting from zero base.
And the less you change, the quicker it ends. Sometimes you can use it without changing anything.

In my work, it is common to compare many calculation cases by changing parameters in various ways.
In that case, I divide the folder for each calculation case, change the folder name, and fix the file name of the input file.
For example, input.fem.

This allows me to use common scripts to extract results from all calculation folders.

When programming, it is easier to change parameters that you can change later in the first one as variables than when writing values ​​directly without using variables.

Example 1
N = 10
For i in range (n):
Process 1

For i in range (n):
Process 2

Example 2
For i in range (10):
Process 1


Process 2

In the case of changing the number of iterations, in the example 1, the changed part is one, whereas in the example 2, there are two parts.

Efforts to minimize changes by identifying what is different and what does not change make work more efficient.

-----
ゼロベースではじめる仕事は大変だ。

なので普通は、やろうとすることに近い前例を探してきて、それを修正する。
その場合、すべてを変える必要はなく、必要な部分だけを変えればいい。
ゼロベースからはじめるのに対して、ずっと早く終わる。
そして変える部分が少なければ少ないほど、早く終わる。もしかしたら、何も変えずに使える場合もある。

ぼくの仕事の場合、パラメータをいろいろ変えてたくさんの計算ケースを比較することがよくある。
その場合、計算ケースごとにフォルダを分けて、変えるのはフォルダ名とし、入力ファイルのファイル名を固定する。
input.femとか。
すると、出力ファイルもinput.outとかとなり、フォルダの中身はすべて同じとなる。
それにより、全計算フォルダから結果を抽出するスクリプトは共通のものを使える。

プログラムをする場合も、変更しうるパラメータは変数として最初の方に書いておくほうが、変数を使わずに直接値を書き込む場合よりも、あとの変更が楽になる。

例1
n=10
for i in range(n):
処理1

for i in range (n):
処理2

例2
for i in range(10):
処理1

for i in range (10):
処理2

繰り返し回数を変更する場合、例1では、変更箇所が1箇所に対して、例2では2箇所となる。

変わるところと変わらないところを見極めて、変わるところを最小にする工夫が、仕事を効率化する。


にほんブログ村 サラリーマン日記ブログ 戦うサラリーマンへ
にほんブログ村





お気に入りの記事を「いいね!」で応援しよう

最終更新日  2017年06月02日 06時08分06秒
コメント(0) | コメントを書く
[仕事] カテゴリの最新記事


【毎日開催】
15記事にいいね!で1ポイント
10秒滞在
いいね! -- / --
おめでとうございます!
ミッションを達成しました。
※「ポイントを獲得する」ボタンを押すと広告が表示されます。
x

© Rakuten Group, Inc.
Design a Mobile Site
スマートフォン版を閲覧 | PC版を閲覧
Share by: