Authors: Niharika Kargudri, Thara Supasiti, Victor Chan, Kristabel Wong, Roman Gurevitch, Broderick Westrope
From the 8th of November to the 10th of November, a few of us from Mantel Group had the opportunity to attend GopherConAU 2023. GopherCon is known for bringing the Go community together and is held regularly in various locations worldwide.
GopherConAU 2023 is the second event of its kind to be held in Australia (the very first GopherConAU was held in 2019). It was held at the University of Technology Sydney and played host to a bunch of exciting workshops and talks, and provided an incredible opportunity for members of the Go community to form strong networks. The event was sponsored by a few major players in the industry such as Google, Mantel Group, Nine, Elastic, Kablamo, Agolia, and Gophers Lab. Overall the event was very well managed with a spacious conference hall with good AV setup, registration being quick and breezy, and access to good coffee and food throughout the day. The talks were well managed with breaks in between which helped maintain the flow of the event quite well.
GopherConAU held a workshop day on Wednesday, the 8th of November.
Concurrent Programming in Go (Run by Roman Gurevitch, Mantel Group)
During this one-day workshop, Roman introduced the essentials of concurrent versus parallel workloads, focusing on Go’s concurrency model. The morning was dedicated to theoretical understanding, complemented by practical demonstrations. Key aspects like goroutine management, race conditions, error handling, and orderly shutdowns were emphasised. Attendees then engaged with code challenges that tested their ability to identify and resolve concurrency issues. After a fun trivia session, the workshop continued with advanced concurrent design patterns such as fan-out/fan-in, pipelines, and worker pools. Overall, the workshop offered a thorough and practical exploration of concurrency in Go, equipping participants with a deeper understanding and the confidence to apply these concepts in their work.
Bill Kennedy’s Ultimate Go with Kubernetes (Run by Bill Kennedy)
Bill’s workshop focused on macro-level engineering decisions in Golang, covering topics from modules and project structure to Kubernetes and REST API, but without hands-on coding. This session emphasised the transition from programming to engineering, underlining the importance of Go idioms and Domain-Driven Design (DDD) concepts in writing production-level applications.
Introduction to Go (Run by Leah Garrett)
This was a super friendly, hands-on approach to learning the fundamentals of programming in Go. The workshop was carried out in a boot camp style. It covered some concepts such as variables and their data types, string interpolation using the fmt package, arrays and slices. The workshop focused on showcasing how to tackle simple problems in Go before attendees took on self-directed practice, which often contained slightly more complex challenges. Overall, this was a good workshop for people with little to no Go experience who wanted to learn more.
Over the two conference days, there were a ton of great talks. Some of the highlights for us are listed below.
Go Testing By Example (Russ Cox, Google)
Conference Day 1 started with Russ, one of the co-creators of Go, who gave a talk on how testing is important and needs to be implemented to write quality code. Using binary search as a simple example, Russ walked through how tests managed to uncover bugs in the code. He also focused on how to efficiently write tests that are easily modifiable and reusable. During the talk, he also gave some examples of tests written for the go.dev website. It was fun to hear about how the Go website leveraged continuous deployment with reliance on its testing suite.
Some of the key takeaways were:
- Have test coverage for everything
- Code quality is limited by test quality
- If you didn’t add a test, you didn’t fix the bug
- Make it easy to add more test cases and transferable
- A good starting point is table testing which is provided by the standard library (However it comes with a lot of Go-specific syntax )
- One simple way to improve on this is to use test inputs from a file (The main advantage of this approach is that your tests can now be easily transferred across systems or languages)
- Improve your tests over time
- Aim for continuous deployment
- Make your tests so comprehensive that you can rely on them when deploying to production
- Make test failures readable
- There is nothing worse than having your tests fail with unreadable error messages
What’s The Point? A Guide To Using Pointers Without Panicking (By Mirjam Uher, Mantel Group)
Mirjam Uher is a Software Engineer at Mantel Group. She is a self-taught programmer and has been working in the industry for about 2 years. Shortly after starting her first tech job, she was exposed to Go and has been an advocate of the language ever since.
Mirjam talked about pointers which is a confusing topic for many. It had a very good progression starting off with the basics of pointers and covering complex use cases towards the end. There were multiple quizzes throughout on pointer behaviour in Go that kept the audience engaged.
The main takeaway from this talk was when to use pointers and what items should we consider when deciding to use values v/s pointers. It finally came down to these four items:
- Size: It is important to consider the size of the objects when choosing to use values v/s pointers. Some objects are quite large and passing them by value will make the code inefficient. In these cases, using pointers makes sense. However, for certain smaller data types, using values makes more sense since they might be smaller than pointers.
- Mutability: Do we want to allow the code to modify the original object? If the answer is yes, it makes sense to use pointers. If not, we will be better off using values.
- Nil v/s Default: When a pointer is empty, it defaults to nil. But when we use values, it is often something else. Eg- The default value for an int data type will be 0. We need to keep this under consideration to avoid surprises.
- Optimizations: Go itself does a lot of optimizations under the hood for us. Some data types such as slices and structs have a lot of details happening in the background where it uses pointers and values depending on what will work best.
Building a Beginner Programming Language with Go (By Julia Ogris)
Julia Orgis is a software engineer who is currently travelling the world with her family. She realised that when learning to program, the jump from using block-based programming languages (like Scratch) and conventional programming languages (such as Java or Go) is too large. Block-based programming mainly uses drag-and-drop interfaces to build apps instead of typing out code, which is usually the first step many people trying to learn programming take. Conventional programming with languages such as Java involves a ton of syntax and can be overwhelming to beginners. In order to bridge this gap and to help people make a smoother transition when learning coding, Julia built Evy (https://evy.dev/), which is a beginner programming language that sits between block-based programming and conventional coding. This language was built entirely using Go. It was fun hearing about the process of building this language and how Julia’s daughters became the ones who were testing it.
Some of the highlights of this language are:
- Simple syntax
- A small set of functions that enable user interaction, geometrical drawings, games, and animations
- Built using Tiny Go which utilises WASM. This enables Evy to be run in the browser
Reflecting on Go: What We Got Right, What We Got Wrong (By Rob Pike)
The conference ended with a talk from one of the original creators of Go himself. Rob Pike talked about his journey in creating Go and some insights gathered along the way. He spoke about the genesis of the language which made its first appearance in November 2009. Go was described as a simple, fast, safe, concurrent, fun, and open-source language. Its call to action was – “Go for it”. It was the programming language designed by Google to help solve Google’s problems and to quote “Google has big problems” – with many millions of lines of software, with servers mostly in C++.
So – what was done right?
- He talked at length about the Mascot of the language “the Gopher”, being very proud of having it be an awesome identifier for the language
- Having the Go Programming Language Specification: This has allowed people to get on board quickly
- Portability of the language: making it available to a plethora of hardware architectures and operating systems.
- Go’s compatibility promise: Programs written in Go version 1 will continue to compile and run correctly for all future Go 1.x versions. In essence, the Go team has made stability and backward compatibility a key principle in the language’s development.
- Having a core library, tools, fast build time, testing built into the language, and a tool to reformat code to follow a consistent and canonical style by way of ‘gofmt’
- Go’s approach to concurrency, interfaces, and cooperating sequential processes.
- Go compiler improvements, with the release of Go 1.5 and changes to the Go Assembler to remove C dependencies which enabled faster builds
So – what could have been done better?
On reflection, the areas of communication with the developer community, having much better documentation, and more working code examples at the beginning would have been good, but this has been rectified and will continue to be improved. Go’s package management growth pains are well documented but hopefully are in a better state today than before.
Other Notable Mentions
A few other talks that the attendees found insightful are listed below:
- WebAssembly with Go: Powering the Web with Speed and Efficiency (Jyotsna Gupta)
- The Hacker’s Guide to JWT Security (By Patrycja Wegrzynowicz, Form3)
This talk mainly focused on the security around JWT tokens. While keeping the audiences entertained throughout, Patrycja demonstrated live how a bad actor may exploit common JWT implementation mistakes to access sensitive information. A key takeaway from her talk was how to correctly verify the JWT tokens.
- The Power of Bloom Filters: Building a Cutting Edge Go Search Engine to Explore the World’s Source (By Ben Boyter, Klabamo) A tech lead for Klabamo gave us an insight into how he implemented an in-memory search engine using bloom filter as a document indexer.
Another amazing agenda item at GopherConAU was the lightning talks. Quick 5-minute presentations, with one singular slide on any Go related topic. This opportunity was open to all the attendees.
There were 3 amazing lightning talks:
- Disco (Esme Lamb, Slack) This talk was about DISCO (Domestic Light Illumination System) which is used for home lighting. It’s built using Go
- Flame Graphs (Brendan Gregg, Intel) The creator of the flame graph himself gave this quick lightning talk on the history behind the flame graph and how the idea came about.
- Bubble Tea (Broderick Westerope, Mantel Group) Using his Go-based Tetris game as an example, Broderick talked about Bubble Tea which is a Go library used to create rich terminal user interfaces. there were a ton of great talks. Some of the highlights for us are listed below.
GopherConAU 23 was, all in all, a success. From seasoned programmers to newbies, there was something for everyone. The attendees were also impressed by the female representation at the event. It was invigorating to see so many people expressing their enthusiasm for working with the language and ecosystem, expressing their appreciation of the Go community for its sharing of knowledge and its supportive structures. It was interesting to hear how people went about solving their problems and what they were enthusiastic about.
Also, it was refreshing to hear the reservations about the language, or at the very least, friction points found by early and experienced developers, to the ‘in hindsight’ learnings from the founders of the language themselves. As we acknowledge that each language serves specific use cases, Go undoubtedly has its niche.
A point of particular interest was Rob Pike’s mention that one of the initial motivations was to transition internal C++ developers at Google to Go—an endeavour that, in part, proved successful. Looking ahead, it will be intriguing to observe community adoption of Go in diverse areas, given its foundations and the unique challenges it addresses. Overall, a majority of the attendees agreed that they would re-attend and recommend attending GopherconAu.