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

Intro to Go

Intro to Go

Slides from a Go Lang Coding Dojo I ran recently at a client.

Clarence Bakirtzidis

October 03, 2014
Tweet

More Decks by Clarence Bakirtzidis

Other Decks in Programming

Transcript

  1. By Clarence Bakirtzidis ! Twitter: @clarenceb_oz | Email: [email protected], [email protected]

    Intro to Go (aka golang) Image credit: https://github.com/golang-samples/gopher-vector/blob/master/gopher.png
  2. What is Go? • Programming language developed at Google in

    2007 by
 Robert Griesemer, Rob Pike, and Ken Thompson • Compiled, Statically-Typed language with “C”-like syntax • Designed to be a simple language to learn • Addresses real scalability and productivity problems at Google • Developed because the inventors disliked C++ ;) Image credits: http://talks.golang.org/2012/splash/datacenter.jpg
  3. Why Go? (in quotes) “The goals of the Go project

    were to eliminate the slowness and clumsiness of software development at Google…” “Go's purpose is therefore not to do research into
 programming language design…” “The language was designed by and for people who write and read
 and debug and maintain large software systems.” Excerpts from: http://talks.golang.org/2012/splash.article, http://commandcenter.blogspot.com.au/2012/06/less-is-exponentially-more.html Image credit: http://rouninurashima.files.wordpress.com/2012/05/gordon_unicorn1.png “Less is exponentially more”
  4. What is it good for? • Systems Programming - like

    C but easier, low-level access, C-interop • Web Services - It has just about everything you need built into the Standard Library • Concurrent Programming - Its built into the language: goroutines and channels • Target multiple platforms - Linux, Windows, Mac OS X, Free BSD • Simple deployments - Your app is a single binary with no other dependencies • Large scale development! • Easy to read, write, maintain • Garbage collected, statically-typed, fast compilation, fast execution Image credit: http://blog.golang.org/go-11-is-released_gopherbiplane5.jpg
  5. • Google! • SoundCloud! • Docker! • Dropbox! • DigitalOcean

    Who uses it? • Hashcorp (Serf, Terraform, Consul, Packer) • Rackspace (Airbrake, Gophercloud) • SendGrid! • Many more... Image credit: https://developer.rackspace.com/blog/gophercloud/
  6. Into the codes… 1. Selected examples from Tour of Go

    (http://tour.golang.org/) 2. Sample RESTful API and Commandline tool: • https://github.com/clarenceb/jokes_api_golang Image credit: https://talks.golang.org/2012/splash/appenginegophercolor.jpg
  7. Learning Resources • Essential background reading:! • http://commandcenter.blogspot.com.au/2012/06/less-is-exponentially-more.html • http://talks.golang.org/2012/splash.article

    • Start Learning Go now:! • Tour of Go (http://tour.golang.org/) - Interactive hands-on tour of Go • How I Start - Go (http://howistart.org/posts/go/1) - Go setup and sample wed service • Go by Example (https://gobyexample.com/) - Annotated examples • Go Programming Language Official Site (http://golang.org/) - Blog, Docs, etc. Image credit: https://golang.org/doc/gopher/doc.png