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
PHPerがGoに入門してみた/PHPer introduction to Go.
Search
Futoshi Endo
February 22, 2023
Programming
0
4.6k
PHPerがGoに入門してみた/PHPer introduction to Go.
Futoshi Endo
February 22, 2023
Tweet
Share
More Decks by Futoshi Endo
See All by Futoshi Endo
PHP8の機能を使って堅牢にコードを書く
fendo181
6
3k
Introduction to Typing Practice
fendo181
0
720
PsySHを使った効率的なデバッグ方法について / How debug efficiently using PsySH
fendo181
1
1.6k
PHP8によるデザインパターン入門 / Introduction to Design Patterns with PHP8
fendo181
1
1.6k
Laravel.shibuyaで改善してきた IRT勉強会の運営方法について / IRT Study Session Improved Through Laravel Shibuya
fendo181
0
530
EC事業部の各サービスを支えるCREチームの新体制 /New Structure Of EC CRE Team
fendo181
0
1.5k
GTB2020 Web アプリフレームワーク入門/REST API 入門 スライド/ GTB2020 Web App Framework and REST API Introduction
fendo181
1
6k
Laravel Pipe Dreamを使って 素早くプロジェクトを始める/Laravel Pipe Dream Start A Project Quickly
fendo181
0
770
フレームワークを作りながらLaravelのアーキテクチャを学ぶ / Learn Laravel's architecture while creating a framework
fendo181
5
6k
Other Decks in Programming
See All in Programming
Folding Cheat Sheet #4
philipschwarz
PRO
0
100
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
140
SIMD Parallel Programming with the Vector API
josepaumard
0
240
PostmanでAPIの動作確認が楽になった話
h455h1
0
190
slow types ってなんだろう?
karad
0
150
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1.1k
Micro Frontends for Java Microservices - Utah JUG 2024
mraible
PRO
1
110
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
560
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
200
Going beyond Apache Parquet's default settings
xhochy
0
140
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
480
Featured
See All Featured
A Tale of Four Properties
chriscoyier
153
22k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
Building Adaptive Systems
keathley
32
1.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Automating Front-end Workflow
addyosmani
1357
200k
Into the Great Unknown - MozCon
thekraken
15
1k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
The Mythical Team-Month
searls
217
42k
The Invisible Side of Design
smashingmag
294
49k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Transcript
© 2012-2023 BASE, Inc. 2023/02/22 ハードル激低LT大会ッ! PHPerがGoに入門してみた
© 2012-2023 BASE, Inc. 2 氏名:Futoshi Endo 所属:BASE株式会社 入社:2023/01/04 ~
業務:バックエンド エンジニア 趣味:料理、音楽鑑賞、ゲーム PHP歴は5年、Go歴は1ヶ月程度です。 昔からブログを書いたり、Scrapboxで日記を 書いています。 • Endo Tech Blog • https://scrapbox.io/fendo181/ Fendo181 自己紹介
© 2012-2023 BASE, Inc. 3 自己紹介 (BASEに入社してから初リリースするまでに経験した事を紹介します)
© 2012-2023 BASE, Inc. 今日の本題 4 PHPerがGoに入門してみた
© 2012-2023 BASE, Inc. Goに入門しようと思ったきっかけ 5
© 2012-2023 BASE, Inc. Goに入門しようと思ったきっかけ 6 Goで書かれているライブラリを理解したい!
© 2012-2023 BASE, Inc. Goに入門しようと思ったきっかけ 7 • tbls is a
CI-Friendly tool for document a database, written in Go • コマンド1つでDatabaseのスキーマをドキュ メント化してくれる • 社内の「BASE BANK」チームでは導入事例が あり、自分が所属しているチームでも将来的 に導入を考えている ◦ tblsとGitHub Actionsを使ってDBマイグレー ションを含むPRには自動更新したER図を追加 する https://github.com/k1LoW/tbls
© 2012-2023 BASE, Inc. 8 https://github.com/k1LoW/tbls • Goで書かれている。 • 今の自分にとっては、処理がわからずブラッ
クボックスになってしまっている • ちゃんと、コードリーディングをして中身の 処理を把握したい Goに入門しようと思ったきっかけ
© 2012-2023 BASE, Inc. 9 https://github.com/k1LoW/tbls • Goで書かれている。 • 今の自分にとっては、処理がわからずブラッ
クボックスになってしまっている • ちゃんと、コードリーディングをして中身の 処理を把握したい • そうだ、Goを学ぼう Goに入門しようと思ったきっかけ
© 2012-2023 BASE, Inc. 今日お話する内容 1 2 Goの学習方法について まとめ 10
© 2012-2023 BASE, Inc. Goの学習方法について 11
© 2012-2023 BASE, Inc. Goの学習方法について 12 https://go-tour-jp.appspot.com/welcome/1
© 2012-2023 BASE, Inc. 13 Goの学習方法について • ブラウザだけで動作確認できる • 特にエディターを立ち上げる必要はない
• 基本的な文法から学べる • ちゃんと時間かけてやれば1週間程で全ての 項目が理解できる。(...と思っています)
© 2012-2023 BASE, Inc. 14 Goの学習方法について 書籍「テスト駆動開発」の付録Cに書いて あった写経方法を参考にGitHubにコミットを 積んでいる 1.ローカル環境で使えるバージョン管理システム(Git)を用意
2.書見台などで対処の本を固定 3.ひたすらサンプルコードを写して実行 4.実行する度にコミット(コミットログにページ番号を含める) 5.疑問があったらコミットログや本に書き込む。 6.章ごとにタグを打つ。 # git tag -a chap2 -m '第2章まで' # git push --tags origin
© 2012-2023 BASE, Inc. 15 Goの学習方法について https://github.com/Fendo181/go_practice/tree/master/A_Tour_of_Go/control
© 2012-2023 BASE, Inc. まとめ 16
© 2012-2023 BASE, Inc. 17 まとめ • Goを学ぶ方法について紹介しました • Goは機能が少ない分シンプルに書ける
• main関数に実行する処理がまとまっているので 上から順々に追っていけば良い(可読性が高い) • Goのライブラリを見る心理的ハードルが下がった! • 新しいプログラミング言語を学ぶのは楽しい!