1.1 良いコードの定義と価値 良いコードとはいったいどのようなものでしょうか。良いコードを書くと何かうれしいことがあるのでしょうか。そもそも良いコードを書く必要があるのでしょうか。 本章では序論として,「良いコード」がどのようなものか定義し,その価値について考えていきます。 1.2 良いコードの定義 一口に良いコードと言っても,組織やプロジェクト,プログラマか管理者かなど,状況が異なると定義も変わってきます。本書では次の4つを満たすものを良いコードと定義します。 保守性が高い すばやく効率的に動作する 正確に動作する 無駄な部分がない 定義した良いコードを実現するために必要な知識を,本書では図1.1の構成で解説していきます。 保守性が高い 私たちが書いたコードは,私たちが想像するよりも長く利用されます。あとから見て何をやっているのか理解不能なコードは良いコードとは言えません。将来の自分は