Upload
clarence-bakirtzidis
View
207
Download
0
Embed Size (px)
DESCRIPTION
Slides from a Go Lang Coding Dojo I ran recently at a client. The slides are pretty brief as most of the session was spent looking through Tour of Go (http://tour.golang.org/) and a sample project I put together for the coding dojo: https://github.com/clarenceb/jokes_api_golang
Citation preview
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
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
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 intoprogramming language design…”
“The language was designed by and for people who write and readand 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.htmlImage credit: http://rouninurashima.files.wordpress.com/2012/05/gordon_unicorn1.png
“Less is exponentially more”
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
• 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/
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
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
The End
Image credit: http://blog.golang.org/gif-decoder-exercise-in-go-interfaces_image00.jpg