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?

More than 1 year has passed since last update.

Refactoring Ruby リファクタリング おでん

Last updated at Posted at 2019-01-01

image

  • コンビニのおでんは健康的だし満足感も満腹感も高いし、大根で栄養もとれるし、ダイエットの味方だから食べたい。
  • でも買う時のコストも高くてつい別のものを選んでしまう。プロテインバーとかおにぎりとか。
  • コストの一因に食べるときの熱さハフハフ!があると気付いたから、崩してみた。冬の寒空で冷やす。

連想

  • リファクタリングではメソッドの分割をしたりして、なるべく細かくクラスの振る舞いや役割を砕く。
  • 細かすぎてもオデンが冷えるのでだめだけど、だいたいは大きすぎるので、よく噛み砕くと良い。
  • おでんはリアルタイムで温度変化する。クラスやドメイン的な要件も全く固定されておらず、どんどん温度が変わっていくので、そのたびにおでんの適切な管理が必要。

image

Google translated

  • The oden of a convenience store is healthy, the satisfaction is also full of satiety, I can get nutrition with radish and I want to eat it because it is a friend of a diet.
  • But the cost of buying is also high, so I choose another one. Protein bars and rice balls.
  • Heat when you eat as part of cost Hough Huff! I noticed there was, so I broke it. Cool in the cold winter.

Association

  • In refactoring, divide method and break break down behavior and role of class as finely as possible.
  • Even if it is too tiny, Oden gets cold, but it is usually too big, so you better chew it.
  • Oden changes temperature in real time. As classes and domain-like requirements are not fixed at all, the temperature changes rapidly, so it is necessary to properly manage oden each time.
    Send feedback

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

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?