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
リーダブルコード読書会 #1
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kenta Enomoto
July 17, 2014
Programming
340
0
Share
リーダブルコード読書会 #1
社内リーダブルコード読書会 #1
Kenta Enomoto
July 17, 2014
More Decks by Kenta Enomoto
See All by Kenta Enomoto
調理場で使うタブレット専用アプリ をどうつくったか -STORES モバイルオーダー 実装の舞台裏-
enomotok
0
25
[DroidKaigi 2025] 共有と分離 - Compose Multiplatform "本番導入" の設計指針
enomotok
0
36
Kotlin Multiplatform / Compose Multiplatform を活用したモバイルアプリ開発の最前線
enomotok
0
130
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
490
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
89
What's new in Xcode 16 ダイジェスト
enomotok
0
860
Introducing Pkl
enomotok
0
3.1k
iOS リポジトリへの Renovate の導入
enomotok
2
440
iOS開発とGitLab CI
enomotok
7
4.1k
Other Decks in Programming
See All in Programming
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
230
The Less-Told Story of Socket Timeouts
coe401_
3
890
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
350
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
170
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
120
Road to RubyKaigi: Play Hard(ware)
makicamel
1
520
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
120
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
160
Swift Concurrency Type System
inamiy
1
570
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
150
10 Tips of AWS ~Gen AI on AWS~
licux
5
520
Explore CoroutineScope
tomoeng11
0
140
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
350
Speed Design
sergeychernyshev
33
1.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
Ruling the World: When Life Gets Gamed
codingconduct
0
220
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
140
Unsuck your backbone
ammeep
672
58k
Transcript
Ϧʔμϒϧίʔυಡॻձ
͓ू·Γ͍͖ͨͩ͋Γ͕ͱ͏ ͍͟͝·͢ɻ
w ಡॻձͷత w Ϧʔμϒϧίʔυʹ͍ͭͯ w ಡॻձͷਐΊํ ͓͠ͳ͕͖
ಡॻձͷత
w ྑ͍ίʔυͷॻ͖ํΛʹ͚ͭΔ w ʑͷษڧͷ͕͔Γʹ ಡॻձͷత
w ྑ͍ίʔυͷॻ͖ํΛʹ͚ͭΔ w ʑͷษڧͷ͕͔Γʹ w ϓϩάϥϛϯάʹ͍ͭͯؾܰʹͤΔ ಡॻձͷతʢͦͯ͠ཪςʔϚʣ
Ϧʔμϒϧίʔυʹ͍ͭͯ
None
ಡΈ͍͢ίʔυͷॻ͖ํΛ ղઆͨ͠ຊ
ίʔυίϯϓϦʔτͷ༰Λ ؆୯ʹ·ͱΊͨͷʁ
ɺͷίϯϐϡʔ λؔ࿈ॻ੶ͷؒച্Ґ ʢδϡϯΫಊௐʣ
ϦʔμϒϧίʔυͰ͍͏ ʮྑ͍ίʔυʯͬͯʁ
ͦΕ ʮཧղ͍͢͠ίʔυʯ
Qཁม ! if (request.user.id == document.owner_id) {! // Ϣʔβ͜ͷจॻΛฤू͢Δ! }!
! …! ! if (request.user.id != document.owenr_id) {! // จॻಡΈऔΓઐ༻! }
Qཁม ! if (request.user.id == document.owner_id) {! // Ϣʔβ͜ͷจॻΛฤू͢Δ! }!
! …! ! if (request.user.id != document.owenr_id) {! // จॻಡΈऔΓઐ༻! }
Qཁม ! if (request.user.id == document.owner_id) {! // Ϣʔβ͜ͷจॻΛฤू͢Δ! }!
! …! ! if (request.user.id != document.owenr_id) {! // จॻಡΈऔΓઐ༻! } ! final boolean user_owns_document = (request.user.id == document.owner_id);! ! if (user_owns_document) {! // Ϣʔβ͜ͷจॻΛฤू͢Δ! }! ! …! ! if (!user_owns_document) {! // จॻಡΈऔΓઐ༻! }
if (!(file_exists && !its_protected)) Error("Sorry, could not read file."); QυɾϞϧΨϯͷ๏ଇΛ͏
QυɾϞϧΨϯͷ๏ଇΛ͏ if (!(file_exists && !its_protected)) Error("Sorry, could not read file.");
if (!file_exists || is_protected) Error("Sorry, could not read file.");
ಡॻձͷਐΊํ
͡ΊΑ͏