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
0
320
リーダブルコード読書会 #1
社内リーダブルコード読書会 #1
Kenta Enomoto
July 17, 2014
Tweet
Share
More Decks by Kenta Enomoto
See All by Kenta Enomoto
[DroidKaigi 2025] 共有と分離 - Compose Multiplatform "本番導入" の設計指針
enomotok
0
14
Kotlin Multiplatform / Compose Multiplatform を活用したモバイルアプリ開発の最前線
enomotok
0
100
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
410
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
53
What's new in Xcode 16 ダイジェスト
enomotok
0
800
Introducing Pkl
enomotok
0
2.8k
iOS リポジトリへの Renovate の導入
enomotok
2
400
iOS開発とGitLab CI
enomotok
7
4.1k
ポモドーロテクニックについて
enomotok
0
150
Other Decks in Programming
See All in Programming
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
390
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
200
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
490
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
dynamic!
moro
10
7.7k
明日から始めるリファクタリング
ryounasso
0
140
Catch Up: Go Style Guide Update
andpad
0
220
Flutterで分数(Fraction)を表示する方法
koukimiura
0
130
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
400
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
160
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.1k
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
4.9k
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
20
1.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Being A Developer After 40
akosma
91
590k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Practical Orchestrator
shlominoach
190
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Scaling GitHub
holman
463
140k
GraphQLとの向き合い方2022年版
quramy
49
14k
Rails Girls Zürich Keynote
gr2m
95
14k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏