SlideShare une entreprise Scribd logo
1  sur  38
James Abley
Technical Architect
Government Digital Service
@jabley
GDSJames Abley
Go – I made all the
mistakes
GDSJames Abley
What it is, important
concepts, what’s
good and what’s not
GDSJames Abley
What is Go?
GDSJames Abley
Open source
programming language
that makes it easy to
build simple,
reliable, and efficient
software
GDSJames Abley
Statically typed, with
fast compile times
GDSJames Abley
Statically linked,
native binaries
GDSJames Abley
What’s important?
GDSJames Abley
Communicating
Sequential
Processes
GDSJames Abley
Input
Output
Concurrency
GDSJames Abley
GDSJames Abley
What’s good?
GDSJames Abley
Religious formatting
wars
GDSJames Abley
The standard library
defines AST parsing
and serialisation
GDSJames Abley
Crossing
Refactoring’s
Rubicon
GDSJames Abley
Backward
compatibility
GDSJames Abley
Testing
GDSJames Abley
GDSJames Abley
Code coverage
GDSJames Abley
GDSJames Abley
Benchmarking
GDSJames Abley
GDSJames Abley
Profiling
GDSJames Abley
GDSJames Abley
GDSJames Abley
Garbage collection
GDSJames Abley
GDSJames Abley
Ecosystem
GDSJames Abley
What’s not good?
GDSJames Abley
Dependency
management
GDSJames Abley
Lots of community
options, oh my!
GDSJames Abley
What’s the sweet
spot?
GDSJames Abley
Summary
GDSJames Abley
Communicating
Sequential
Processes
GDSJames Abley
Great tooling
GDSJames Abley
https://gds.blog.gov.uk/jobs
/
GDSJames Abley
• https://blog.golang.org/go-fmt-your-code
http://blog.golang.org/introducing-gofix
http://danluu.com/monorepo/repos
https://github.com/gorilla/context/pull/21
https://www.dreamsongs.com/RiseOfWorseIsBetter.html
https://joearms.github.io/2013/04/05/concurrent-and-
parallel-programming.html
http://blog.osteele.com/posts/2004/11/ides/
http://martinfowler.com/articles/refactoringRubicon.html
http://godoc.org/golang.org/x/tools
https://twitter.com/brianhatfield/status/63416612360533196
8
James Abley
Technical Architect
Government Digital Service
@jabley

Contenu connexe

Tendances

Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)
Peter Kofler
 

Tendances (15)

Scala from the Trenches
Scala from the Trenches Scala from the Trenches
Scala from the Trenches
 
The New Agile
The New AgileThe New Agile
The New Agile
 
Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)
 
TDD for the rest of us...
TDD for the rest of us...TDD for the rest of us...
TDD for the rest of us...
 
Productivity Hacks at OZ
Productivity Hacks at OZProductivity Hacks at OZ
Productivity Hacks at OZ
 
Is Agile Better
Is Agile BetterIs Agile Better
Is Agile Better
 
BDD & Cucumber
BDD & CucumberBDD & Cucumber
BDD & Cucumber
 
Mastering Code Reviews
Mastering Code ReviewsMastering Code Reviews
Mastering Code Reviews
 
Refactoring the Tennis Kata (2013)
Refactoring the Tennis Kata (2013)Refactoring the Tennis Kata (2013)
Refactoring the Tennis Kata (2013)
 
Spaceship TDD Style
Spaceship TDD StyleSpaceship TDD Style
Spaceship TDD Style
 
Testing economics101
Testing economics101Testing economics101
Testing economics101
 
BDD with the Cucumber
BDD with the CucumberBDD with the Cucumber
BDD with the Cucumber
 
DBC Principles
DBC PrinciplesDBC Principles
DBC Principles
 
A differnt Type of Supermarket Delivery
A differnt Type of Supermarket DeliveryA differnt Type of Supermarket Delivery
A differnt Type of Supermarket Delivery
 
Javascript Tests with Jasmine for Front-end Devs
Javascript Tests with Jasmine for Front-end DevsJavascript Tests with Jasmine for Front-end Devs
Javascript Tests with Jasmine for Front-end Devs
 

Similaire à The Lead Developer: Go – I made all the mistakes so you don't have to

Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012
Maxim Zaks
 
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiouslyQA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QAFest
 
Effective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiDEffective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiD
CODEiD PHP Community
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practices
Kevin Peterson
 

Similaire à The Lead Developer: Go – I made all the mistakes so you don't have to (20)

ETL in Clojure
ETL in ClojureETL in Clojure
ETL in Clojure
 
c-i
c-ic-i
c-i
 
From Monkey Coders To Smart Gorillas - Web Summit 2014
From Monkey Coders To Smart Gorillas - Web Summit 2014From Monkey Coders To Smart Gorillas - Web Summit 2014
From Monkey Coders To Smart Gorillas - Web Summit 2014
 
BDD and Test Automation Tech Talk - Atlogys Academy Series
BDD and Test Automation Tech Talk - Atlogys Academy SeriesBDD and Test Automation Tech Talk - Atlogys Academy Series
BDD and Test Automation Tech Talk - Atlogys Academy Series
 
Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & Jasmine
 
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
 
MVP with GWT and GWTP
MVP with GWT and GWTPMVP with GWT and GWTP
MVP with GWT and GWTP
 
BDD & Beyond: The Past, Present, & Future of Test Automation
BDD & Beyond: The Past, Present, & Future of Test AutomationBDD & Beyond: The Past, Present, & Future of Test Automation
BDD & Beyond: The Past, Present, & Future of Test Automation
 
Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012
 
Why Architecture in Web Development matters
Why Architecture in Web Development mattersWhy Architecture in Web Development matters
Why Architecture in Web Development matters
 
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiouslyQA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
 
apidays Helsinki & North 2023 - Docs-as-code at Atlassian, Szymon Ozimek, Atl...
apidays Helsinki & North 2023 - Docs-as-code at Atlassian, Szymon Ozimek, Atl...apidays Helsinki & North 2023 - Docs-as-code at Atlassian, Szymon Ozimek, Atl...
apidays Helsinki & North 2023 - Docs-as-code at Atlassian, Szymon Ozimek, Atl...
 
Effective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiDEffective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiD
 
corporateJavascript
corporateJavascriptcorporateJavascript
corporateJavascript
 
Sigist Presentation 091208 V2.0
Sigist Presentation 091208 V2.0Sigist Presentation 091208 V2.0
Sigist Presentation 091208 V2.0
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practices
 
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
 
Automating Adaptive Maintenance Changes with srcML and LINQ
Automating Adaptive Maintenance Changes with srcML and LINQAutomating Adaptive Maintenance Changes with srcML and LINQ
Automating Adaptive Maintenance Changes with srcML and LINQ
 
Testing Big Data solutions fast and furiously
Testing Big Data solutions fast and furiouslyTesting Big Data solutions fast and furiously
Testing Big Data solutions fast and furiously
 
Software Craftsmanship @ Ntnu
Software Craftsmanship @ NtnuSoftware Craftsmanship @ Ntnu
Software Craftsmanship @ Ntnu
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

The Lead Developer: Go – I made all the mistakes so you don't have to

Notes de l'éditeur

  1. Hello, I’m James. A Technical Architect at GDS is the developer that goes to all the meetings. I work in the civil service, so a lot of you pay my wages. Thank you! If I’d know Ben was doing that, I would have used Emacs.
  2. Originally this was going to be a description of journey and mistakes I had made in my code. Less likely to offend people if I point out my own stupidity. Then I realised I had 10 minutes. Well, architects like to say that constraints are a good thing, so I've hopefully come up with a more useful thing in this way.
  3. The talk has 4 main parts
  4. Comes from the creators at Google sitting around waiting for C++ apps to build.
  5. Target Windows, OSX, Linux, Plan 9, Android, iOS
  6. So what are the core ideas in Go?
  7. CS paper from 1978
  8. Three main ideas Modelling computation as mutually cooperating processes which participate in events
  9. Go give you both. Concurrency via the goroutines in the language, which model a process, and the IO scheduler in the runtime which distributes those goroutines across all of the cores of the CPU. So in CSP, communication and synchronisation are equivalent. You communicate by passing messages, not by sharing memory.
  10. Go doesn’t have that. Why is that so good? That’s the interesting thing.
  11. There is a tool called gofmt which you run on your code. With that defined as part of the language, formatting arguments go away. No more fighting over style guides. But the other things this enables. Call graphs…
  12. Martin Fowler wrote a thing nearly 15 years ago. In it, he proposes that Extract Method is the minimum height requirement for being a decent refactoring tool. To implement extract method, you need an AST. The AST for Go is in the language. So tools can be written in Go to manipulate Go.
  13. Sun and later Oracle have worked really hard to maintain backward compatibility for Java. Guarantee for 1.x. It should just work. Go sidesteps this, by having tooling. gofix gives migrations for code
  14. As a modern language, Go has testing in the stdlib. Other libraries are available.
  15. Tests are fast. That’s a great feedback loop which doesn’t interrupt your flow
  16. You can also get code coverage, so that you get detailed information on what is being tested, and make sensible decisions about making the investment in tests.
  17. Here is an HTML version of the coverage, showing me exactly which lines are and aren’t tested. Although using red and green might not be great from an a11y perspective…
  18. Look at the ns/op Improved that particular bit of code by 20%
  19. What is dominating the runtime of my application? Where is all the memory being used?
  20. Recently released Go 1.5 introduced GC intended for next 10 years of hardware and beyond. Currently you might develop on a quad-core machine, and then deploy to 16-core machines in production. CPUs are only getting wider. Now concurrent, so reduces the time to do collections.
  21. Here is a graph showing garbage collection pauses over time. When your application is paused, doing garbage collection, it’s not doing useful work. This is Not Good. Pauses have gone from 300ms to less than 30ms https://twitter.com/brianhatfield/status/634166123605331968
  22. Heroku has first-class support. Travis has first-class support. AWS has an SDK for it.
  23. So often language conferences will try to fill up the schedule to address the thing they’re most uncomfortable about. So Clojure confs have lots of talks about people running it in production (hi Bruce!)
  24. Most software developers don’t work at Google. Google has all source code in a monolithic repository. This works for them. Go is open source, and exists outside of Google. So the Go curators didn’t enforce Google’s conventions on the world. They’ve waited for people to explore the problem.
  25. There are a bunch of things (that work currently) Community have built their own. Not blocked on Google to innovate.
  26. Not a C++ killer, despite intention. People seem to be migrating from Ruby / Python instead. I think Rust is more likely to supplant new development for C++, see Dan's talk later. Emerging language for cloud infrastructure. Small tools that do one thing well. etcd. Hashicorp. Packer, Consul, Terraform. hub for Github, Heroku Toolbelt. CloudFlare.
  27. CSP is really powerful (and as someone that doesn’t have a CS degree, Comp Sci isn’t scary)
  28. Fantastically great tooling, which is getting better!
  29. We’re hiring!