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|04|

2014-07-04 『そんなミスするの? 今さら? 大丈夫なの? バカなの? 死ぬの?』 [長年日記]

昨日、この一週間、私をズタボロの体調にしてくれた、「1億人シミュレータ」 のバグが取れました。

Yesterday, I could delete a bug of my "100,000,000 person's simulator" that had made me the worst condition for this week.

昨夜、同僚のA君に「30秒だけ助けてくれ」と頼んで、「30分」助けて貰いました。

Last night, I asked a junior colleague with saying "help me for just 30 seconds", and he had helped me for 30 min.

原因は不明のままでしたが、メモリを破壊していることまでは突き止めて貰いました。

The reason of the bug left unknown, but he pointed out the problem of memory destroy.

その後、トレースを続けた結果、Cプログラミングの基本中の基本、参照呼び出しと、ポインタ呼び出しの勘違いであることが分かりました。

After that, I noticed that I misunderstood how to use the function of reference call, instead of pointer call.

あまりにショボいミス。自戒の為、私にだけ分かるコードを記載します。

It was too shabby. I left the following code to regret what I had done.

#include 
 
void fun(int *a){
  *a = *a + 2;
}
 
int main()
{
  int b;
 
  b=100;
 
  fun(&b);
  
  printf("%d\n",b);
  
  return(0);
}

-----

そして、今朝。

This morning,

「悪い。A君、原因判った。『ポインタ渡し』を失念していた」

"A-kun, I am very sorry but I found my error. That was pointer reference."

「昨日のプログラムの話ですか?」

"Are you talking about the code of yesterday?"

「ポインタ自体を使っていたから油断していた。ファンクションは、ポインタのポインタで受けなければならなかったのに」

"I was off guard. Because I used the pointer itself. The function should have received as pointer of pointer."

「あ ・・・、ダブルポインタ・・・」

"Um... It's a double pointer"

と、多くを語らずとも、A君は、一瞬で理解したようです。

Without saying much, he seemed to have understood it in a moment.

-----

「全く、情けないにも程がある。気がついた時には、本気で『首、くくろうか』と思ったよ」

It is too much of being deplorable. When I noticed it, I really thought I should put my head in the noose.

「え、やめて下さいよ、そんなこと」

"No. Please stop it really.

と、A君は、真剣な顔で、本気で心配してくれたようです。

He seemed to worry with an earnest face seriously.

-----

―― そして、今なお、

And now,

『そんなミスするの? 今さら? 大丈夫なの? バカなの? 死ぬの?』

"Did you make such a mistake? Now? Are you all right? Are you stupid? Do you kill yourself?"

と、私の中から声が聞こえる。

I heard those voices from me.