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
Kotlin Multiplatform / Compose Multiplatform を活用したモバイルアプリ開発の最前線
enomotok
0
89
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
360
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
44
What's new in Xcode 16 ダイジェスト
enomotok
0
780
Introducing Pkl
enomotok
0
2.7k
iOS リポジトリへの Renovate の導入
enomotok
2
390
iOS開発とGitLab CI
enomotok
7
4.1k
ポモドーロテクニックについて
enomotok
0
140
Other Decks in Programming
See All in Programming
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
130
Infer入門
riru
4
1.5k
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
200
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5.7k
Flutterと Vibe Coding で個人開発!
hyshu
1
250
エンジニアのための”最低限いい感じ”デザイン入門
shunshobon
0
110
Comparing decimals in Swift Testing
417_72ki
0
170
Introduction to Git & GitHub
latte72
0
110
自作OSでDOOMを動かしてみた
zakki0925224
1
1.3k
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
AIレビュアーをスケールさせるには / Scaling AI Reviewers
technuma
2
180
Langfuseと歩む生成AI活用推進
licux
3
220
Featured
See All Featured
Scaling GitHub
holman
462
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
4 Signs Your Business is Dying
shpigford
184
22k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
A Tale of Four Properties
chriscoyier
160
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.6k
Building an army of robots
kneath
306
45k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
8
550
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏