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
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
0
250
jest introduction
Ryota Matsunaga
February 01, 2021
Tweet
Share
More Decks by Ryota Matsunaga
See All by Ryota Matsunaga
jest introduction
mats0000
0
180
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
120
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Being A Developer After 40
akosma
91
590k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
750
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
A Soul's Torment
seathinner
5
2.3k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
280
Between Models and Reality
mayunak
1
200
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
150
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
440
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