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
270
リーダブルコード読書会 #1
社内リーダブルコード読書会 #1
Kenta Enomoto
July 17, 2014
Tweet
Share
More Decks by Kenta Enomoto
See All by Kenta Enomoto
What's new in Xcode 16 ダイジェスト
enomotok
0
350
Introducing Pkl
enomotok
0
1.9k
iOS リポジトリへの Renovate の導入
enomotok
2
310
iOS開発とGitLab CI
enomotok
7
4k
ポモドーロテクニックについて
enomotok
0
100
Other Decks in Programming
See All in Programming
Regular Expressions, REXML, Automata Learning
makenowjust
0
220
GoのIteratorに詳しくなってしまう
inatonix
1
200
Shinjuku.rb#95:心の技術書紹介
free_world21
1
110
いまから追い上げる、Jetpack Compose トレーニング
nyafunta9858
0
590
マルチモジュールにおけるテスト最適化
fxwx23
0
210
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
1k
How to Break into Reading Open Source
kaspth
2
210
o1モデルのプロンプトエンジニアリングって?
ktc_wada
0
260
令和トラベルにおけるLLM活用事例:社内ツール開発から得た学びと実践
ippo012
0
210
A New Era of Testing
mannodermaus
2
510
私のEbitengineの第一歩
qt_luigi
0
450
GraphQL あるいは React における自律的なデータ取得について
quramy
11
3k
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
Statistics for Hackers
jakevdp
794
220k
We Have a Design System, Now What?
morganepeng
48
7.1k
Designing for humans not robots
tammielis
248
25k
Code Reviewing Like a Champion
maltzj
517
39k
Agile that works and the tools we love
rasmusluckow
327
20k
Web development in the modern age
philhawksworth
205
10k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.4k
What the flash - Photography Introduction
edds
67
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
The Illustrated Children's Guide to Kubernetes
chrisshort
47
48k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
157
15k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏