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
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.1k
2026 g0v 零時政府年會啟動提案 / g0v Summit 2026 Kickstart
rschiang
0
390
探査機自作ゼミ2025スライド
sksat
3
820
Master of Applied Science & Engineering: Computer Science & Master of Science in Applied Informatics: Artificial Intelligence and Data Science
signer
PRO
0
840
Презентация "Знаю Россию"
spilsart
0
290
Google Gemini (Gem) の育成方法
mickey_kubo
2
250
尊敬語「くださる」と謙譲語「いただく」の使い分け
hysmrk
0
110
1014
cbtlibrary
0
470
the difficulty into words
ukky86
0
160
[FUN Open Campus 2025] 何でもセンシングしていいですか?
pman0214
0
250
Alumnote inc. Company Deck
yukinumata
0
4.5k
Présentation_1ère_Spé_2025.pdf
bernhardsvt
0
410
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
For a Future-Friendly Web
brad_frost
180
10k
The Pragmatic Product Professional
lauravandoore
36
7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Designing for humans not robots
tammielis
254
26k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Become a Pro
speakerdeck
PRO
29
5.6k
Building an army of robots
kneath
305
46k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
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:「もしかして俺たち・・・」 「「入れ替わってる〜!?!?!?」」 マトリョーシカ
詰め放題セール 対象となる例: 名家の家系図
対象となる例: 覚えられない呪文 その他: 世界一周の旅(クラス渡り歩き) 遠距離恋愛(変数の宣言と値設定が離れている) などなど・・・
最後に リファクタリング前にテスト作成 やめる勇気を持とう ペアプロで検討してみよう 常にリファクタリングを意識して、 良いコードを育てよう!