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
jest introduction
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ryota Matsunaga
February 01, 2021
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jest introduction
Ryota Matsunaga
February 01, 2021
Transcript
9 slides
カンファレンス 松永遼太
今⽇話すこと カンファレンスの発表 話さないこと Youtube チャンネルについて
発表内容 実はkamithonさんにリーダブルコードについての発表を勧められていました。 ただ、僕のコードすでに結構読みやすいと思うので 今⽇は HEAP についての発表をします!
冗談です!冗談です! ✌ では、リーダブルコードについての発表始めます
優れたコード 読みやすいコード エンジニアはコードを読む事が⾮常に多いから 他⼈が最短で理解できるコードでなければならない 短い⽅がいいけど、理解するまでにかかる時間を短くするほうが ⼤切 > ⾼度な⽂法 ステップ数が少ない スマート
変数名に情報を詰め込む • Get ではなくfetchやdownload など明確な単語を使う • Temp, returnVal, val, x,
yなどは避ける • 変数名のフォーマット • 限界値を含める時はmin, maxを使う • 範囲を指定する時はfirst、lastを使う • ブール値ではis、hasを使う (マンション) https://github.com/geo-logic/geologic-admin/pull/1580
すぐれたコードは⽬に優しいものでなけ ればいかない 3つの原則 1. ⼀貫性のあるレイアウト 2. 似ているコードは似ているように⾒せる (FullCustom & CustomGeo)
3. 関連するコードをまとめてブロックにする (Office) https://github.com/geo-logic/geologic-admin/pull/1547
明⽇からあなたも読みやすいコードを書こう! すぐ実践できる編 三項演算⼦にこだわらない - コードを短くできるけど、読みにくくなるケースもある ネストを浅くする - ネストすればするほど読みにくくなる ⼀つの関数でやりすぎない (Office)
- ⼀度に複数の事をやるコードは理解しにくい。
Youtube https://www.youtube.com/watch?v=XlxMSL9qMn4
More Decks by Ryota Matsunaga
See All by Ryota Matsunaga
jest introduction
mats0000
0
200
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
530
First, design no harm
axbom
PRO
2
1.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
530
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Claude Code のすすめ
schroneko
67
230k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
320
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
Statistics for Hackers
jakevdp
799
230k