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

Introduction my way to learn Go for beginners

Introduction my way to learn Go for beginners

This slide is the presentation material I presented on mercari.go #7.
https://www.meetup.com/MercariDev/events/259659499
https://mercari.connpass.com/event/123160/

Naoki Sega

March 26, 2019
Tweet

More Decks by Naoki Sega

Other Decks in Programming

Transcript

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

    Team in Mercari JP / Category growth • Joined Mercari JP in November 2018. • Go : About six months experience in coding as the Production Code. • Community : Kubernetes Meetup, Cloud Native Meetup, … etc • My current interests: Go, GCP, Kubernetes, Microservices, CNCF Products.
  2. My background • 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
  3. 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
  4. INPUT Phase 1 : Getting started • The Go Programming

    Language ◦ Documentation ◦ A Tour of Go ◦ The Go Programming Language Specification ◦ Packages My approach to learn Go (1/4)
  5. INPUT Phase 2 : More practical • Effective Go •

    CodeReviewComments • Goに入ってはGoに従え • Go at Google: Language Design in the Service of Software Engineering • Go for Java Programmers My approach to learn Go (2/4)
  6. My approach to learn Go (3/4) INPUT Phase 3: practice,

    practice and practice • Practical Go: Real world advice for writing maintainable Go programs • Looking for Issues/PRs and Reading Code ◦ in the production code. ◦ in OSS ( Kubernetes, Docker, ...etc) • Attending a study session (e.g. In my case, GoFriday)
  7. INPUT Optional (To catch up on latest information timely) •

    The Go Blog • Community ◦ The Go Project ◦ Gophers (gophers.slack.com) FYI: to join gophers.slack.com ◦ golang.tokyo  , Go Conference , .. and so on in Japan. • reddit - r/golang • Twitter Golang Weekly(@golangweekly), Go News(@golangnews), Go Time(@GoTimeFM) My approach to learn Go (4/4)
  8. 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
  9. Tips 1 : 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
  10. Tips 2 : 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
  11. Tips 3 : 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.” - Nilness Analyzer ( from GoLand 2019.1 in Beta) “a set of code inspections designed to instantly detect whether variables might have nil or not nil values in a variety of cases.” https://blog.jetbrains.com/go/2019/03/14/goland-2019-1-goes-beta/
  12. 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 : Use the Go Playground
  13. 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.