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
320
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
36
What's new in Xcode 16 ダイジェスト
enomotok
0
740
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
Is Xcode slowly dying out in 2025?
uetyo
1
180
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
1
3k
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
130
童醫院敏捷轉型的實踐經驗
cclai999
0
130
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
840
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
110
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
160
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
970
Effect の双対、Coeffect
yukikurage
5
1.4k
Benchmark
sysong
0
240
ktr0731/go-mcpでMCPサーバー作ってみた
takak2166
0
170
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
329
21k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Raft: Consensus for Rubyists
vanstee
140
7k
What's in a price? How to price your products and services
michaelherold
246
12k
Scaling GitHub
holman
459
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Making Projects Easy
brettharned
116
6.3k
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.");
ಡॻձͷਐΊํ
͡ΊΑ͏