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
330
リーダブルコード読書会 #1
社内リーダブルコード読書会 #1
Kenta Enomoto
July 17, 2014
Tweet
Share
More Decks by Kenta Enomoto
See All by Kenta Enomoto
調理場で使うタブレット専用アプリ をどうつくったか -STORES モバイルオーダー 実装の舞台裏-
enomotok
0
15
[DroidKaigi 2025] 共有と分離 - Compose Multiplatform "本番導入" の設計指針
enomotok
0
26
Kotlin Multiplatform / Compose Multiplatform を活用したモバイルアプリ開発の最前線
enomotok
0
110
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
450
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
64
What's new in Xcode 16 ダイジェスト
enomotok
0
830
Introducing Pkl
enomotok
0
2.9k
iOS リポジトリへの Renovate の導入
enomotok
2
410
iOS開発とGitLab CI
enomotok
7
4.1k
Other Decks in Programming
See All in Programming
ThorVG Viewer In VS Code
nors
0
640
Deno Tunnel を使ってみた話
kamekyame
0
310
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
330
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
6
1.9k
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
160
Grafana:建立系統全知視角的捷徑
blueswen
0
280
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
4.5k
Patterns of Patterns
denyspoltorak
0
420
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
440
PC-6001でPSG曲を鳴らすまでを全部NetBSD上の Makefile に押し込んでみた / osc2025hiroshima
tsutsui
0
200
Featured
See All Featured
Design in an AI World
tapps
0
110
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
130
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
61
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
120
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
1
340
Navigating Team Friction
lara
191
16k
Facilitating Awesome Meetings
lara
57
6.7k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
45
30 Presentation Tips
portentint
PRO
1
180
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏