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
cocone Teck Talk Vol.1 -Java開発者のGoプロジェクト1年の振り返り
Search
cocone
August 17, 2021
Programming
0
440
cocone Teck Talk Vol.1 -Java開発者のGoプロジェクト1年の振り返り
Go?Projectアサイン
Goという壁
GoとJavaの差
Goと仲良く慣れるまでの道のり
まだ慣れないGoのところ
GoでGo!Go!Go!
cocone
August 17, 2021
Tweet
Share
More Decks by cocone
See All by cocone
Cocone_Research_Center_2025.pdf
cocone
0
160
20240301_cocone_EMゆるミートアップvol6_LT資料
cocone
0
880
2024_cocone-avatarservice.pdf
cocone
0
2k
2024_cocone-wellbeing
cocone
0
4.8k
2023夏季合同企業説明会ココネ
cocone
0
370
cocone TECH TALK Vol.6 - リアルタイム対戦xバックエンドアーキテクチャ
cocone
0
610
cocone TECH TALK Vol.6 - ココネグループのブロックチェーン MOOI Network とのバックエンド連携
cocone
0
520
cocone TECH TALK Vol.6 - Kotlin バックエンドアーキテクチャ of アバターサービス
cocone
0
560
ココネ株式会社 会社紹介
cocone
0
130k
Other Decks in Programming
See All in Programming
Leading Effective Engineering Teams in the AI Era
addyosmani
7
510
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
240
AI Agent 時代的開發者生存指南
eddie
4
2k
CSC509 Lecture 05
javiergs
PRO
0
310
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.1k
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
110
CSC509 Lecture 03
javiergs
PRO
0
340
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
300
株式会社 Sun terras カンパニーデック
sunterras
0
380
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
130
Software Architecture
hschwentner
6
2.3k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Designing for Performance
lara
610
69k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Site-Speed That Sticks
csswizardry
13
910
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Why Our Code Smells
bkeepers
PRO
340
57k
Transcript
Java開発者の Goプロジェクト1年の振り返り
林 賛昊(イム チャノ) サーバー/ポケコロツイン開発リーダー 職務経歴 ・NHN Japan株式会社(現Line) ・cocone株式会社
・NC Japan株式会社 趣味 Outdoor系(キャンプ、登山、運動) 社内でストラックアウトができた! blackpink
目次 3 • Go? プロジェクトアサイン • Goという壁 • GoとJavaの差 •
Goと仲良く慣れるまでの道のり • まだなれないGoのところ • GoでGo!Go!Go!
開発言語経歴(ほとんどがJava開発) 4 .Ne PHP C# Python No de. js AS
Obje ctive C Andr oid Uni...
Go? プロジェクトアサイン 5 CTO Kさん ME 新規プロジェクトがリリース直 近ですが、開発が足りないの でお願いします。 できますね?
アハハハハハ ^_____^
Deep Impact! 6 GO Java人生からいきなりGo? 生き残るのを祈ります。。
救いの手 7 • 実は抗体があった ◦ 社内Go勉強会参加 ◦ 少し触ってみた • 開発中のプロジェクトのため、サポートがあった
• リリースまで1ヶ月残っていた ◦ CMS作成でトレーニングを始めた
Goの特徴 8 • 早い ◦ コンパイル、起動が秒速!! ◦ 処理スピード(Go:機械語、Javaはバイトコード) • メモリ管理をGoで行う
• モジュールだけで動く • goroutine軽量スレッド処理(channel) • シンプルで使いやすい
Goという壁 - ポインター型、バリュー型 9 • ポインター型 ◦ ポインターで参照する ◦ *StructA,
[]*StructB ◦ structA := &StructA{} • バリュー型 ◦ 値をコピーして参照する ◦ StructA、[]StructB ◦ structA := StructA{} • Map / Sliceはポインター型のみ
Goという壁 - タイプの厳格さ 10 • タイプの厳格さ ◦ int / int8
/ int16/ int32 / Int64, (uintprt) ※int : OSやCPUなどの実装系に依存した
Goという壁 - nil 11 • nil (javaのnullに該当する) • Goのnil:型を持つ ←
結果はfalse
Goという壁 - panic 12 • JavaのExceptionに該当 • panicを処理しないとプロセスが終了する ◦ APが死亡することもあった
• defer{ recover{} }でハンドリングできる ◦ java : try ~ catch ~ finally
error 13 • errorは処理の結果によるもの • functionのreturnで異常終了をお知らせる ◦ func testFunction() (int32,
error) {} • errorは処理しなくてもいい ◦ rVal1, _ := testFunction()
GoとJavaの差 - interface / interface{} 14 • interface / interface{}
◦ inteface ▪ Go, Java : 概念 ◦ interface{} ▪ Java:interface型はない。Objectに近い • Object → super class ▪ Go:型(Data Type) • interface{} → 他のデータタイプと無関係 • 全てのデータタイプが入れる
GoとJavaの差 - その他 15 • multiple return value ◦ Goで一番嬉しい機能
• package ◦ Goはクラスの概念がないため、package単位になる • 使わない変数・importはコンパイルエラーになる
Goと仲良く慣れる近道 16 • Javaの習性を捨てる ◦ GoはObject指向の言語ではない(公式な言及はない) • 真似する ◦ Goのコードを読む、同じく実装する
• CodeStyle Checkerを活用する ◦ checkstyleを利用中
まだなれないGoのところ 17 • 暗黙的な処理(型推論) ◦ param := 100 ->
var param int = 100 ◦ var sliceParam []string -> nil だが初期化される • primitive typeのアドレス参照 ◦ count := 100 abc := &count • 関数型変数 ◦ func sampleFunction(paramFunc valFunc() rtn)
Javaが恋しくなるところ 18 • Genericsが使えない • 高度な抽象化が難しい • interface型のConvert ◦ タイプチェックから変換が必要
◦ 何が入っているかわかってるからやってくれ
GoでGo!Go!Go! 19 • 軽い、早い ◦ 本番モジュール:10Mb程度 • 本番はGoモジュールだけで完結 ◦ 環境構築がいらない
• 学習しやすい • Google様( 個人の感想です )が開発してる!!
ポケコロツイン 20 技術スタック Server Go Client Unity (C#) 通信 gRPC
データタイプ protocol buffer
Q&A / Tips 21 • https://play.golang.org/ (web codingツール) • https://golang.org/ref/spec(blog)
◦ https://www.ymotongpoo.com/works/goblog-ja • https://github.com/avelino/awesome-go(library) • IDE ◦ Intellij-go plugin, vscode, Go Land, Atom
ご清聴ありがとうございます 22