0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

書籍「リファクタリング-第二版」を読んでの感想。リファクタリングのやり方について

0
Posted at

こんにちは。
たてあつと申します。

最近、リファクタリングに興味を持ち、
「リファクタリング」という書籍を読んでいます。

その書籍を読んで、
感じた事を記述させて頂きます。

書籍の内容。
「リファクタリング」とは、
ソフトウェアの外部の振る舞いを保ったままで、
内部の構造を改善する事。
単純な修正作業も含まれている。

  • 属性をあるクラスを別のクラスへと移す。
  • メソッドの一部を抜き出して新たなメソッドを作る。
  • コードを継承階層の上下に移動する。
  • コードのかたまりから、必要な箇所を修正する。
    あるいは、
    imgタグの参照ファイルの修正、タグの内容を修正なども、
    含まれる。

上記の事が出来るようになるには、
プログラムを読む力も必要。

書籍「プログラムを読む技術」で紹介された、

  • 入力->処理->出力のコードを理解するや、
  • 関数の処理を理解する事も、
    役に立つと思いました。

とりあえず、
写経コードから、自分がやりたい事に、
ちょっとずつ修正するコツを知れたので、
収穫がありました。

参考になられたら、幸いです。
どうぞ、宜しくお願い致します!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?