WEB+DB PRESS vol.51で約40ページにわたって、「巧いメソッド設計」という特集がくんであります。
中身を見なくても、職業プログラマや、自分で開発してメンテナンスしたことがある人なら納得の内容ばかりです。
- 第1章:品質を実現する“巧い”プログラミング
プログラミングこそ,真の設計
- 第2章:クラス設計/パブリックメソッド設計の考え方
処理分担をどう実現するか
- 第3章:プログラムの意図を読み手にいかに伝えるか
コメント,ネーミング,コーディング標準
- 第4章:メソッド構造化の実践知識
実装者が心得ておくべき品質向上のための手法
- 第5章:メソッドの副作用を考える
同じ引数で呼び出しても結果が違うメソッドの扱い方
- 第6章:メソッドのエラー処理を考える
「契約による設計」を使った潜在的バグへの対処
- 第7章:Javadocをコード品質の向上に活用しよう
ドキュメントツールJavadoc再入門
大学のとき、こういう授業ってなかったなぁと思います。またデバッグの授業とかもあればいいなと思います。
どうやってバグを回避するか、バグが出たときにどう対処するか、それを学生さんに学んでほしいです。というか、自分が学びたかったです。
学問としての面白みは皆無なような気も、のめり込めば、楽し過ぎる気もしますが、職業プログラマとしては必要なことなので、きっちり学んでから就職したいものです。