Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
リファクタリングのススメ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yKazihara
June 24, 2017
Education
4
4.8k
リファクタリングのススメ
2017/06/24のKANJAVA PARTY 2017!!!で発表したLT資料です。
yKazihara
June 24, 2017
Tweet
Share
More Decks by yKazihara
See All by yKazihara
ダークサイドエンジニア
ykazihara
0
340
Other Decks in Education
See All in Education
Data Presentation - Lecture 5 - Information Visualisation (4019538FNR)
signer
PRO
0
3k
演習:Gitの応用操作 / 05-git-advanced
kaityo256
PRO
0
230
国際卓越研究大学計画|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
49k
Interactive Tabletops and Surfaces - Lecture 5 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
2k
Introduction - Lecture 1 - Next Generation User Interfaces (4018166FNR)
signer
PRO
2
4.5k
Leveraging LLMs for student feedback in introductory data science courses (Stats Up AI)
minecr
1
240
悩める リーダー達に 届けたい書籍|レジリエントマネジメント 書籍イントロダクション-260126
mimoza60
1
400
心理学を学び活用することで偉大なスクラムマスターを目指す − 大学とコミュニティを組み合わせた学びの循環 / Becoming a great Scrum Master by learning and using psychology
psj59129
1
2.1k
Human Perception and Colour Theory - Lecture 2 - Information Visualisation (4019538FNR)
signer
PRO
0
3k
Gesture-based Interaction - Lecture 6 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2.1k
LotusScript でエージェント情報を出力してみた
harunakano
0
150
Postcards
gabrielramirezv
0
160
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
690
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
860
A better future with KSS
kneath
240
18k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
330
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
75
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
Producing Creativity
orderedlist
PRO
348
40k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Transcript
リファクタリングのススメ らん(@run51502)(๑و˙o˙)و 2017/06/24
自己紹介 名前:らん(@run51502) 京都生まれ、大阪在住 業界12年目の遅咲きSE 歌えるSE目指してボイストレーニングに励む
ポケモンGO:レベル39(資料作成時点) はねろ!コイキング:ランク63(資料作成時点)
参考本
リファクタリングとは? ソフトウェアを理解しやすく、変更を容易に する為に行うもの 外的振る舞いは既存を保つこと リファクタリングの利点とは? ソースの構造理解ができる
リファクタリングはいつ行う? どんな風に? 本番リリース後、手が空いたら 機能追加時 コードレビュー時に検討してみる 3度目の正直
対象となる例: エビ if (a1 == true) { if (a2
== false) { if (a3 == true) { if (a4 == false) { if (a5 == true) { if (a6 == true) { return; } } } } } }
対象となる例: 君(変数)の名は オブジェクト1:「もしかして私たち・・・」 オブジェクト2:「もしかして俺たち・・・」 「「入れ替わってる〜!?!?!?」」 マトリョーシカ
詰め放題セール 対象となる例: 名家の家系図
対象となる例: 覚えられない呪文 その他: 世界一周の旅(クラス渡り歩き) 遠距離恋愛(変数の宣言と値設定が離れている) などなど・・・
最後に リファクタリング前にテスト作成 やめる勇気を持とう ペアプロで検討してみよう 常にリファクタリングを意識して、 良いコードを育てよう!