SlideShare a Scribd company logo
1 of 17
Ready, Set, GO!
Chad McCallum
ASP.NET MVP
iQmetrix Software
www.rtigger.com - @ChadEmm
An Introduction to the Go Programming
Language
What is Go?
 A programming language!
 Initially created as a Google 20% project
 Released as an open source project on November
10th, 2009
 Go 1 (version 1) released on March 28th, 2012
The Software Development Landscape
 Born out of frustration with current languages
 There was a choice between efficient compilation, efficient execution, or
ease of programming – most languages didn’t offer all three
 Computers are faster, but software development isn’t
 Dependency management is an unnecessarily large, complex part of
software development
 The complexity and awkwardness of type systems are losing out to
languages like Python and JavaScript
 Old languages haven’t caught up to modern affordances, like garbage
collection and parallel computation
 Multicore programming is scary and worrysome
Enter Go
 Possible to compile a large program in a few seconds on a
single computer
 Provides a dependency model that avoids the overhead of
traditional systems
 The type system has no hierarchy, so no time is lost
defining relationships
 Fully garbage collected and provides primitives for
concurrent execution and communication
 By design, offers an approach to system software on
multicore machines
A Review of Go’s Features
 Simple language specification
 Compiles statically linked binaries without external
dependencies
 Remote package management
 Concurrency primitives
Simple Language Specification
 “Language specification simple enough to keep in a
programmer’s head”
 No type inheritance (uses duck typing)
 No method or operator overloading
 No pointer math
 No assertions
 No generic programming
Statically Linked Binaries
 Compiles to native machine code (x86 and ARM)
 All referenced libraries are compiled into the same binary
– no need to install libraries or framework on target
machine
 Because there’s no intermediate language, interpreter, or
framework, applications start and run with minimal
overhead
Remote Package Management
 Can import dependencies directly from remote
repositories, like GitHub, BitBucket, Google Code
 go get github.com/ChadMcCallum/gotest
 Uses the current version of the code in “master” (git) or “default”
(mercurial)
 Downloaded to local GOPATH folder
Concurrency Primitives
 goroutine – executes function on a lightweight process
 Similar to task pools in .NET, functions are executed on any
available thread allocated by the application
 Ensures routines don’t block each other
 Allows developers to write synchronous code while being fully non-
blocking
 Channels provide a way to read and write between
routines without managing synchronization
 A routine that writes to a channel will wait until its message is
received
 A routine that reads from a channel will wait until it receives a
message
Why Choose Go?
 Why choose any language?
 Popularity – is there a decent amount of community support?
 Language-domain match – is the strengths of the language geared
towards your problem domain?
 Libraries – what packages already exist that you can reuse?
 Efficiency – does the compiler and execution match up with your
project’s requirements?
 Tools – do the appropriate coding, debugging, tracing, and testing
tools exist?
Popularity
 Currently 36th on the TIOBE Index (March 2014)
 Used in a number of large projects at Google
 Youtube.com, dl.google.com, Google App Engine
 Used in a number of production systems
 Bit.ly, Torbit, pool.ntp.org, Canonical, CloudFlare, Conformal, Nov
artis, BBC, SoundCloud, Moovweb, Heroku, Nokia
 4472 questions in StackOverflow
 16681 topics on the golang-nuts group
Language-Domain Match
 Targeted at systems programming
 Strengths in concurrency and deployment model
 Mostly used in server and message-processing scenarios
 Can, and does, support other scenarios
 Web apps, games, graphical tools, education
Libraries
 25,522 repositories on GitHub
 Application containers,
 web frameworks,
 websockets,
 continuous integration,
 shared key-value stores,
 shared cache,
 distributed messaging,
 maching imaging,
 SQL engines,
 service orchestration,
 client code generation,
 analytics,
 autocomplete,
 load testing,
 http traffic capture,
 static site generation,
 geolocation,
 PaaS
Efficiency
 Natively compiled binaries
 Not interpreted
 No external dependencies
 No Intermediate Language, Common Language Runtime, or
Virtual Machine
 Calculating 8 primes in parallel
.NET Tasks – 12.6 seconds Goroutines – 5.99 seconds
Tools
 go build – compiles packages and dependencies into
executable
 go fix – rewrites programs that use old APIs to use the
newest version
 go fmt – changes source code to match go standard
 go get – download and install packages and dependencies
 go install – compile and install packages and dependencies
 go run – compile and run program
 go test – run tests in packages
IDEs
 LiteIDE – cross-platform IDE with support for Go and
Markdown
 Go plugin for Eclipse (Goclipse) – plugin for Eclipse
 Zeus – Windows-only IDE with Go support
 All three offer debugging, syntax highlighting, and code
completion
Ready, Set, GO!
 golang.org
 tour.golang.org
 play.golang.org
 godoc.org
 gobyexample.com
 goinggo.net
Chad McCallum
@ChadEmm
www.rtigger.com

More Related Content

What's hot

Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
smithmilner
 

What's hot (20)

Unit Testing TypeScript
Unit Testing TypeScriptUnit Testing TypeScript
Unit Testing TypeScript
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golang
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
 
Besut Kode Challenge 1
Besut Kode Challenge 1Besut Kode Challenge 1
Besut Kode Challenge 1
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
 
Typescript kata The TDD style 2 edition
Typescript kata The TDD style 2 editionTypescript kata The TDD style 2 edition
Typescript kata The TDD style 2 edition
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Besut Kode - Workshop 1
Besut Kode - Workshop 1Besut Kode - Workshop 1
Besut Kode - Workshop 1
 
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)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
 
Let's Contribute
Let's ContributeLet's Contribute
Let's Contribute
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
 
Go Lang
Go LangGo Lang
Go Lang
 
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...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
 
Getting Started With Version Control
Getting Started With Version ControlGetting Started With Version Control
Getting Started With Version Control
 
An Introduction to Go
An Introduction to GoAn Introduction to Go
An Introduction to Go
 

Similar to Ready, set, go! An introduction to the Go programming language

Go Within Cloud Foundry
Go Within Cloud FoundryGo Within Cloud Foundry
Go Within Cloud Foundry
Platform CF
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
SIVAJISADHANA
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
SIVAJISADHANA
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
SIVAJISADHANA
 
Scripting languages presentation_michel_patrickfrancis
Scripting languages presentation_michel_patrickfrancisScripting languages presentation_michel_patrickfrancis
Scripting languages presentation_michel_patrickfrancis
oloofrank
 
An Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentAn Introduction To Linux Development Environment
An Introduction To Linux Development Environment
S. M. Hossein Hamidi
 
Building Multi-Technology Applications
Building Multi-Technology ApplicationsBuilding Multi-Technology Applications
Building Multi-Technology Applications
Przemysław Ładyński
 

Similar to Ready, set, go! An introduction to the Go programming language (20)

Go Within Cloud Foundry
Go Within Cloud FoundryGo Within Cloud Foundry
Go Within Cloud Foundry
 
Enterprise 2020
Enterprise 2020Enterprise 2020
Enterprise 2020
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Smart modeling of smart software
Smart modeling of smart softwareSmart modeling of smart software
Smart modeling of smart software
 
Synapse india fundamentals of dotnet development
Synapse india fundamentals of dotnet  developmentSynapse india fundamentals of dotnet  development
Synapse india fundamentals of dotnet development
 
IT TRENDS AND PERSPECTIVES 2016
IT TRENDS AND PERSPECTIVES 2016IT TRENDS AND PERSPECTIVES 2016
IT TRENDS AND PERSPECTIVES 2016
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with go
 
Golang : A Hype or the Future?
Golang : A Hype or the Future?Golang : A Hype or the Future?
Golang : A Hype or the Future?
 
Scripting languages presentation_michel_patrickfrancis
Scripting languages presentation_michel_patrickfrancisScripting languages presentation_michel_patrickfrancis
Scripting languages presentation_michel_patrickfrancis
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers way
 
An Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentAn Introduction To Linux Development Environment
An Introduction To Linux Development Environment
 
2018 20 best id es for python programming
2018 20 best id es for python programming2018 20 best id es for python programming
2018 20 best id es for python programming
 
20 best ide's for python programming in 2018
 20 best ide's for python programming in 2018 20 best ide's for python programming in 2018
20 best ide's for python programming in 2018
 
Building Multi-Technology Applications
Building Multi-Technology ApplicationsBuilding Multi-Technology Applications
Building Multi-Technology Applications
 
The compilation process
The compilation processThe compilation process
The compilation process
 

More from RTigger

Async in .NET
Async in .NETAsync in .NET
Async in .NET
RTigger
 

More from RTigger (20)

You Can't Buy Agile
You Can't Buy AgileYou Can't Buy Agile
You Can't Buy Agile
 
Caching up is hard to do: Improving your Web Services' Performance
Caching up is hard to do: Improving your Web Services' PerformanceCaching up is hard to do: Improving your Web Services' Performance
Caching up is hard to do: Improving your Web Services' Performance
 
Open source web services
Open source web servicesOpen source web services
Open source web services
 
How to hire a hacker
How to hire a hackerHow to hire a hacker
How to hire a hacker
 
Windows 8 programming with html and java script
Windows 8 programming with html and java scriptWindows 8 programming with html and java script
Windows 8 programming with html and java script
 
Open regina
Open reginaOpen regina
Open regina
 
Single page apps and the web of tomorrow
Single page apps and the web of tomorrowSingle page apps and the web of tomorrow
Single page apps and the web of tomorrow
 
Async in .NET
Async in .NETAsync in .NET
Async in .NET
 
Give your web apps some backbone
Give your web apps some backboneGive your web apps some backbone
Give your web apps some backbone
 
Hackers, hackathons, and you
Hackers, hackathons, and youHackers, hackathons, and you
Hackers, hackathons, and you
 
AJAX, JSON, and Client-Side Templates
AJAX, JSON, and Client-Side TemplatesAJAX, JSON, and Client-Side Templates
AJAX, JSON, and Client-Side Templates
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel Processing
 
Node.js
Node.jsNode.js
Node.js
 
Reactive Extensions
Reactive ExtensionsReactive Extensions
Reactive Extensions
 
Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQL
 
Git’in Jiggy With Git
Git’in Jiggy With GitGit’in Jiggy With Git
Git’in Jiggy With Git
 
What The F#
What The F#What The F#
What The F#
 
Web Services
Web ServicesWeb Services
Web Services
 
Total Engagement
Total EngagementTotal Engagement
Total Engagement
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Ready, set, go! An introduction to the Go programming language

  • 1. Ready, Set, GO! Chad McCallum ASP.NET MVP iQmetrix Software www.rtigger.com - @ChadEmm An Introduction to the Go Programming Language
  • 2. What is Go?  A programming language!  Initially created as a Google 20% project  Released as an open source project on November 10th, 2009  Go 1 (version 1) released on March 28th, 2012
  • 3. The Software Development Landscape  Born out of frustration with current languages  There was a choice between efficient compilation, efficient execution, or ease of programming – most languages didn’t offer all three  Computers are faster, but software development isn’t  Dependency management is an unnecessarily large, complex part of software development  The complexity and awkwardness of type systems are losing out to languages like Python and JavaScript  Old languages haven’t caught up to modern affordances, like garbage collection and parallel computation  Multicore programming is scary and worrysome
  • 4. Enter Go  Possible to compile a large program in a few seconds on a single computer  Provides a dependency model that avoids the overhead of traditional systems  The type system has no hierarchy, so no time is lost defining relationships  Fully garbage collected and provides primitives for concurrent execution and communication  By design, offers an approach to system software on multicore machines
  • 5. A Review of Go’s Features  Simple language specification  Compiles statically linked binaries without external dependencies  Remote package management  Concurrency primitives
  • 6. Simple Language Specification  “Language specification simple enough to keep in a programmer’s head”  No type inheritance (uses duck typing)  No method or operator overloading  No pointer math  No assertions  No generic programming
  • 7. Statically Linked Binaries  Compiles to native machine code (x86 and ARM)  All referenced libraries are compiled into the same binary – no need to install libraries or framework on target machine  Because there’s no intermediate language, interpreter, or framework, applications start and run with minimal overhead
  • 8. Remote Package Management  Can import dependencies directly from remote repositories, like GitHub, BitBucket, Google Code  go get github.com/ChadMcCallum/gotest  Uses the current version of the code in “master” (git) or “default” (mercurial)  Downloaded to local GOPATH folder
  • 9. Concurrency Primitives  goroutine – executes function on a lightweight process  Similar to task pools in .NET, functions are executed on any available thread allocated by the application  Ensures routines don’t block each other  Allows developers to write synchronous code while being fully non- blocking  Channels provide a way to read and write between routines without managing synchronization  A routine that writes to a channel will wait until its message is received  A routine that reads from a channel will wait until it receives a message
  • 10. Why Choose Go?  Why choose any language?  Popularity – is there a decent amount of community support?  Language-domain match – is the strengths of the language geared towards your problem domain?  Libraries – what packages already exist that you can reuse?  Efficiency – does the compiler and execution match up with your project’s requirements?  Tools – do the appropriate coding, debugging, tracing, and testing tools exist?
  • 11. Popularity  Currently 36th on the TIOBE Index (March 2014)  Used in a number of large projects at Google  Youtube.com, dl.google.com, Google App Engine  Used in a number of production systems  Bit.ly, Torbit, pool.ntp.org, Canonical, CloudFlare, Conformal, Nov artis, BBC, SoundCloud, Moovweb, Heroku, Nokia  4472 questions in StackOverflow  16681 topics on the golang-nuts group
  • 12. Language-Domain Match  Targeted at systems programming  Strengths in concurrency and deployment model  Mostly used in server and message-processing scenarios  Can, and does, support other scenarios  Web apps, games, graphical tools, education
  • 13. Libraries  25,522 repositories on GitHub  Application containers,  web frameworks,  websockets,  continuous integration,  shared key-value stores,  shared cache,  distributed messaging,  maching imaging,  SQL engines,  service orchestration,  client code generation,  analytics,  autocomplete,  load testing,  http traffic capture,  static site generation,  geolocation,  PaaS
  • 14. Efficiency  Natively compiled binaries  Not interpreted  No external dependencies  No Intermediate Language, Common Language Runtime, or Virtual Machine  Calculating 8 primes in parallel .NET Tasks – 12.6 seconds Goroutines – 5.99 seconds
  • 15. Tools  go build – compiles packages and dependencies into executable  go fix – rewrites programs that use old APIs to use the newest version  go fmt – changes source code to match go standard  go get – download and install packages and dependencies  go install – compile and install packages and dependencies  go run – compile and run program  go test – run tests in packages
  • 16. IDEs  LiteIDE – cross-platform IDE with support for Go and Markdown  Go plugin for Eclipse (Goclipse) – plugin for Eclipse  Zeus – Windows-only IDE with Go support  All three offer debugging, syntax highlighting, and code completion
  • 17. Ready, Set, GO!  golang.org  tour.golang.org  play.golang.org  godoc.org  gobyexample.com  goinggo.net Chad McCallum @ChadEmm www.rtigger.com

Editor's Notes

  1. Do a demo compile of a go app hereGo build car.go
  2. Download a package and show compiled resultGo get github.com/mitchellh/multistepBrowse to d:\go\pkg\...
  3. Show code for channels.go, execute
  4. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
  5. https://github.com/search?o=desc&q=language%3Ago&s=stars&type=Repositories
  6. Show source code for .net and go. Execute, show result