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
310
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
32
What's new in Xcode 16 ダイジェスト
enomotok
0
730
Introducing Pkl
enomotok
0
2.7k
iOS リポジトリへの Renovate の導入
enomotok
2
380
iOS開発とGitLab CI
enomotok
7
4.1k
ポモドーロテクニックについて
enomotok
0
140
Other Decks in Programming
See All in Programming
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
2
540
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
110
GoのWebAssembly活用パターン紹介
syumai
3
10k
2度もゼロから書き直して、やっとブラウザでぬるぬる動くAIに辿り着いた話
tomoino
0
160
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
230
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
1.4k
インターフェース設計のコツとツボ
togishima
2
710
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
300
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
550
エラーって何種類あるの?
kajitack
5
140
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
6
1.4k
Javaのルールをねじ曲げろ!禁断の操作とその代償から学ぶメタプログラミング入門 / A Guide to Metaprogramming: Lessons from Forbidden Techniques and Their Price
nrslib
3
1.9k
Featured
See All Featured
Building Applications with DynamoDB
mza
95
6.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.8k
GraphQLとの向き合い方2022年版
quramy
46
14k
Visualization
eitanlees
146
16k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
920
Gamification - CAS2011
davidbonilla
81
5.3k
Documentation Writing (for coders)
carmenintech
71
4.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Become a Pro
speakerdeck
PRO
28
5.4k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏