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
310
リーダブルコード読書会 #1
社内リーダブルコード読書会 #1
Kenta Enomoto
July 17, 2014
Tweet
Share
More Decks by Kenta Enomoto
See All by Kenta Enomoto
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
270
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
30
What's new in Xcode 16 ダイジェスト
enomotok
0
710
Introducing Pkl
enomotok
0
2.6k
iOS リポジトリへの Renovate の導入
enomotok
2
370
iOS開発とGitLab CI
enomotok
7
4k
ポモドーロテクニックについて
enomotok
0
130
Other Decks in Programming
See All in Programming
CursorとDevinが仲間!?AI駆動で新規プロダクト開発に挑んだ3ヶ月を振り返る / A Story of New Product Development with Cursor and Devin
rkaga
3
910
Embracing Ruby magic
vinistock
2
250
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
170
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
2
590
OpenTelemetry + LLM = OpenLLMetry!?
yunosukey
1
130
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
82
21k
音声プラットフォームのアーキテクチャ変遷から学ぶ、クラウドネイティブなバッチ処理 (20250422_CNDS2025_Batch_Architecture)
thousanda
0
430
Designing Your Organization's Test Pyramid ( #scrumniigata )
teyamagu
PRO
5
1.5k
LRパーサーはいいぞ
ydah
7
1.4k
Cursorを活用したAIプログラミングについて 入門
rect
0
220
今話題のMCPサーバーをFastAPIでサッと作ってみた
yuukis
0
130
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
900
Featured
See All Featured
Building Applications with DynamoDB
mza
94
6.4k
Music & Morning Musume
bryan
47
6.5k
How to Ace a Technical Interview
jacobian
276
23k
Code Review Best Practice
trishagee
68
18k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
RailsConf 2023
tenderlove
30
1.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Into the Great Unknown - MozCon
thekraken
38
1.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
It's Worth the Effort
3n
184
28k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏