Tidy first? A personal exercise in empirical software design

  • 2024-09-08 (modified: 2025-07-24)
  • 출판일: 2023-10
  • 저자: Kent Beck

Kent Beck이 계획하고 있는 소프트웨어 디자인 시리즈 중 첫번째 책. Larry ConstantineEdward Yourdon의 책 “Structured design”에 영향을 받음.

Foreword

Preface

이 책의 주제

”Tidy First?” describes:

  • When to tidy messy code before changing what it computes
  • How to tidy messy code safely and efficiently
  • How to stop tidying messy code
  • Why tidying works

소프트웨어 설계의 양면성:

Software design is a powerful tool to ease pain in the world - if it is used well. Used badly, it becomes just another instrument of oppression, and a drag on the effectiveness of software development.

Empirical software design

Introduction

Part I. Tidyings

  • Guard clauses
  • Dead code
  • Normalize symmetries
  • New interface, old implementation
  • Reading order
  • Cohesion order
  • Move declaration and initialization together
  • Explaining variables
  • Explaining constants
  • Explicit parameters
  • Chunk statements
  • Extract helper
  • One pile
  • Explaining comments
  • Delete redundant comments

Part II. Managing

  • Separate tidying
  • Chaining
  • Batch Sizes
  • Rhythm
  • Getting Untangled
  • First, After, Later, Never

Part III. Theory

Chapter 22. Beneficially Relating Elements

Chapter 23. Structure and Behavior

Chapter 24. Economics: Time Value and Optionality

Chapter 25. A Dollar Today > A Dollar Tomorrow

Chapter 26. Options

Chapter 27. Options Versus Cash Flows

Chapter 28. Reversible Structure Changes

Chapter 29. Coupling

Chapter 30. Constantine’s Equivalence

Chapter 31. Coupling Versus Decoupling

Chapter 32. Cohesion

Chapter 33. Conclusion

Appendix. Annotated Reading List and References

짧은 독후감

재미있게 읽었다. 1부에 열거된 tidying들이 기술적인 관점에서만 보면 너무나 작고 사소해서(예: “빈 줄을 넣어라”) 별 내용 없는 책으로 여겨질 가능성이 있어 보인다. 사실 작고 사소하기 때문에 가치가 있는건데.

1부는 자칫 “초보자”들에게나 적합한 내용 정도로 치부될 가능성이 있는 반면, 3부에서 소개하는 이론들은 상당한 경험을 쌓은 후에야 공감할 수 있는 내용들이 아닌가 싶다.

저자가 서문에서 본인이 Larry Constantine의 책을 처음 읽을 당시엔 내용을 거의 이해하지 못했다가 오랜 세월이 지나고서야 진가를 알게 되었고 “Tidy First?”에서 L.C.의 책에 담긴 내용을 본인이 재해석하여 소개하고자 한다고 썼는데, 그래서인지 이 책의 3부도 경험을 필요로하는 내용들인 것 같다.

국내외를 막론하고 패턴 책에서는 패턴 카탈로그만 읽고 리팩토링 책에서는 코드 냄새 목록만 읽는 식으로 쉽게 요약해서 소비할만한 내용 위주로 읽고 공유하는 경향이 있는 것 같다. 이 책도 그런 식으로 읽는다면 1부의 작고 사소한 tidying 목록 15개만 돌아다니게 될 가능성이 있어 보인다.

만약 그렇게 된다면 ‘완전 초보를 위한 코딩 팁 15개를 담은 책’ 정도로 여겨질 수도 있겠다.

아무튼, 오래 마음 속에 담아두고 기획한 연작의 첫번째 결과물이라고 하는데 나는 아주 재미있에 읽었고, 이 시리즈의 다음 책이 기대된다.

ToDo: 이 타레 옮기기

2025 © ak