DEV Community

Robert Teminian
Robert Teminian

Posted on

급할수록 돌아가라

이 글은 제 이전 블로그에 2024년 2월 19일에 올렸던 글입니다.
https://codenested.blogspot.com/2024/02/blog-post.html


간혹 옛 성현들의 말씀 중에 틀린게 없다는걸 새삼 실감할 때가 있습니다. 최근에 그런걸 다시 한 번 느꼈는데...... 급할수록 돌아가라 하셔서 돌아갔더니만 궁극적으로 시간을 더 절약하게 되더군요.

상황은 대충 이렇습니다. 특정 데이터를 추출하는 새로운 기능을 만들어야 하는데, 겉으로 보기엔 간단하지만 실제로는 간단하지 않겠다는 생각이 들었습니다. 하나의 raw data에서 요약본과 메인 데이터 두 개를 추출해야 하는데, 반복문을 한 번만 돌리면 전체적으로는 수행이 더 빠르겠다는 생각이 들더군요. 하지만 기존의 데이터 저장 체계와 맞물려서 생각해보면 이걸 두 개의 스레드로 분리해야 할 수밖에 없는 상황이었는데...... 하루면 끝낼 일을, 일부러 사흘 정도 딴짓(?)을 하면서 시간을 질질 끌어보니 답이 나왔습니다. loop를 한 개로 놓고 데이터를 subsection 형태로 나누면 어떻게든 되곘더군요.

제가 평소 업무중 중요시하는 것 중 하나가 부화 효과입니다. 어려운 문제가 주어졌을 때 그 문제에 무작정 집중하지 말고, 그 문제와 전혀 관련없는 다른 일을 수행하다가 원래의 문제로 돌아오면 기존에는 보지 못했던 새로운 지평이 보인다는, 무려 심리학 실험을 통해 검증된 효과입니다. 왜 이러한 효과가 발생하느냐에 대해서는 아직 학계에서 갑론을박 중인 것으로 알고 있습니다만, 블랙박스의 내부 구조를 밝히는 것은 학계의 영역이고, 전 그저 쓰기만 하면 될 뿐이죠. :D

소소합니다만, 나는 틀리지 않았어! 하고 다시 한 번 확인하게 되는, 강화 요인 중 하나가 되었기에 끼적여봅니다.

Top comments (1)

Collapse
 
shafayeat profile image
Shafayet Hossain

It'd be much better if you post in English instead of Korean!! BTW, here's the translation " Sometimes, I realize that there is nothing wrong with the words of the old sages. I felt that again recently... The more urgent it is, the more I go back, so I went back, but ultimately, I ended up saving more time.

The situation is roughly like this. I need to create a new function to extract specific data, and although it seems simple on the surface, it is not actually simple. I need to extract two data, a summary and main data, from one raw data, and I thought that if I just run the loop once, the overall execution would be faster. However, when I thought about it in conjunction with the existing data storage system, I had no choice but to separate this into two threads... I deliberately dragged out the time by doing something else(?) for about three days, which would have been enough to finish the task in one day, and I found the answer. If I put the loop in one and divide the data into subsections, it would somehow work.

One of the things I consider important in my work is the hatching effect. When given a difficult problem, don't just focus on it, but do something completely unrelated to it, and then return to the original problem. This is an effect that has been verified through a psychological experiment. I understand that there is still a lot of debate in the academic world about why this effect occurs, but revealing the internal structure of the black box is the domain of the academic world, and I just have to write it down. :D

It's a small thing, but I'm not wrong! I'm adding it because it's one of the reinforcing factors that makes me confirm it once again. "
Thank me later!!😉😉