Getting started with Go - Florin Patan - Codemotion Rome 2017

Getting started with Go
24 Mar 2017
Florin Pățan
Cloud Services Engineer
YouView TV Ltd.
About me
gopher for ~4 years
the Communtiy version of Go plugin for IntelliJ maintainer
GoBridge Core Member - Workshop Logistics
Open-Source contributor
What is Go?
What is Go?
"Go is an open source programming language that makes it easy to build simple,
reliable, and e cient software."
golang.org(https://golang.org)
Getting started with Go - Florin Patan - Codemotion Rome 2017
What is Go for me?
Go makes programming fun (again)
allows me to focus on the algorithm rather than how to implement the solution
mature community, growing at a good rate
Why should you learn Go?
Great mascot
Copyright Renee French
Join the Go side
Copyright "someone from the Internet"
If you are new to programming
Go is much simpler than many other languages
the syntax is not in your way
introduces the advanced concepts of concurrency w/o the usual overhead
exposure to how parts of the computer work
Disclaimer
Depending on your goals, Go might not be the very best language to learn as a
beginner. Languages such as Python or even Javascript might be more suitable.
If you know dynamic programming languages
type safety at compile time
syntax that sometimes feels like a dynamic language
simple and fast build system
much faster than the others (almost always)
single binary to deploy = love from your ops team
If you know C/C++/Java
fast compiler even with large projects
simpli ed syntax that allows you to focus on solving the problem
compiles to native code, cross-compiles to other OS-es (when possible)
can interact with C code via CGO
can be compiled to a binary with no external dependencies
If you are as an Ops person...
The main reason would be: better tools.
replace your complex bash scripts with testable Go apps
write tools that help you create / maintain infrastructure
write tools that help you simulate protocols interactions: github.com/adrianco/spigo
(https://github.com/adrianco/spigo)
all the new tools such as Docker, Kubernetes, CloudFoundry etc are written in Go
Go features
Go features
easy to read / write
statically typed
garbage collected
fast to compile
concurrency is baked into the language
functions are rst class citizens
composable types
interfaces satis ed implicitly
return multiple values
produces a single executable
cross platform, natively compiled
Go supported platforms
android/386 darwin/386
android/amd64 darwin/amd64
android/arm darwin/arm
android/arm64 darwin/arm64
windows/386 nacl/386
windows/amd64 nacl/amd64p32
linux/386 nacl/arm
linux/amd64 freebsd/386
linux/arm freebsd/amd64
linux/arm64 freebsd/arm
linux/mips dragonfly/amd64
linux/mips64 netbsd/386
linux/mips64le netbsd/amd64
linux/mipsle netbsd/arm
linux/ppc64 openbsd/386
linux/ppc64le openbsd/amd64
linux/s390x openbsd/arm
plan9/386 solaris/amd64
plan9/amd64
plan9/arm
Oh and Javascript via GopherJS
Go's missing features
generics
overloads
implicit type conversions
Go tooling
Go tooling
goimports (or gofmt)
golint and govet
go-staticcheck (or gometalinter)
guru
Go Playground(https://play.golang.org)
etc.
Write your own tools using go/ast package
Go editors
Gogland (or any other Jetbrains IDE)
VSCode
emacs
Atom
vim
LiteIDE
Sublime 3
many others
Is it production ready?
Users of Go out there
Google
CloudFlare
Canonical (Ubuntu)
Microsoft, Facebook, AWS, Heroku
rkt, Docker, Kubernetes
Almost all HashiCorp tools
List of Go users github.com/golang/go/wiki/GoUsers(https://github.com/golang/go/wiki/GoUsers)
Some success stories github.com/golang/go/wiki/SuccessStories(https://github.com/golang/go/wiki/SuccessStories)
Probably your are using Go w/o knowing
The maturity of the eco-system
A lot of libraries are very stable and battle tested
Go favors composition thus gophers are focusing on making interchangeable libraries
Concrete examples of mature libraries
To create a web app all you need is the standard library.
However, if you want to add some convenience:
gorilla/mux or httprouter (to handle the routing)
sqlx (for SQL database interaction)
go-mysql-driver / libpq
logrus or gokit/kit/log
gokit to enable overall better app design
The Go Community
Go Code of Conduct
Go has a Code of Conduct which enables gophers to be safe and welcomed in any
o cial Go environment as well as places which choose to adhere to it.
golang.org/conduct(https://golang.org/conduct)
Go Mailing Lists
We have a mailing list for general questions or Go related things
groups.google.com/forum/#!forum/golang-nuts(https://groups.google.com/forum/#!forum/golang-nuts)
We also have a mailing list for development of Go itself
groups.google.com/forum/#!forum/golang-dev(https://groups.google.com/forum/#!forum/golang-dev)
Go Forum
forum.golangbridge.org(https://forum.golangbridge.org)
Slack
gophers.slack.com(https://gophers.slack.com)
over 14500+ Gophers (growing at a rate of ~200 gophers / week)
one of the largest known open Slacks for programmers
gophers from everywhere in the World
usually most questions are answered in real-time by always friendly gophers
governed by an enhanced CoC, GoBridge speci c
Invites: https://invites.slack.golangbridge.org(https://invites.slack.golangbridge.org)
GoBridge
golangbridge.org(golangbridge.org)
Getting started with Go - Florin Patan - Codemotion Rome 2017
GoBridge
Core mission
Our core mission is to enable minorities in tech to use Go as a tool to learn
and teach programming and, ultimately, to empower underrepresented groups in
tech to help increase diversity in the Go community.
GoBridge
How do we do this?
create safe spaces where everyone is welcomed
organize workshops
remote meetups
write training material
teach the teachers / organizers
try and connect organizers with sponsors
Resources
O cial
The language tour: tour.golang.org(https://tour.golang.org)
O cial:
golang.org/doc/code.html(https://golang.org/doc/code.html)- to learn how to organize your Go workspace
golang.org/doc/e ective_go.html(https://golang.org/doc/e ective_go.html)- be more e ective at writing Go
golang.org/ref/spec(https://golang.org/ref/spec)- learn more about the language itself
golang.org/doc/#articles(https://golang.org/doc/#articles)- a lot more reading material
blog.golang.org(https://blog.golang.org)- the Go blog
And you can nd even more material here: github.com/golang/go/wiki(https://github.com/golang/go/wiki)
Websites
There are some awesome websites as well:
blog.gopheracademy.com(https://blog.gopheracademy.com)- great resources for Gophers in general
gotime.fm(http://gotime.fm)- awesome weekly podcast of Go awesomeness
gobyexample.com(https://gobyexample.com)- examples of how to do things in Go
go-database-sql.org(http://go-database-sql.org)- how to use SQL databases in Go
gophervids.appspot.com(http://gophervids.appspot.com)- list of Go related videos from various authors
Blogs, social media & meetups
Peter Bourgon @peterbourgon(https://twitter.com/peterbourgon)- peter.bourgon.org/blog(https://peter.bourgon.org/blog)
Carlisia Campos @carlisia(https://twitter.com/carlisia)
Dave Cheney @davecheney(https://twitter.com/davecheney)- dave.cheney.net(http://dave.cheney.net)
Jaana Burcu Dogan @rakyll(https://twitter.com/rakyll)- golang.rakyll.org(http://golang.rakyll.org)
Jessie Frazelle @jessfraz(https://twitter.com/jessfraz)- blog.jessfraz.com(https://blog.jessfraz.com)
William "Bill" Kennedy @goinggodotnet(https://twitter.com)- www.goinggo.net(https://www.goinggo.net)
Brian Ketelsen @bketelsen(https://twitter.com/bketelsen)- www.brianketelsen.com/blog
(https://www.brianketelsen.com/blog)
List of Go meetups go-meetups.appspot.com(https://go-meetups.appspot.com)
GolangIT www.meetup.com/golangit(https://www.meetup.com/golangit)
Books
The Go Programming Language www.gopl.io(http://www.gopl.io)
Go In Action www.manning.com/books/go-in-action(https://www.manning.com/books/go-in-action)
For more books, see: github.com/golang/go/wiki/Books(https://github.com/golang/go/wiki/Books)
Final thoughts
What is Go?
a general purpose cross-platform programming language
optimized for readability and maintenance (and speed)
it's particularly good for networking, service side long running processes and tools
great in 80% of the times for 100% of those tasks
For me:
it's easy, fun yet very powerful even with all it's quirks
it made me rethink the way I program in other languages
it has a great community and a very bright future ahead
One last thing
One last thing
package main
import "fmt"
func main() {
fmt.Println("Hello CodeMotion!")
} Run
One more one last thing
func powersOf(what float64, wait *sync.WaitGroup, result chan float64) {
for i := float64(0); i <= 100; i++ {
result <- math.Pow(what, i)
}
wait.Done()
}
func main() {
wait := &sync.WaitGroup{}
result := make(chan float64, 10000000)
for i := float64(1); i <= 100; i++ {
wait.Add(1)
go powersOf(i, wait, result)
}
wait.Wait()
var sum float64
for len(result) > 0 {
sum += <-result
}
fmt.Printf("Sum is: %.0fn", sum)
} Run
Credits
Jud White(https://github.com/judwhite)for the supported arch listing from Go: A Practical Start Guide
(http://go-talks.appspot.com/github.com/judwhite/talks-dell/talk.slide)
Questions
Thank you
24 Mar 2017
Florin Pățan
Cloud Services Engineer
YouView TV Ltd.
orinpatan@gmail.com(mailto: orinpatan@gmail.com)
http://github.com/dlsniper(http://github.com/dlsniper)
@dlsniper(http://twitter.com/dlsniper)
Getting started with Go - Florin Patan - Codemotion Rome 2017
1 de 47

Recomendados

[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno por
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki MizunoNexus FrontierTech
708 vistas26 diapositivas
Mphasis Digital - Use Go (gloang) for system programming, distributed systems... por
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Aniruddha Chakrabarti
472 vistas13 diapositivas
Building Command Line Tools with Golang por
Building Command Line Tools with GolangBuilding Command Line Tools with Golang
Building Command Line Tools with GolangTakaaki Mizuno
2.4K vistas22 diapositivas
Why you should care about Go (Golang) por
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)Aaron Schlesinger
1.6K vistas37 diapositivas
Developing Cross Platform Applications with Golang por
Developing Cross Platform Applications with GolangDeveloping Cross Platform Applications with Golang
Developing Cross Platform Applications with GolangErhan Yakut
290 vistas19 diapositivas
[INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn por
[INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn [INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn
[INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn Nexus FrontierTech
189 vistas23 diapositivas

Más contenido relacionado

La actualidad más candente

Golang - Overview of Go (golang) Language por
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
7.1K vistas85 diapositivas
Introduction to GoLang por
Introduction to GoLangIntroduction to GoLang
Introduction to GoLangNVISIA
351 vistas48 diapositivas
GoLang Introduction por
GoLang IntroductionGoLang Introduction
GoLang IntroductionSpandana Govindgari
220 vistas25 diapositivas
Go Lang por
Go LangGo Lang
Go LangVenkata Naga Ravi
937 vistas18 diapositivas
Developing for LinkedIn's Application Platform por
Developing for LinkedIn's Application PlatformDeveloping for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformTaylor Singletary
7.5K vistas48 diapositivas
Go lang por
Go langGo lang
Go langSuelen Carvalho
8.3K vistas35 diapositivas

La actualidad más candente(20)

Introduction to GoLang por NVISIA
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
NVISIA351 vistas
Developing for LinkedIn's Application Platform por Taylor Singletary
Developing for LinkedIn's Application PlatformDeveloping for LinkedIn's Application Platform
Developing for LinkedIn's Application Platform
Taylor Singletary7.5K vistas
Golang from Scala developer’s perspective por Sveta Bozhko
Golang from Scala developer’s perspectiveGolang from Scala developer’s perspective
Golang from Scala developer’s perspective
Sveta Bozhko2.6K vistas
really really really awesome php application with bdd behat and iterfaces por Giulio De Donato
really really really awesome php application with bdd behat and iterfacesreally really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfaces
Giulio De Donato2K vistas
Let the contribution begin por SeongJae Park
Let the contribution beginLet the contribution begin
Let the contribution begin
SeongJae Park1.1K vistas
Let the contribution begin (EST futures) por SeongJae Park
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)
SeongJae Park411 vistas
Lets Go - An introduction to Google's Go Programming Language por Ganesh Samarthyam
Lets Go - An introduction to Google's Go Programming Language Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language
Ganesh Samarthyam298 vistas
Where's the source, Luke? : How to find and debug the code behind Plone por Vincenzo Barone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
Vincenzo Barone1.3K vistas
Lennart Regebro What Zope Did Wrong (And What To Do Instead) por Vincenzo Barone
Lennart Regebro   What Zope Did Wrong (And What To Do Instead)Lennart Regebro   What Zope Did Wrong (And What To Do Instead)
Lennart Regebro What Zope Did Wrong (And What To Do Instead)
Vincenzo Barone709 vistas
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples) por Evan Lin
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
Evan Lin3.7K vistas
PHP for Android: prototyping Android apps in php por Cesare D'Amico
PHP for Android: prototyping Android apps in phpPHP for Android: prototyping Android apps in php
PHP for Android: prototyping Android apps in php
Cesare D'Amico6.3K vistas

Similar a Getting started with Go - Florin Patan - Codemotion Rome 2017

Getting started with go - Florin Patan - Codemotion Milan 2016 por
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Codemotion
871 vistas44 diapositivas
Resources For Floss Projects por
Resources For Floss ProjectsResources For Floss Projects
Resources For Floss ProjectsJon Spriggs
613 vistas29 diapositivas
Beginning development in go por
Beginning development in goBeginning development in go
Beginning development in goEqualeyes Solutions Ltd.
45 vistas5 diapositivas
Introduction to Go por
Introduction to GoIntroduction to Go
Introduction to GoSimon Hewitt
77 vistas22 diapositivas
Open Source for Women / Girl Geeks por
Open Source for Women / Girl GeeksOpen Source for Women / Girl Geeks
Open Source for Women / Girl GeeksSara Rosso
4.7K vistas63 diapositivas
Introduction to go lang por
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
552 vistas40 diapositivas

Similar a Getting started with Go - Florin Patan - Codemotion Rome 2017(20)

Getting started with go - Florin Patan - Codemotion Milan 2016 por Codemotion
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
Codemotion871 vistas
Resources For Floss Projects por Jon Spriggs
Resources For Floss ProjectsResources For Floss Projects
Resources For Floss Projects
Jon Spriggs613 vistas
Open Source for Women / Girl Geeks por Sara Rosso
Open Source for Women / Girl GeeksOpen Source for Women / Girl Geeks
Open Source for Women / Girl Geeks
Sara Rosso4.7K vistas
Introduction to go lang por Amal Mohan N
Introduction to go langIntroduction to go lang
Introduction to go lang
Amal Mohan N552 vistas
Scaling applications with go por Vimlesh Sharma
Scaling applications with goScaling applications with go
Scaling applications with go
Vimlesh Sharma2.5K vistas
GSoC: How to get prepared and write a good proposal (or how to start contribu... por João Paulo Rechi Vita
GSoC: How to get prepared and write a good proposal (or how to start contribu...GSoC: How to get prepared and write a good proposal (or how to start contribu...
GSoC: How to get prepared and write a good proposal (or how to start contribu...
R1-intro-to-go.pptx por Ababb2
R1-intro-to-go.pptxR1-intro-to-go.pptx
R1-intro-to-go.pptx
Ababb25 vistas
Hacktoberfest 2020 - Open source for beginners por DeepikaRana30
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginners
DeepikaRana30333 vistas
Android is going to Go! Android and Golang por Almog Baku
Android is going to Go! Android and GolangAndroid is going to Go! Android and Golang
Android is going to Go! Android and Golang
Almog Baku5.3K vistas
Android is going to Go! - Android and goland - Almog Baku por DroidConTLV
Android is going to Go! - Android and goland - Almog BakuAndroid is going to Go! - Android and goland - Almog Baku
Android is going to Go! - Android and goland - Almog Baku
DroidConTLV202 vistas
Developing FirefoxOS por Fred Lin
Developing FirefoxOSDeveloping FirefoxOS
Developing FirefoxOS
Fred Lin2.9K vistas
Bootstrapping Tools and Practices por Cliff McKinney
Bootstrapping Tools and PracticesBootstrapping Tools and Practices
Bootstrapping Tools and Practices
Cliff McKinney1.9K vistas
Open source and then some: An Introduction por Akash Tandon
Open source and then some: An IntroductionOpen source and then some: An Introduction
Open source and then some: An Introduction
Akash Tandon855 vistas
Advantages of golang development services &amp; 10 most used go frameworks por Katy Slemon
Advantages of golang development services &amp; 10 most used go frameworksAdvantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworks
Katy Slemon111 vistas
Let's Go: Introduction to Google's Go Programming Language por Ganesh Samarthyam
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
Ganesh Samarthyam394 vistas
Write microservice in golang por Bo-Yi Wu
Write microservice in golangWrite microservice in golang
Write microservice in golang
Bo-Yi Wu14.8K vistas
welcome to gopherlabs - why go (golang)? por sangam biradar
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?
sangam biradar410 vistas

Más de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze... por
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
2K vistas20 diapositivas
Pompili - From hero to_zero: The FatalNoise neverending story por
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
1.7K vistas44 diapositivas
Pastore - Commodore 65 - La storia por
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
1.1K vistas23 diapositivas
Pennisi - Essere Richard Altwasser por
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
687 vistas18 diapositivas
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst... por
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
688 vistas37 diapositivas
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019 por
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
734 vistas89 diapositivas

Más de Codemotion(20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze... por Codemotion
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Codemotion2K vistas
Pompili - From hero to_zero: The FatalNoise neverending story por Codemotion
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
Codemotion1.7K vistas
Pastore - Commodore 65 - La storia por Codemotion
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
Codemotion1.1K vistas
Pennisi - Essere Richard Altwasser por Codemotion
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
Codemotion687 vistas
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst... por Codemotion
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Codemotion688 vistas
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019 por Codemotion
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Codemotion734 vistas
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019 por Codemotion
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Codemotion690 vistas
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - por Codemotion
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Codemotion450 vistas
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A... por Codemotion
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Codemotion894 vistas
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul... por Codemotion
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Codemotion414 vistas
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ... por Codemotion
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Codemotion267 vistas
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd... por Codemotion
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Codemotion600 vistas
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019 por Codemotion
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Codemotion513 vistas
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019 por Codemotion
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Codemotion235 vistas
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019 por Codemotion
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Codemotion242 vistas
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A... por Codemotion
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Codemotion299 vistas
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen... por Codemotion
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Codemotion204 vistas
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019 por Codemotion
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Codemotion264 vistas
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019 por Codemotion
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Codemotion264 vistas
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019 por Codemotion
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Codemotion408 vistas

Último

Igniting Next Level Productivity with AI-Infused Data Integration Workflows por
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
225 vistas86 diapositivas
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze por
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeDigital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeNUS-ISS
19 vistas47 diapositivas
AI: mind, matter, meaning, metaphors, being, becoming, life values por
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life valuesTwain Liu 刘秋艳
35 vistas16 diapositivas
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ... por
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation
25 vistas9 diapositivas
Black and White Modern Science Presentation.pptx por
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptxmaryamkhalid2916
14 vistas21 diapositivas
handbook for web 3 adoption.pdf por
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdfLiveplex
19 vistas16 diapositivas

Último(20)

Igniting Next Level Productivity with AI-Infused Data Integration Workflows por Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software225 vistas
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze por NUS-ISS
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeDigital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
NUS-ISS19 vistas
AI: mind, matter, meaning, metaphors, being, becoming, life values por Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life values
Black and White Modern Science Presentation.pptx por maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 vistas
handbook for web 3 adoption.pdf por Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex19 vistas
.conf Go 2023 - Data analysis as a routine por Splunk
.conf Go 2023 - Data analysis as a routine.conf Go 2023 - Data analysis as a routine
.conf Go 2023 - Data analysis as a routine
Splunk93 vistas
Future of Learning - Khoong Chan Meng por NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS33 vistas
The Importance of Cybersecurity for Digital Transformation por NUS-ISS
The Importance of Cybersecurity for Digital TransformationThe Importance of Cybersecurity for Digital Transformation
The Importance of Cybersecurity for Digital Transformation
NUS-ISS27 vistas
Transcript: The Details of Description Techniques tips and tangents on altern... por BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada130 vistas
Java Platform Approach 1.0 - Picnic Meetup por Rick Ossendrijver
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver25 vistas
Understanding GenAI/LLM and What is Google Offering - Felix Goh por NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS41 vistas
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors por sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab15 vistas
Web Dev - 1 PPT.pdf por gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet55 vistas
RADIUS-Omnichannel Interaction System por RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS15 vistas
Five Things You SHOULD Know About Postman por Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman27 vistas

Getting started with Go - Florin Patan - Codemotion Rome 2017

  • 1. Getting started with Go 24 Mar 2017 Florin Pățan Cloud Services Engineer YouView TV Ltd.
  • 2. About me gopher for ~4 years the Communtiy version of Go plugin for IntelliJ maintainer GoBridge Core Member - Workshop Logistics Open-Source contributor
  • 4. What is Go? "Go is an open source programming language that makes it easy to build simple, reliable, and e cient software." golang.org(https://golang.org)
  • 6. What is Go for me? Go makes programming fun (again) allows me to focus on the algorithm rather than how to implement the solution mature community, growing at a good rate
  • 7. Why should you learn Go?
  • 9. Join the Go side Copyright "someone from the Internet"
  • 10. If you are new to programming Go is much simpler than many other languages the syntax is not in your way introduces the advanced concepts of concurrency w/o the usual overhead exposure to how parts of the computer work Disclaimer Depending on your goals, Go might not be the very best language to learn as a beginner. Languages such as Python or even Javascript might be more suitable.
  • 11. If you know dynamic programming languages type safety at compile time syntax that sometimes feels like a dynamic language simple and fast build system much faster than the others (almost always) single binary to deploy = love from your ops team
  • 12. If you know C/C++/Java fast compiler even with large projects simpli ed syntax that allows you to focus on solving the problem compiles to native code, cross-compiles to other OS-es (when possible) can interact with C code via CGO can be compiled to a binary with no external dependencies
  • 13. If you are as an Ops person... The main reason would be: better tools. replace your complex bash scripts with testable Go apps write tools that help you create / maintain infrastructure write tools that help you simulate protocols interactions: github.com/adrianco/spigo (https://github.com/adrianco/spigo) all the new tools such as Docker, Kubernetes, CloudFoundry etc are written in Go
  • 15. Go features easy to read / write statically typed garbage collected fast to compile concurrency is baked into the language functions are rst class citizens composable types interfaces satis ed implicitly return multiple values produces a single executable cross platform, natively compiled
  • 16. Go supported platforms android/386 darwin/386 android/amd64 darwin/amd64 android/arm darwin/arm android/arm64 darwin/arm64 windows/386 nacl/386 windows/amd64 nacl/amd64p32 linux/386 nacl/arm linux/amd64 freebsd/386 linux/arm freebsd/amd64 linux/arm64 freebsd/arm linux/mips dragonfly/amd64 linux/mips64 netbsd/386 linux/mips64le netbsd/amd64 linux/mipsle netbsd/arm linux/ppc64 openbsd/386 linux/ppc64le openbsd/amd64 linux/s390x openbsd/arm plan9/386 solaris/amd64 plan9/amd64 plan9/arm Oh and Javascript via GopherJS
  • 19. Go tooling goimports (or gofmt) golint and govet go-staticcheck (or gometalinter) guru Go Playground(https://play.golang.org) etc. Write your own tools using go/ast package
  • 20. Go editors Gogland (or any other Jetbrains IDE) VSCode emacs Atom vim LiteIDE Sublime 3 many others
  • 22. Users of Go out there Google CloudFlare Canonical (Ubuntu) Microsoft, Facebook, AWS, Heroku rkt, Docker, Kubernetes Almost all HashiCorp tools List of Go users github.com/golang/go/wiki/GoUsers(https://github.com/golang/go/wiki/GoUsers) Some success stories github.com/golang/go/wiki/SuccessStories(https://github.com/golang/go/wiki/SuccessStories) Probably your are using Go w/o knowing
  • 23. The maturity of the eco-system A lot of libraries are very stable and battle tested Go favors composition thus gophers are focusing on making interchangeable libraries
  • 24. Concrete examples of mature libraries To create a web app all you need is the standard library. However, if you want to add some convenience: gorilla/mux or httprouter (to handle the routing) sqlx (for SQL database interaction) go-mysql-driver / libpq logrus or gokit/kit/log gokit to enable overall better app design
  • 26. Go Code of Conduct Go has a Code of Conduct which enables gophers to be safe and welcomed in any o cial Go environment as well as places which choose to adhere to it. golang.org/conduct(https://golang.org/conduct)
  • 27. Go Mailing Lists We have a mailing list for general questions or Go related things groups.google.com/forum/#!forum/golang-nuts(https://groups.google.com/forum/#!forum/golang-nuts) We also have a mailing list for development of Go itself groups.google.com/forum/#!forum/golang-dev(https://groups.google.com/forum/#!forum/golang-dev)
  • 29. Slack gophers.slack.com(https://gophers.slack.com) over 14500+ Gophers (growing at a rate of ~200 gophers / week) one of the largest known open Slacks for programmers gophers from everywhere in the World usually most questions are answered in real-time by always friendly gophers governed by an enhanced CoC, GoBridge speci c Invites: https://invites.slack.golangbridge.org(https://invites.slack.golangbridge.org)
  • 32. GoBridge Core mission Our core mission is to enable minorities in tech to use Go as a tool to learn and teach programming and, ultimately, to empower underrepresented groups in tech to help increase diversity in the Go community.
  • 33. GoBridge How do we do this? create safe spaces where everyone is welcomed organize workshops remote meetups write training material teach the teachers / organizers try and connect organizers with sponsors
  • 35. O cial The language tour: tour.golang.org(https://tour.golang.org) O cial: golang.org/doc/code.html(https://golang.org/doc/code.html)- to learn how to organize your Go workspace golang.org/doc/e ective_go.html(https://golang.org/doc/e ective_go.html)- be more e ective at writing Go golang.org/ref/spec(https://golang.org/ref/spec)- learn more about the language itself golang.org/doc/#articles(https://golang.org/doc/#articles)- a lot more reading material blog.golang.org(https://blog.golang.org)- the Go blog And you can nd even more material here: github.com/golang/go/wiki(https://github.com/golang/go/wiki)
  • 36. Websites There are some awesome websites as well: blog.gopheracademy.com(https://blog.gopheracademy.com)- great resources for Gophers in general gotime.fm(http://gotime.fm)- awesome weekly podcast of Go awesomeness gobyexample.com(https://gobyexample.com)- examples of how to do things in Go go-database-sql.org(http://go-database-sql.org)- how to use SQL databases in Go gophervids.appspot.com(http://gophervids.appspot.com)- list of Go related videos from various authors
  • 37. Blogs, social media & meetups Peter Bourgon @peterbourgon(https://twitter.com/peterbourgon)- peter.bourgon.org/blog(https://peter.bourgon.org/blog) Carlisia Campos @carlisia(https://twitter.com/carlisia) Dave Cheney @davecheney(https://twitter.com/davecheney)- dave.cheney.net(http://dave.cheney.net) Jaana Burcu Dogan @rakyll(https://twitter.com/rakyll)- golang.rakyll.org(http://golang.rakyll.org) Jessie Frazelle @jessfraz(https://twitter.com/jessfraz)- blog.jessfraz.com(https://blog.jessfraz.com) William "Bill" Kennedy @goinggodotnet(https://twitter.com)- www.goinggo.net(https://www.goinggo.net) Brian Ketelsen @bketelsen(https://twitter.com/bketelsen)- www.brianketelsen.com/blog (https://www.brianketelsen.com/blog) List of Go meetups go-meetups.appspot.com(https://go-meetups.appspot.com) GolangIT www.meetup.com/golangit(https://www.meetup.com/golangit)
  • 38. Books The Go Programming Language www.gopl.io(http://www.gopl.io) Go In Action www.manning.com/books/go-in-action(https://www.manning.com/books/go-in-action) For more books, see: github.com/golang/go/wiki/Books(https://github.com/golang/go/wiki/Books)
  • 40. What is Go? a general purpose cross-platform programming language optimized for readability and maintenance (and speed) it's particularly good for networking, service side long running processes and tools great in 80% of the times for 100% of those tasks For me: it's easy, fun yet very powerful even with all it's quirks it made me rethink the way I program in other languages it has a great community and a very bright future ahead
  • 42. One last thing package main import "fmt" func main() { fmt.Println("Hello CodeMotion!") } Run
  • 43. One more one last thing func powersOf(what float64, wait *sync.WaitGroup, result chan float64) { for i := float64(0); i <= 100; i++ { result <- math.Pow(what, i) } wait.Done() } func main() { wait := &sync.WaitGroup{} result := make(chan float64, 10000000) for i := float64(1); i <= 100; i++ { wait.Add(1) go powersOf(i, wait, result) } wait.Wait() var sum float64 for len(result) > 0 { sum += <-result } fmt.Printf("Sum is: %.0fn", sum) } Run
  • 44. Credits Jud White(https://github.com/judwhite)for the supported arch listing from Go: A Practical Start Guide (http://go-talks.appspot.com/github.com/judwhite/talks-dell/talk.slide)
  • 46. Thank you 24 Mar 2017 Florin Pățan Cloud Services Engineer YouView TV Ltd. orinpatan@gmail.com(mailto: orinpatan@gmail.com) http://github.com/dlsniper(http://github.com/dlsniper) @dlsniper(http://twitter.com/dlsniper)