oinume journal

Scratchpad of what I learned

Chapter 3 - Working Code Isn’t Enough / A Philosophy of Software Design

第3章はWorking Code Isn’t Enough (Strategic vs. Tactical Programming)というタイトル。

Tactical Programming

  • 近視眼的に目の前のタスクを終わらせるためにコードを書く
  • 目の前のタスクを終わらせることが最優先になるので、これだといい設計はもたらされない
  • これが積もり積もってシステムに複雑性をもたらす
  • 開発メンバー全員がこのアプローチで開発すると一気に複雑性が高まる
  • tactical tornado
    • Almost every software development organization has at least one developer who takes tactical programming to the extreme: a tactical tornado.

Strategic Programming

  • The first step towards becoming a good software designer is to realize that working code isn’t enough.
    • working code = 動くコードの意味?
  • Your primary goal must be to produce a great design, which also happens to work. This is strategic programming.
    • 第一のゴールを素晴らしいデザインでかつきちんと動作するものにするべき
  • 良いデザインに対して投資する、という考え方を持つべき
    • 最初に思い浮かんだ設計のアイデアをそのまま実装するのではなく、少し時間をかけてよりシンプルな設計がないかを模索する時間をかけるべき
  • どのぐらい良い設計のために時間をさくべきか?
    • 作業の10-20%とこの本ではいっている
    • 良いデザインにそのぐらいコストをかけると、数ヶ月後にはそのベネフィットを感じることができる
  • スタートアップと良い設計への投資
    • スタートアップで10-20%コストをかけることは現実的ではないと考えられているため、大抵のスタートアップではTacticalなアプローチが採用される
    • Facebook is an example of a startup that encouraged tactical programming
    • the company’s motto was “Move fast and break things.”
    • Over time the company realized that its culture was unsustainable. Eventually, Facebook changed its motto to “Move fast with solid infrastructure”