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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenshi Kamata
June 01, 2017
Programming
7.8k
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
AWSに止められる覚悟してますか?
morizo_1984
2
540
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
290
[2026-10-09]一枚の布で作らなくてもいい。 信頼性は「パッチワーク」で紡がれる~既存の運用と新しい可能性をつなぎ合わせてきたCREの話~
tosite
0
110
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
340
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
130
Domain-Driven Transformation
hschwentner
2
2.3k
Event is what happens
moro
2
1.1k
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
180
Kotlinの15年とServer-Side Kotlin
n_takehata
1
160
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
230
AI-Powered Domain-Driven Design
ziobrando
0
160
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
GraphQLとの向き合い方2022年版
quramy
50
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
The Cult of Friendly URLs
andyhume
79
7k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
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 はぜひ皆さん目を通して欲しい! ◦
そのために日本語で訳したので