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
Go Code Review Comment を翻訳した話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kenshi Kamata
June 01, 2017
Programming
7.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go Code Review Comment を翻訳した話
Kenshi Kamata
June 01, 2017
More Decks by Kenshi Kamata
See All by Kenshi Kamata
500万ユーザーを支える残高の冪等性 / The idempotency of the balance for 5 million Merpay users
knsh14
0
3.1k
チャネルの仕組み
knsh14
6
5.6k
Go1.10 strings.Builder の紹介
knsh14
2
1.5k
Go でインタプリタを 書いてみよう
knsh14
0
3.1k
Let’s Create An Interpreter In Go
knsh14
0
170
tvOS Leaderboard
knsh14
0
1.2k
Other Decks in Programming
See All in Programming
Intent as Code
shoppingjaws
6
1k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
0
280
Security issues being discussed on Web Platforms
petamoriken
0
940
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
160
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.4k
XHTMLが残したもの
yosuke_furukawa
PRO
2
800
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
170
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
240
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
140
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
220
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.3k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
390
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
Building a Scalable Design System with Sketch
lauravandoore
464
34k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
570
We Are The Robots
honzajavorek
0
370
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
350
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
720
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Thoughts on Productivity
jonyablonski
76
5.4k
Transcript
Go Review Comment を翻訳した話 Golang Tokyo #6 鎌田健史 ( @knsh14
)
自己紹介 • 鎌田健史 • @knsh14 • KLab 株式会社 エンジニア ◦
Unity でプロト作ったりツール作った り ◦ Javascript でゲーム作ったり • Go 歴2年位
今日の要旨 • みんな Go Code Review Commentsを読もう! ◦ 転ばぬ先の杖を持とう ◦
読んだら次は Effective Goへ! • みなさんも翻訳してみて欲しい! ◦ 勉強の効率めっちゃいい
Go Code Review Commentsとは? https://github.com/golang/go/wiki/CodeReviewComments • コードレビューする際にまずは見るべき箇所をまとめたもの • Effective Go
を更に簡単にしたもの ◦ Go 版リーダブルコード • ありがちな話をまとめたもので、スタイルガイドではない ◦ 必ずしも従う必要もないし無理する必要はない
で翻訳を書きました http://qiita.com/knsh14/items/8b73b31822c109d4c497 • それなりに原文に忠実に訳したつもり ◦ 一部英語力の問題で意味不明な部分もある • なるべく原文に追従する努力 ◦ 3月くらいに見直したら更新されてたので慌てて追記
◦ Context の項もあるよ!
翻訳を書くきっかけ とある社内ツールを Go で書いて レビューお願いしたところ ボッコボコのフルボッコにされる
翻訳を書くきっかけ その時に渡されたのが Code Review Comments だった とりあえず読んだ証拠に自分で翻訳してみることに 3日くらいで全部訳しきった tenntenn に一通り読んでもらって手直ししたあと公開
翻訳してみてよかった • 業務でガリガリ書いているわけじゃないので、初学者の僕に とってはこういういきなり正解のパターンを勉強できるのは効 率が良かった • 自分で言葉に書き起こす分脳みそを使う • 英語の勉強にもなったので他の英語書籍に挑戦するハードル も下がった
もうちょっと中身を詳しく
幾つかのカテゴリに分けられる • コードの見た目を改善 ◦ Gofmt, Mixed Caps… • コメント、文章の体裁 ◦
Comment Sentences, Error String... • tips 系 ◦ Declaring Empty Slices, Named Result Parameters... • 設計の指針 ◦ Receiver Type, Don’t Panic...
コードの見た目を改善 大体はツールでなんとかしようぜな話 gofmt, goimports, golint あたりを使っておけばまず大丈夫 特に golint はめちゃくちゃ優秀
コメントや文章の体裁 コード内の文章の書き方などに関するアドバイス 「説明するものの名前で始めてピリオドで終わりましょう」なんてい うかなり具体的な説明もある 特に Error String で紹介されている「エラーで返すときの文字列 は大文字始まりにしない」はかなり意外だった
tips 系 Declaring Empty Slices や、Named Result Parameters など 間違いではないけどよりよい方法を紹介してくれるパターン
var t []string と t := []string{} の使い分けは意識して書かないと 結構やらかしてることが多そう
設計の指針になるようなもの Receiver Type はぜひ一度読んでみてほしい レシーバーを ポインタにするかどうか迷ったときの指標になる 基本的にはポインタで問題ないけれど、幾つかのパターンにハマ るときはそうでないほうがいい時もある
最後に • 良いドキュメントの翻訳はめっちゃ勉強になるので積極的に やっていきたい • Code Review Comment はぜひ皆さん目を通して欲しい! ◦
そのために日本語で訳したので