Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
リーダブルコード読書会 #1
Search
Kenta Enomoto
July 17, 2014
Programming
370
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
リーダブルコード読書会 #1
社内リーダブルコード読書会 #1
Kenta Enomoto
July 17, 2014
More Decks by Kenta Enomoto
See All by Kenta Enomoto
スキャン音は鳴るのにカートに入らない — レジと物理デバイスの事件簿
enomotok
0
49
Renovate のバグを直した話
enomotok
0
22
[DroidKaigi 2025] 共有と分離 - Compose Multiplatform "本番導入" の設計指針
enomotok
0
160
Kotlin Multiplatform / Compose Multiplatform を活用したモバイルアプリ開発の最前線
enomotok
0
170
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
550
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
120
What's new in Xcode 16 ダイジェスト
enomotok
0
900
Introducing Pkl
enomotok
0
3.3k
iOS リポジトリへの Renovate の導入
enomotok
2
460
Other Decks in Programming
See All in Programming
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.5k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
570
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
170
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
380
Groovy as a human and AI friendly programming language
paulk
0
180
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
610
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
320
はじめてのPLATEAU
nokonoko1203
1
360
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
710
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
100
SODA - FACT BOOK(JP)
sodainc
1
40k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
140
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Discover your Explorer Soul
emna__ayadi
2
1.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
290
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Mind Mapping
helmedeiros
1
430
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
680
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.8k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏