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
頑張ってKotlin率をちょっとあげた話
Search
みっちゃん
March 14, 2023
Programming
0
170
頑張ってKotlin率をちょっとあげた話
Ebisu.mobile #1 にて登壇
https://hey.connpass.com/event/276211/
みっちゃん
March 14, 2023
Tweet
Share
More Decks by みっちゃん
See All by みっちゃん
ドキュメントから adbコマンドの仕組みを読み解く
mitchan
1
130
2024年は難読化と仲良くなりたい
mitchan
0
200
STORES二年生が得た新しい視点
mitchan
0
220
TabLayoutの「選択されていないインジケーター」にも色を付けるには
mitchan
0
37
Material Design とは
mitchan
0
59
勉強方法としてのコミュニティ活用
mitchan
0
650
Android端末のNFCを無効化しようとしてダメだった話
mitchan
1
4k
Other Decks in Programming
See All in Programming
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
250
Goのmultiple errorsについて (2024年4月版)
syumai
4
920
Code Reviews
bkuhlmann
4
890
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
340
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
SIMD Parallel Programming with the Vector API
josepaumard
0
180
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
380
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
430
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
32
12k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
[RailsConf 2023] Rails as a piece of cake
palkan
23
4k
Teambox: Starting and Learning
jrom
128
8.4k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Atom: Resistance is Futile
akmur
259
25k
Transcript
頑張ってKotlin率をちょっとあげた話 登壇者:STORES 決済 Androidチーム みっちゃん 1
自己紹介 名前:みっちゃん 会社:STORES inc.(22卒) 役職:Androidエンジニア Twitter Qiita 2
2022年 下期 「Kotlin化率20%向上」という目標を掲げ、 我々Androidチームは新機能開発と両立しながら頑張りました!! どのようにKotlin化を進め、どれくらいKotlin率が上がったのかというお話し。 3
進め方 <3フェーズ構成> Javaのままリファクタリング ↓ Convert to Kotlin by AndroidStudio ↓
Kotlin化後のリファクタリング 4
進め方 feature/convert-to-kotlin-2022 ー feature/convert-to-kotlin-HogeHogeActivity ー feature/refactoring-java-HogeHogeActivity ー feature/convert-to-kotlin-by-AS-HogeHogeActivity ー feature/refactoring-kotlin-HogeHogeActivity
5
フェーズ1:Javaのままリファクタリング ▷ Kotlin化するにあたりJavaっぽい部分をなくす 例 • ヨーダ記法にGoodbyeする • prefixの”m”を消す 6
フェーズ2:Convert to Kotlin by AndroidStudio ▷ ボタンぽちぽちで自動convertするだけ! Kotlin化したいJavaファイルのタブ上で右クリックする 7
フェーズ3:Kotlin化後のリファクタリング ▷ 自動convertによってエラーが出ている部分はエラーを解消します ▷ Kotlinっぽいコードになるように綺麗にします (例) • else if 地獄をwhenでスッキリ
• スコープ関数を使ってスッキリ • nullabilityの改善(ex. 強制アンラップ!!を解消) • Android KTXを使ってよりKotlinらしいコードに • などなど... 8
else if 地獄をwhenでスッキリ 9
スコープ関数を使ってスッキリ 10
最終結果 下期だけで + 12%。年間だと + 20% 11
〜おわり〜 12