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
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
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
Facilitating Awesome Meetings
lara
57
6.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
99
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Making Projects Easy
brettharned
120
6.6k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
950
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
85
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