ardanlabs.com

Modules Part 02: Projects, Dependencies and Gopls

Series IndexWhy and WhatProjects, Dependencies and GoplsMinimal Version SelectionIntroductionModules is the system integrated into Go to provide support for dependency management. This means modules touch just about anything related to working with source code, including editor support. To provide editors with support for modules (and for other reasons), the Go team built a service named gopls...

ardanlabs.com

Modules Part 01: Why And What

IntroductionModules provide an integrated solution for three key problems that have been a pain point for developers since Go’s initial release:Ability to work with Go code outside of the GOPATH workspace.Ability to version a dependency and identify the most compatible version to use.Ability to manage dependencies natively using the Go tooling.With the release of Go 1.13, these three problems...

ardanlabs.com

Caddy Partnership With Light Code Labs

Ardan Labs (a leader in building Go enterprise software) is excited to announce that we have partnered with Light Code Labs and Matt Holt to bring Caddy into the Ardan Labs family of products and services. Caddy is a lightweight ingress service written in Go that provides automated security features and a plugin environment for extensibility. With the service being free open source (FOSS), small...

ardanlabs.com

An Open Letter To The Go Team About Try

“Once a language gets complex enough, programming in it is more like carving out a subset from an infinite sea of features, most of which we’ll never learn. Once a language feels infinite, the costs of adding further features to it are no longer apparent”. - Mark MillerThe new try proposal is an addition to the language that introduces a second mechanic to handle errors. It is being...

ardanlabs.com

Error Handling In Go, Part II

IntroductionIn part I of this post, we learned about the error interface and how the standard library provides support for creating error interface values via the errors package. We also learned how to work with error interface values and use them to identify when an error has occured. Finally, we saw how some packages in the standard library export error interface variables to help us identify...

ardanlabs.com

Object Oriented Programming Mechanics

Go is an object oriented programming language. It may not have inheritance, but in this 20 minute video from the Bangalore meetup, I will show you how object oriented programming practices and techniques can be applied to your Go programs. From an object oriented standpoint, Go does provides the ability to add behavior to your types via methods, allows you to implement polymorphic behavior via...

ardanlabs.com

Bounds Check Elimination In Go

IntroductionOne day I was talking to Damian Gryski in Slack about some performance improvements he made to his go-metro package. When I first looked at the changes I was completely confused how this could have any effect on the performance of the code. I felt the code was more readable, but more performant? I didn’t see it.Then Damian started to talk to me about a compiler optimization called...

ardanlabs.com

Design Philosophy On Logging

PreludeThis post is part of a series designed to make you think about your own design philosophy on different topics. If you haven’t read the following post yet, please do so first:Develop Your Design PhilosophyIntroductionSystems cannot be developed assuming that human beings will be able to write millions of lines of code without making mistakes, and debugging alone is not an efficient way to...

ardanlabs.com

Interface Values Are Valueless

IntroductionI’ve been seeing a lot of question about interfaces lately on Slack. Most of the time the answers are technical and focus on implementation details. Implementation is important to help with debugging, but implementation doesn’t help with design. When it comes to designing code with interfaces, behavior has to be the main focus.In this post, I hope to provide a different way to...

ardanlabs.com

Goroutine Leaks - The Forgotten Sender

IntroductionConcurrent programming allows developers to solve problems using more than one path of execution and is often used in an attempt to improve performance. Concurrency doesn’t mean these multiple paths are executing in parallel; it means these paths are executing out-of-order instead of sequentially. Historically, this type of programming is facilitated using libraries that are either...

ardanlabs.com

Scheduling In Go : Part III - Concurrency

PreludeThis is the third post in a three part series that will provide an understanding of the mechanics and semantics behind the scheduler in Go. This post focuses on concurrency.Index of the three part series:1) Scheduling In Go : Part I - OS Scheduler2) Scheduling In Go : Part II - Go Scheduler3) Scheduling In Go : Part III - ConcurrencyIntroductionWhen I’m solving a problem, especially if...