메뉴
HN
Hacker News 24일 전

문제 해결을 제외한 모든 수단은 정당하다

IMP
3/10
핵심 요약

한 업계 베테랑이 코드 오용 시 경고 메시지를 출력하도록 수정했다가, 기존 스크립트들의 예상치 못한 의존성(Hyrum의 법칙)으로 인해 중요 업무가 마비되는 일이 발생했습니다. 관리자들은 오용된 근본 원인을 수정하는 대신, 메시지를 숨기거나 우회하는 등의 무의미한 땜질식 해결책만 제안했습니다. 이 글은 기술적 부채와 심화되는 문제 회피식 조직 문화를 풍자하는 개발자들의 공감 대상입니다.

번역된 본문

블로그 사이트 𝕏 피드

문제 해결을 제외한 모든 수단은 정당하다 2026년 5월 6일

내 인맥 중 한 업계 베테랑이 최근에 코드가 오용될 때 경고를 출력하는 초보적인 실수 1를 저질렀습니다. 경험이 있는 사람이라면 누구에게나 놀랍지 않은 일이지만, 곧 중요한 워크플로우들이 철저히 멈춰 섰습니다.

알고 보니 그의 코드를 사용하는 프로그램이 종료될 때 "yay, done(야호, 끝)" 같은 메시지를 출력하도록 되어 있었고, 여러 스크립트들이 이 메시지를 프로그램의 마지막 출력이라고 간주하고 있었던 것입니다. 하지만 이제 그 경고 메시지들이 "yay, done"이 출력된 후에 파괴자(destructor) 등에서 간헐적으로 출력되면서, 스크립트들이 프로그램이 실패했다고 착각하게 만든 것입니다.

어떤 사람들은 이로 인해 사람들이 보고된 오용 사례를 수정하도록 촉구했을 것이라고 생각하겠지만, 그런 생각 역시 또 다른 초보적인 실수입니다. 대신, 그들은 이러한 경고가 어디서 올 수 있는지 알기 어렵고, 새로운 상황에서 어떤 오용 사례가 발견되면 모든 중요한 워크플로우가 실패할 위험을 감수할 수 없다고 빠르게 지적했습니다.

그렇습니다. 상한선을 파악하기 위해 grep을 해볼 수도 있었고, 실제로 그렇게 했다면 그렇게 많은 곳이 검색되지는 않았을 것입니다. 하지만 누군가는 (실제로 일부 사람들이 그랬듯이) 어쩌면 grep을 해야 할 모든 곳을 검색하지 않았을 수도 있다고 말할 수 있습니다. 심지어 검색해서 찾아낸 사례들조차 여러 다른 팀의 소관이어서 제때 수정 사항을 적용하기 어렵다는 식의 변명이 이어졌습니다.

도움을 좋아하는 높은 직급의 사람들은 다음과 같은 해결책을 제안했습니다:

  • 파괴 시퀀스 동안 경고가 출력된 경우, 다시 "yay, done"을 출력하는 파괴자(destructor)를 추가할 수 있습니다. (이는 파괴자, __attribute__((destructor)), atexit 핸들러 및 기타 이름조차 부르기 싫은 끔찍한 존재들 사이의 기술적 차이에 대한 흥미로운 논쟁을 열게 됩니다.) 사실, 우리의 업계 베테랑은 나중에 (이게 내 입에서 나온 말이 아니라 맹세코 진짜라는 것을 알게 됩니다) 프로그램 종료 시퀀스 중에 무언가를 출력했던 다른 누군가가 이미 이 방식을 구현하여 스크립트들을 달래야 했다는 것을 알게 되었습니다.
  • 기본적으로 경고를 억제(suppress)하고, 요청 시에만 활성화할 수 있습니다. (이를 활성화하는 런타임 방법과 적절한 상황에 대한 논쟁이 열립니다.)
  • 이러한 경고를 별도의 파일로 기록(write)하고...

이 유용한 제안들로 가득한 그의 업무용 채팅창 스크롤을 다 내렸을 때, 불운한 업계 베테랑은 쓸쓸한 미소를 지으며 상황을 다음과 같이 요약했습니다. "문제 해결을 제외한 모든 수단은 정당하다." 2

우리의 주인공은 다소 이상주의적인 성향이며, 그의 상태는 경험에 의해 치료되기에는 너무 급성이기 때문에 현실주의자들이 말하는 '초보적인 실수'를 저지를 수밖에 없습니다. 하지만 이 특별한 이야기는 우리 대부분에게 일어날 수 있는 일입니다. ↩︎

하이럼의 법칙(Hyrum's law)은 기술적 관점에서 이 특정한 문제를 더 구체적으로 진단합니다. 그러나 우리의 쓸쓸한 베테랑의 말은 기술적 문제가 그 의미를 얻게 되는 더 넓은 사회적 조건을 암시합니다. 그리고 '사회적 조건'이라는 것은, 하이럼의 법칙에서 '시스템의 모든 관찰 가능한 동작은 누군가에게 의존하게 될 것이다'라는 문장에 '...자신들의 코드를 고치는 귀찮은 일은 하지 않으면서 그 문제를 해결할 수 있는 아무런 권한도 없는 누군가'라는 문구가 조용히 덧붙여진다는 것을 의미합니다. 그리고 바로 이 조용히 숨겨진 부분이 이것을 하나의 '법칙'으로 만듭니다. ↩︎

댓글 블로그 사이트 𝕏 피드

원문 보기
원문 보기 (영어)
Blog Site 𝕏 Feed All means are fair except solving the problem May 6th, 2026 An industry veteran in my circles has recently made the rookie mistake 1 of printing a warning from his code upon misuse. Surprisingly to nobody experienced, critical workflows soon came to a screeching halt. It turned out that a program using his code prints something like “yay, done” upon exit, and scripts expect it to be the last thing it says. But now those warnings occasionally got printed from destructors or such, after the “yay, done”, making the scripts think the program failed. One might think that this prompted people to fix the reported misuse, and that thought would be another rookie mistake. Instead, they were quick to point out that it’s hard to know where these warnings could come from, and we cannot risk all those critical workflows failing when some case of misuse surfaces in a new context. I mean, you could grep to get an upper bound, and if you did, not that many places would come up. But one could then say, as some in fact did , that maybe you haven’t grepped everywhere you should have, and even the cases you did find are owned by many different teams, so we won’t get the fixes quickly enough, etc. Several solutions were suggested by helpful high-ranking people: You could add a destructor printing “yay, done” again if a warning was printed during the destruction sequence (opening an interesting technical debate about the differences between a destructor, __attribute__((destructor)), an atexit handler and other unspeakable horrors). In fact, our industry veteran would later learn, and I swear that I’m not making this up, that this was already implemented by someone else who printed something during the program termination sequence, and had to appease the scripts. You could suppress the warnings by default, and enable them upon request (opening a debate about the runtime method to enable them, and the appropriate circumstances to do this). You could write those warnings to their own file, and… When I was done scrolling his work chat with these helpful suggestions, our unfortunate industry veteran put on a melancholy smile and summarized the situation: “All means are fair except solving the problem.” 2 Our protagonist happens to be somewhat of an idealist, and since his condition is too acute to be treated by experience, he’s bound to make what pragmatists call “rookie mistakes.” But this particular story could happen to most of us. ↩︎ Hyrum’s law arguably diagnoses this particular problem more specifically from a technical point of view. However, our melancholy veteran’s phrase hints at the broader social condition from which the technical problem derives its significance. And by “social condition,” I mean that in Hyrum’s law, “all observable behaviors of your system will be depended on by somebody” is implicitly amended with “...somebody who can’t be bothered to fix their code, and there’s nothing you can do about it” — and it’s this quiet part which makes it into a “law.” ↩︎ Comments Blog Site 𝕏 Feed