Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The introduction of my way to learn Go for beginners

Naoki Sega
December 02, 2019

The introduction of my way to learn Go for beginners

This slide is the presentation material I presented at Step up Go for Students 2-2.
https://mercari.connpass.com/event/156571/

Naoki Sega

December 02, 2019
Tweet

More Decks by Naoki Sega

Other Decks in Programming

Transcript

  1. About Me • Naoki Sega (Twitter/GitHub: @nsega ) • Tech

    Lead, Backend Team in Mercari JP / Catalog Team • Joined Mercari JP in November 2018. • Go : About 1 year experience in coding as the Production Code. • Community : Kubernetes Meetup, Cloud Native Meetup, … etc • My current interests: Go, GCP, Kubernetes, Microservices, CNCF Products.
  2. Agenda • My background • My approach to learn Go

    • The introduction of my 4 Tips • Conclusion
  3. My background • PHP, Java (Spring, Spring MVC, Spring Boot,

    ..etc) • Experience developing and operating in large-scale service • Experience with AWS, Sakura(cloud services) and On-premises • More than 10 years experience in Backend/Infra Engineer
  4. INPUT OUTPUT PROCESS My Learning Flow - Overview Phase 1

    Getting Started Phase 2 More practical Phase 3 practice, .. and practice through GitHub Issues/PRs Community, Social Media Code Code, Doc Code, Doc Code, Doc
  5. INPUT Phase 1 : Getting started • The Go Programming

    Language ◦ Documentation https://golang.org/doc/ ◦ A Tour of Go https://tour.golang.org/list ◦ The Go Programming Language Specification https://golang.org/ref/spec ◦ Packages https://golang.org/pkg/ My approach to learn Go (1/4)
  6. INPUT Phase 2 : More practical • Effective Go https://golang.org/doc/effective_go.html

    • CodeReviewComments https://github.com/golang/go/wiki/CodeReviewComments • Goに入ってはGoに従え https://ukai-go-talks.appspot.com/2014/gocon.slide • Go at Google: Language Design in the Service of Software Engineering https://talks.golang.org/2012/splash.article • Uber Go Style Guide https://github.com/uber-go/guide/blob/master/style.md My approach to learn Go (2/4)
  7. My approach to learn Go (3/4) INPUT Phase 3: practice,

    practice and practice • Practical Go: Real world advice for writing maintainable Go programs https://dave.cheney.net/practical-go/presentations/qcon-china.html • High Performance Go Workshop https://dave.cheney.net/high-performance-go-workshop/sydney-2019.html • Looking for Issues/PRs and Reading Code ◦ in OSS ( Kubernetes, Docker, go and etc) • Attending a study session/Go community ◦ In my case, GoFriday, mercari.go
  8. INPUT Optional (To catch up on latest information timely) •

    The Go Blog • go.dev, pkg.go.dev, learn.go.dev • Go community ◦ The Go Project https://golang.org/project/ ◦ Gophers (gophers.slack.com) FYI: to join gophers.slack.com ◦ golang.tokyo  , Go Conference , mercari.go and etc in Japan. • reddit - r/golang • Twitter Golang Weekly(@golangweekly), Go News(@golangnews), Go Time(@GoTimeFM) My approach to learn Go (4/4)
  9. INPUT OUTPUT PROCESS My Learning Flow - Overview Phase 1

    Getting Started Phase 2 More practical Phase 3 Practice,..and practice through Issues, PRs Community, Social Media Code Code, Doc Code, Doc Code, Doc
  10. Tips 1 : Let’s use the go tool Go tool

    • Many useful tools prepared in cmd package. • e.g. go vet, go generate, go build, ...etc • I frequently used go tool :) https://golang.org/cmd/go/ https://godoc.org/golang.org/x/tools https://godoc.org/golang.org/x/tools/cmd
  11. Tips 2 : Let’s use the Lint tools: reviewdog •

    govet golang.org/cmd/vet/ • golint github.com/golang/lint • misspell github.com/client9/misspell • errcheck github.com/kisielk/errcheck • staticcheck staticcheck.io/docs/staticcheck https://github.com/reviewdog/reviewdog
  12. Tips 3 : Let’s use IDE and editor support plugin

    • gofmt • goimports • Lookup Godoc • Code completion/Code navigation • Debugger FYI: My recommendation: GoLand “GoLand is an IDE by JetBrains aimed at providing an ergonomic environment for Go development.” GoLand 2019.3: Faster Than Ever Before with Improved Go Modules Support, New Quick-fixes, and Much More
  13. The Go Playground play.golang.org • You can build and run

    the programs easily on the Go Playground. • e.g. Data Structures(Arrays, Slices, Maps), Concurrency Tips 4 : Let’s use the Go Playground
  14. Conclusion • Implementing INPUT => PROCESS => OUTPUT cycle repeatedly.

    • Reflecting my output and others feedback constantly. • Designing simply, Coding simply. • Contributing to OSS, community. • Practice, practice, and practice.