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
yKazihara
June 24, 2017
Education
4.8k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
リファクタリングのススメ
2017/06/24のKANJAVA PARTY 2017!!!で発表したLT資料です。
yKazihara
June 24, 2017
More Decks by yKazihara
See All by yKazihara
ダークサイドエンジニア
ykazihara
0
360
Other Decks in Education
See All in Education
勾配ブースティングと決定木の話 / gradient boosting and decision trees
kaityo256
PRO
7
1.7k
Beyond the Prompt: Programming as a Pathway to Statistical Thinking
minecr
0
250
[2026前期火5] 論理学(京都大学文学部 前期 第13回)「走って、止まって、積み上がる」
yatabe
0
130
DECADE_ゴルフ_コースマネジメント完全ガイド.pdf
ozekinote
0
120
[2026前期火5] 論理学(京都大学文学部 前期 第3回)「形式言語と四つのキーワード:メタ・構成・意味論・ハーモニー」
yatabe
0
600
LinkedIn
matleenalaakso
0
4.4k
2026年度春学期 統計学 第10回 分布の推測とは - 標本調査,度数分布と確率分布 (2026. 6. 4)
akiraasano
PRO
0
150
Soluciones al examen de Geografía 2026. JUNIO (Convocatoria Ordinaria)
juanmartin2026
1
6.5k
[2026前期火5] 論理学(京都大学文学部 前期 第5回)「 ならばの問題演習・proof net・かつの規則」
yatabe
0
360
プログラミング言語において文字列を複数行にわたって だらだらと記載するアレ
sapi_kawahara
0
180
면접관 눈에 띄는 데이터 분석 포트폴리오 만드는 법 | 2026년 5월 세미나
datarian
0
900
Visionary Initiative: Future Intelligence — Laying the foundations for the future of science, intelligence, and society | Science Tokyo
sciencetokyo
PRO
0
140
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Paper Plane (Part 1)
katiecoart
PRO
1
9.7k
Ethics towards AI in product and experience design
skipperchong
2
330
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
Designing for humans not robots
tammielis
254
26k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Practical Orchestrator
shlominoach
191
11k
Why Our Code Smells
bkeepers
PRO
340
58k
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:「もしかして俺たち・・・」 「「入れ替わってる〜!?!?!?」」 マトリョーシカ
詰め放題セール 対象となる例: 名家の家系図
対象となる例: 覚えられない呪文 その他: 世界一周の旅(クラス渡り歩き) 遠距離恋愛(変数の宣言と値設定が離れている) などなど・・・
最後に リファクタリング前にテスト作成 やめる勇気を持とう ペアプロで検討してみよう 常にリファクタリングを意識して、 良いコードを育てよう!