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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
新米エンジニアから見たGo
Search
yuita
December 14, 2024
340
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
新米エンジニアから見たGo
yuita
December 14, 2024
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
600
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
410
How to Ace a Technical Interview
jacobian
281
24k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
820
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Agile that works and the tools we love
rasmusluckow
331
22k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Exploring anti-patterns in Rails
aemeredith
3
500
The browser strikes back
jonoalderson
0
1.6k
Transcript
新米エンジニアから見たGo
自己紹介 ゆいた X:@yuita_0360 株式会社PREVENT(医療系) バックエンドエンジニア(Go、Rails) エンジニア歴1年半弱 Goまともに書き出してから1年くらい
新米エンジニア(Rails勉強してた) から見たGo ※これからGo勉強する人や、ジュニアエンジニアを指導 する立場の人の何かの参考になれば幸いです。
書いてて楽しいというのが一番 ・シンプルな言語な分自分で考えることが多い ・if文もっと読みやすくかけないか。 ・エラーハンドリングやロギングどうしよう。 ・並行処理を上手く使えると気持ちいい ・タイムアウト対策やバックグラウンド処理。 ・テストもGoで書けるのでGoしか書かなくていい ・テストFWみたいなのが無いのは個人的に好き。
管理が楽 ・今のところ後方互換性担保されているので バージョンアップが楽。 ・半年に1回バージョンアップされるのがわかっている。X 見てたら情報が勝手に流れてくる!! ・go fmt
個人的に難しいと思う部分 ・ジェネリクスの上手な使い方 ・そもそもどういうケースで使うのが有用? ・並行処理の使い所の判断 ・必ずしもメリットがあるわけではない。 ・使うとどうしてもコードが複雑になる。 ・変数名問題 ・ローマ字1字とかでいいやつ。 ・使っていいスコープ、ケースの判断、一貫性ぶれがち。
今までやらかした失敗
HTTPクライアントのタイムアウト時間短くしすぎた ・タイムアウト設定して意気揚々とリリースしたらTLSハンドシェイクが設 定時間内に終わらずタイムアウトになった。。。 ※実際のコードではなくサンプルです
マップのキーにtime.Time型の値をそのまま使った https://pkg.go.dev/time#Time ・マップのキーとしてtime.Time型の値を使いたい場合、全てのキーに同 一のLocationが設定されている、かつモノトニッククロックの読み取り値 が取り除かれている必要がある。 たまにやっちゃうスライス初期化周り slice := make([]int, 10)
これにappendしちゃう
今まで読んだおすすめのGo本 ・初めてのGo言語 ・Go言語プログラミングエッセンス ・詳解 Go言語Webアプリケーション開発 ・Go言語100Tips
ご清聴ありがとうございました!