A Liberating Language • The Applied Go Weekly Newsletter 2024-10-27
Your weekly source of Go news, tips, and projects
A Liberating Language
Hi ,
How important is the choice of language for the success of a project, in the short and long term? Some programmers consider one language as good as another; they learn dozens of them but none deeper than the basics. A few are brilliant enough to gain deep understanding of each language they learn, but most of us are better off knowing a few languages at the surface and deeply knowing the ins and outs of one specific language.
The choice of language is difficult and there is no single correct answer. Many classifications and metrics exist to rank languages.
I claim that the liberation capabilities of a language are an underrated criterion for choosing a language. Go fares quite well in this discipline.
Liberation capabilities? Read more in the Spotlight!
Featured articles
How I Tuned My CI/CD Pipeline To Be Done in 60 Seconds | MzFit
A faster CI/CD pipeline means less coffee, less billing for service runners, less boredom, fewer distractions, and more builds per year. Nicholas Rees describes how he sped up his pipeline from 5+ minutes to 60 seconds.
Go and Postgres Listen/Notify or: How I Learned to Stop Worrying and Love PubSub :: Jon Brown's Webpage
The idea: Write data to the database and send the same data to another service.
The problem: If either of the two steps fails, your system is out of sync.
The solution: Postgres pub-sub.
I own my LLM chat history, and so should you
Web-based AI chatbots keep your chat history, but they keep it on their companies' servers. You could use desktop clients like AnythingLLM or Msty, or host your own AI frontend, such as Danswer, LibreChat or Open-WebUI. But why settling with other people's solutions when you can write your own? Markus Wüstenberg did that, and presents his terminal chatbot written with Go and SQLite.
Podcast corner
Go Time: AI for Observability
Observability is a must-have for distributed applications, but it comes with loads of data to monitor and analyze. AI to the rescue. – With Yasir Ekinci, who hates the term "AI".
Spotlight: Go is a liberating language
How would you characterize Go in one adjective? My answer would be "liberating". That's not exactly a tag you would slap on a programming language, right?
But whenever I work with Go, I notice so many aspects that liberate the user from TK and TK:
- The compiler is fast as heck. Have you ever noticed how quickly you can get out of the flow during long compilations? Even just 5 minutes can kill focus and creativity. Go's compiler almost feels like an interpreter or a REPL—a read-evaluate-print loop. No more flow blockers.
- The garbage collector is for programming what automatic gears are for cars: Let the machine do what the machine can. If you ever wrote code in a language with manual memory management, you know how tedious and error-prone manual memory management can be. Go's GC takes this burden off your shoulders, freeing your mind to focus on the real task.
- Go favors libraries over frameworks. How is this liberating? Frameworks can be a kick-starter for a project, but once you reach the limits of a framework, it's difficult to break out. The framework controls your code. In a library-based world, you compose your app as you want and keep control over your design and architecture.
- Go is free and open source, licensed under a BSD license. No company can bring Go under its control or impose restrictions. Trying is an option, but we know where it's going if a company tries. (Looking at you, Terraform and Redis.)
- Go liberates teams. Go newcomers can pick up the language quickly, and experienced Gophers know how to write clear, idiomatic Go code. Moreover, Go discourages writing clever code that even the author doesn't understand in one month. Go is the boring language, and rightly so.
- Go has quite a few batteries included. (I know, that's Python's tagline.) - A rich standard lib liberates my projects from crushing under the weight of too many dependencies. - A capable, all-inclusive toolchain liberates me from searching and accumulating third-party tools for essential tasks like testing, benchmarking, cross-compiling, dependency management, and many more. - Concurrency is part of Go's genes. No clumsy concurrency libs to bolt on my code.
- Go completely goes out of the way in production. - Static binaries need no pre-installed interpreters or virtual machines. - Pure Go cross-compiles effortlessly to many operating systems and processor architectures.
It takes no "hero language" to liberate developers and engineers from tedious routines, productivity blocks, or damaging lock-ins. Rather, it's a long list of small decisions that make a language as liberating as Go is.
Quote of the Week: The True Enterprise Developer
The true enterprise developer can write Java in any language.
More articles, videos, talks
packagemain #23: Fuzz Testing in Go - YouTube
Fuzz testing extends the test input beyond the hard-coded test cases. Here is a video introduction.
Go Plan9 Memo, Speeding Up Calculations 450% | Jacob_Ray_Pehringer
A crash course in writing Go Assembly code (which the article refers to as "Plan9".
How to implement authorization using Cerbos in Go | Cerbos
There are many authorization services out there, and probably as many SDKs. Here is a how-to guide on plugging Cerbos into your Echo-based Go web app.
Benchmarks and performance testing
How fast is your code? Benchmarks will tell you . Luckily, Go has benchmarking integrated into the toolchain, alongside testing. Here is a benchmarking primer for Go newcomers.
Projects
Libraries
GitHub - raeperd/kickstart.go: Minimalistic http server template in go
A minimal, batteries-included web server starter kit that explicitly does not want to be a framework.
GitHub - prathyushnallamothu/swarmgo: SwarmGo is a Go package that allows you to create AI agents capable of interacting, coordinating, and executing tasks. Inspired by OpenAI's Swarm framework, SwarmGo focuses on making agent coordination and execution lightweight, highly controllable, and easily testable.
Orchestrate AI agents with different strengths and capabilities. You can even tell one agent to hand off work to another agent. Like openai/swarm but not Python.
GitHub - negrel/secrecy: 🤫 A simple secret-keeping library for Go.
Inspired by the secrecy
Rust crate.
GitHub - nimbit-software/gojson-rules-engine: go version of cache-controls json-rules-engine
The author ran into limitations with other rule engines, so they decided to port json-rules-engine
over to Go.
Tools and applications
GitHub - devgianlu/go-librespot: Yet another open source Spotify client, written in Go.
A Spotify client based on go-librespot
. Linux only, as it depends on libogg
, libvorbis
, and libasound2
.
GitHub - amar-jay/mini_ros: building ROS in 500 lines of Go
A minimalistic implementation of ROS (Robot Operating System).
Completely unrelated to Go
Finish your projects
Starting a new greenfield project: Yay!
Biting through the work required to finish and ship the project: Nay.
However, finishing helps both your past self and your future self. So consider taking Aaron Francis' insights and tips to overcome the mental barriers of bringing a project to a successful end.
Docker mount revisited
Do you frequently get lost in the jungle of Docker mount variants, options, and syntax peculiarities? Here is a systematic listing of all Docker mounts you might come across.
Happy coding! ʕ◔ϖ◔ʔ
Questions or feedback? Drop me a line. I'd love to hear from you.
Best from Munich, Christoph
Not a subscriber yet?
If you read this newsletter issue online, or if someone forwarded the newsletter to you, subscribe for regular updates to get every new issue earlier than the online version, and more reliable than an occasional forwarding.
Find the subscription form at the end of this page.
How I can help
If you're looking for more useful content around Go, here are some ways I can help you become a better Gopher (or a Gopher at all):
On AppliedGo.net, I blog about Go projects, algorithms and data structures in Go, and other fun stuff.
Or visit the AppliedGo.com blog and learn about language specifics, Go updates, and programming-related stuff.
My AppliedGo YouTube channel hosts quick tip and crash course videos that help you get more productive and creative with Go.
Enroll in my Go course for developers that stands out for its intense use of animated graphics for explaining abstract concepts in an intuitive way. Numerous short and concise lectures allow you to schedule your learning flow as you like.
Christoph Berger IT Products and Services
Dachauer Straße 29
Bergkirchen
Germany