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
Ryota Matsunaga
February 01, 2021
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jest introduction
Ryota Matsunaga
February 01, 2021
More Decks by Ryota Matsunaga
See All by Ryota Matsunaga
jest introduction
mats0000
0
200
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Typedesign – Prime Four
hannesfritz
42
3.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
The Invisible Side of Design
smashingmag
301
52k
Navigating Weather and Climate Data
rabernat
0
560
Unsuck your backbone
ammeep
672
58k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
Transcript
カンファレンス 松永遼太
今⽇話すこと カンファレンスの発表 話さないこと 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