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
4.7k
リファクタリングのススメ
2017/06/24のKANJAVA PARTY 2017!!!で発表したLT資料です。
yKazihara
June 24, 2017
Tweet
Share
More Decks by yKazihara
See All by yKazihara
ダークサイドエンジニア
ykazihara
0
330
Other Decks in Education
See All in Education
ROSConJP 2025 発表スライド
f0reacharr
0
220
Common STIs in London: Symptoms, Risks & Prevention
medicaldental
0
140
みんなのコード 2024年度活動報告書/ 2025年度活動計画書
codeforeveryone
0
290
万博マニアックマップを支えるオープンデータとその裏側
barsaka2
0
820
仮説の取扱説明書/User_Guide_to_a_Hypothesis
florets1
4
380
核燃料政策を問う─英国の決断と日本
hide2kano
0
180
American Airlines® USA Contact Numbers: The Ultimate 2025 Guide
lievliev
0
250
シリコンバレーでスタートアップを共同創業したファウンディングエンジニアとしての学び
tomoima525
1
1.2k
技術勉強会 〜 OAuth & OIDC 入門編 / 20250528 OAuth and OIDC
oidfj
5
1.8k
Tutorial: Foundations of Blind Source Separation and Its Advances in Spatial Self-Supervised Learning
yoshipon
1
150
SISTEMA DE MEMORIA Y SU IMPACTO EN LAS DECISIONES.
jvpcubias
0
130
Padlet opetuksessa
matleenalaakso
4
14k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
For a Future-Friendly Web
brad_frost
180
9.9k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.1k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
113
20k
Making Projects Easy
brettharned
117
6.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Practical Orchestrator
shlominoach
190
11k
KATA
mclloyd
32
14k
Being A Developer After 40
akosma
90
590k
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:「もしかして俺たち・・・」 「「入れ替わってる〜!?!?!?」」 マトリョーシカ
詰め放題セール 対象となる例: 名家の家系図
対象となる例: 覚えられない呪文 その他: 世界一周の旅(クラス渡り歩き) 遠距離恋愛(変数の宣言と値設定が離れている) などなど・・・
最後に リファクタリング前にテスト作成 やめる勇気を持とう ペアプロで検討してみよう 常にリファクタリングを意識して、 良いコードを育てよう!