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
260
リーダブルコード読書会 #1
社内リーダブルコード読書会 #1
Kenta Enomoto
July 17, 2014
Tweet
Share
More Decks by Kenta Enomoto
See All by Kenta Enomoto
Introducing Pkl
enomotok
0
1.5k
iOS リポジトリへの Renovate の導入
enomotok
2
280
iOS開発とGitLab CI
enomotok
7
4k
ポモドーロテクニックについて
enomotok
0
92
Other Decks in Programming
See All in Programming
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
12
4.3k
TypeScriptでもLLMアプリケーション開発 / LLM Application In Typescript
rkaga
3
1.1k
Revisiting the Hotwire Landscape after Turbo 8 @ RailsConf 2024, Detroit
marcoroth
2
490
ペパボOpenTelemetry革命
pyama86
2
200
Domain-Driven Transformation
hschwentner
2
1.5k
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
690
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
6
1.3k
Docker_OSS_ホスティング入門
satokoki645
0
120
AmperとFleetを使ったAndroidアプリ
yoppie
0
290
Fragment Composition of GraphQL
quramy
13
1.6k
Folding Cheat Sheet #4
philipschwarz
PRO
0
110
SIMD Parallel Programming with the Vector API
josepaumard
0
250
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
43
6.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
How to Ace a Technical Interview
jacobian
273
22k
Typedesign – Prime Four
hannesfritz
36
2.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
Six Lessons from altMBA
skipperchong
22
3k
Build The Right Thing And Hit Your Dates
maggiecrowley
25
2k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
47k
GraphQLとの向き合い方2022年版
quramy
33
12k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏