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
The knowledge panel is your new homepage
bradwetherall
0
230
Use Cases and Course Review - Lecture 8 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.3k
1202
cbtlibrary
0
200
アジャイルの知見から新卒研修作り、そして組織作り
pokotyamu
0
140
CSS3 and Responsive Web Design - Lecture 5 - Web Technologies (1019888BNR)
signer
PRO
1
3k
Surviving the surfaceless web
jonoalderson
0
290
1125
cbtlibrary
0
160
Semantic Web and Web 3.0 - Lecture 9 - Web Technologies (1019888BNR)
signer
PRO
2
3.2k
核軍備撤廃に向けた次の大きな一歩─核兵器を先には使わないと核保有国が約束すること
hide2kano
0
210
【洋書和訳:さよならを待つふたりのために】第1章 出会いとメタファー
yaginumatti
0
160
TeXで変える教育現場
doratex
0
8.4k
授業レポート:共感と協調のリーダーシップ(2025年上期)
jibunal
1
190
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
68
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
690
The untapped power of vector embeddings
frankvandijk
1
1.5k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Six Lessons from altMBA
skipperchong
29
4.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
46
For a Future-Friendly Web
brad_frost
180
10k
Amusing Abliteration
ianozsvald
0
86
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
75
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Docker and Python
trallard
47
3.7k
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:「もしかして俺たち・・・」 「「入れ替わってる〜!?!?!?」」 マトリョーシカ
詰め放題セール 対象となる例: 名家の家系図
対象となる例: 覚えられない呪文 その他: 世界一周の旅(クラス渡り歩き) 遠距離恋愛(変数の宣言と値設定が離れている) などなど・・・
最後に リファクタリング前にテスト作成 やめる勇気を持とう ペアプロで検討してみよう 常にリファクタリングを意識して、 良いコードを育てよう!