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
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
21
[DroidKaigi 2025] 共有と分離 - Compose Multiplatform "本番導入" の設計指針
enomotok
0
33
Kotlin Multiplatform / Compose Multiplatform を活用したモバイルアプリ開発の最前線
enomotok
0
120
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
470
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
79
What's new in Xcode 16 ダイジェスト
enomotok
0
850
Introducing Pkl
enomotok
0
3k
iOS リポジトリへの Renovate の導入
enomotok
2
420
iOS開発とGitLab CI
enomotok
7
4.1k
Other Decks in Programming
See All in Programming
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
170
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
150
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
180
Claude Codeログ基盤の構築
giginet
PRO
7
3.8k
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
110
Rethinking API Platform Filters
vinceamstoutz
0
5k
20260320登壇資料
pharct
0
140
Tamach-sre-3_ANDPAD-shimaison93
mane12yurks38
0
240
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
300
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
180
「速くなった気がする」をデータで疑う
senleaf24
0
120
Ruby and LLM Ecosystem 2nd
koic
1
1.4k
Featured
See All Featured
Everyday Curiosity
cassininazir
0
180
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
BBQ
matthewcrist
89
10k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
160
Facilitating Awesome Meetings
lara
57
6.8k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
Writing Fast Ruby
sferik
630
63k
YesSQL, Process and Tooling at Scale
rocio
174
15k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
400
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏