Ardan Labs
Tagged posts

“Go”

Technical posts from the Ardan Labs blog.

Back to Blog

Subscribe to our Newsletter

By signing up you get access to our FREE Training Bundle, Technical Tuesday releases, Special Offers, & Notifications on our latest content.

Posts tagged “Go”

Updated

January 27th, 2026

-

13 min read

Kubernetes Memory Limits and Go

go training golang

Kubernetes memory limits introduce a subtle but critical interaction with the Go runtime that can determine whether a service runs efficiently or fails under load. This …

Updated

October 21, 2025

-

10 min read

Getting Friendly With CPU Caches

go training golang

Understanding how your data structures interact with hardware is one of the most powerful ways to improve application performance. This blogpost explores how CPU caches …

Published

September 23, 2025

-

12 min read

Kubernetes CPU Limits and Go

go training golang

Kubernetes CPU limits can look straightforward on the surface, but their impact on application performance is anything but simple. This article unpacks how Go services …

Updated

August 26, 2025

-

16 min read

Garbage Collection In Go : Part III - GC Pacing

go Training golang

Go’s garbage collector is designed not only to manage memory safely but also to pace itself intelligently, striking a balance between low latency and high throughput. …

Updated

July 15, 2025

-

12 min read

Garbage Collection In Go : Part II - GC Traces

go Training golang

Originally published in 2019, this article is part two of a three-part series exploring Go’s garbage collector. Though the Go runtime has continued to evolve, the …

Published

June 10, 2025

-

21 min read

Garbage Collection In Go : Part I - Semantics

go Training golang

This article was originally published in 2018, yet its core insights into Go’s garbage collection model remain highly relevant for developers today. While some …

Published

May 13, 2025

-

19 min read

Scheduling In Go : Part III - Concurrency

go Training golang

Although originally written in 2018, the following concepts remain essential for developers working with concurrency. This blogpost focuses on concurrency, …

Published

April 4, 2024

-

17 min read

Scheduling In Go : Part II - Go Scheduler

go Training golang

This blogpost is the second installment in a three-part series exploring the mechanics and semantics of the Go scheduler. Despite being published in 2018, the content …

Published

Mar 4, 2025

-

16 min read

Scheduling In Go : Part I - OS Scheduler

go Training golang

Although this blogpost was originally published in 2018, the concepts and principles discussed remain crucial for building efficient and performant multithreaded …

Published

Feb 10, 2025

-

17 min read

Context Package Semantics In Go

go Training golang

Although first introduced in 2014, the Context package remains a crucial component of Go programming, enabling efficient management of request-scoped data, deadlines, …

Published

November 26, 2024

-

2 min read

Scalable JSON Streaming with HTTP and Go - Ep.5

go training JSON

Introduction: Welcome to the final episode of the JSON for Engineers series! In this concluding session, we tackle the challenges of working with large JSON datasets, …

go training JSON

Introduction: Welcome to Episode 4 of the JSON for Engineers series! In this episode, we tackle the complexities of working with JSON data, especially when dealing with …

go training JSON

Introduction: Welcome to Episode 3 of JSON for Engineers! In this episode, Miki Tebeka explores the intricacies of JSON field mapping and value handling, especially when …

Published

October 18, 2024

-

3 min read

Exploring JSON Encoding and Data Handling in Go - Ep.2

go training JSON

Introduction: Welcome to Episode 2 of JSON for Engineers! In this episode, we explore the unique characteristics of JSON as a schema-less format, discussing both its …

Published

October 04, 2024

-

2 min read

Data Integrity with JSON Serialization - Ep.1

go training JSON

Introduction: Welcome to Episode 1 of JSON for Engineers! In this first episode, Miki Tebeka dives into the fundamentals of serialization, with a special focus on JSON, …

ai go training

Introduction: Welcome to the final episode of our Intro to Generative AI series! In this episode, Daniel Whitenack takes the concepts you’ve been learning and shows …

ai go training

Introduction: In Episode 6 of the Intro to Generative A.I. series, Daniel shifts the focus from basic search techniques to more dynamic, on-the-fly AI applications. He …

ai go training

Introduction: Welcome to Episode 5 of our Intro to Generative AI series! In this episode, Daniel explores practical techniques for enhancing AI models’ ability to …

ai go training

Introduction: Welcome to Episode 4 of our Intro to Generative AI series! In this episode, Daniel dives into the essential technique of prompt engineering, focusing on …

go training

Introduction: Welcome to Episode 12 of our Ultimate Software Design series! In this final installment, Bill guides us through the advanced implementation of transaction …

go training

Introduction: Welcome to Episode 11 of our Ultimate Software Design series! In this episode, Bill delves into the intricacies of implementing robust application layer …

ai go training

Introduction: Welcome to Episode 3 of our Intro to Generative AI series! In this episode, Daniel explores the critical aspect of prompt formatting when working with AI …

go training

Introduction: Welcome to Episode 10 of our Ultimate Software Design series! In this episode, Bill dives into the integration of authentication and authorization …

go training

Introduction: Welcome to Episode 9 of our Ultimate Software Design series! In this episode, Bill delves into the intricacies of implementing robust authorization and API …

ai go training

Introduction: Welcome to Episode 2 of our Intro to Generative AI series! In this segment, Daniel dives into the practical aspects of working with large language models …

go training

Introduction: In this segment, Bill delves into the fundamental aspects of authentication and authorization, equipping Go developers with essential knowledge and advanced …

ai go training

Introduction: Welcome to the first episode of our “Intro to Generative A.I” series! In this episode, Daniel dives into the intriguing world of large language …

go training

Introduction: Going into more detail on error handling, Bill provides a comprehensive overview of effective strategies and best practices for Go developers. By exploring …

go training

Introduction: Continue the dive into the complexities of Go’s concurrency model in this segment of the “Ultimate Software Design” series, where Bill …

go training

Introduction: In this installment, Bill delves into the concept of load shedding in Go, explaining its importance in managing GoRoutines and ensuring clean shutdowns. How …

go training

Introduction: In this detailed discussion, Bill delves into the critical aspects of networking within Kubernetes clusters, emphasizing the necessity of properly defining …

go training

Introduction: In this installment of the Ultimate Software Design series, Bill guides us through setting up a Kubernetes environment using Kubernetes inside Docker …

go training

Introduction: In this insightful episode, Bill dives deep into the realm of package design, shedding light on its crucial role in software development. Here are three key …

go training

Introduction: Embark on a journey into the heart of software design with the Ultimate Software Design series, where Bill navigates through the intricacies of crafting …

go training golang rust

Introduction: Rust’s memory safety features are advantageous to Rust developers because they: Ensure robust protection against buffer overflows and underflows, …

Published

Jan 15, 2024

-

3 min read

Ultimate Go Tour

go training golang

I have always appreciated the Go Team investing time on providing the community with the Go Tour. This website is designed to help developers get started in learning the …

Published

Sep 21, 2023

-

7 min read

Implementing Enumerations In Go

go training golang

Introduction Prior to coding in Go, I was writing software in C#. In C# enumerations can be declared and the associated type can be used in functions and as fields in a …

Published

Sep 8, 2023

-

6 min read

Slices Package: Contains, Delete, and Equal

go training golang

Series Here are all the posts in this series about the slices package. Binary Search Clip, Clone, and Compact Compare Contains, Delete, and Equal Introduction In the last …

Published

Aug 25, 2023

-

4 min read

Slices Package: Compare

go training golang

Series Here are all the posts in this series about the slices package. Binary Search Clip, Clone, and Compact Compare Contains, Delete, and Equal Introduction In the last …

Published

Aug 18, 2023

-

6 min read

Slices Package: Clip, Clone, and Compact

go training golang

Series Here are all the posts in this series about the slices package. Binary Search Clip, Clone, and Compact Compare Contains, Delete, and Equal Introduction In the …

Published

Aug 2, 2023

-

5 min read

Slices Package: Binary Search

go training golang

Series Here are all the posts in this series about the slices package. Binary Search Clip, Clone, and Compact Compare Contains, Delete, and Equal Introduction Go’s most …

go training golang

Introduction In episode 9, Miki discussed how a command flag can be decoded into a user defined type with the Value interface. As a recap, the Value interface consists of …

Published

Mar 27, 2023

-

2 min read

Interfaces 101 : Parsing Command Flags Ep. 9

go training golang

Introduction In episode 8, Miki developed a Go HTTP client that had a method to check the health of a theoretical API. The method would construct the request URL and …

go training golang

Introduction In episode 7, Miki discussed design considerations to keep in mind while creating interfaces in Go with the first idea he proposed being that an interface …

go training golang

Introduction In episode 6, Miki built a logger package with the aim of making it as versatile as possible. To achieve this, he constructed his logger object with a …

go training golang

Introduction In episode 5, Miki wrote a function that counted the number of lines in a file with interfaces. The first thing his function did was to open a file with Go’s …

go training golang

Introduction In episode 4, Miki defined an enumerated type that satisfied Go’s fmt.Stringer interface. By implementing the fmt.Stringer interface, Miki can specify how …

Published

Feb 21, 2023

-

2 min read

Interfaces 101 : Go's Logging Interface Ep. 4

go training golang

Introduction In episode 3, Miki implemented a type that satisfied Go’s error interface. The odd thing about his type was it would be considered not-nil although no value …

Published

Feb 13, 2023

-

2 min read

Interfaces 101 : Error Handling With Go Ep. 3

go training golang

Introduction In episode 2, Miki examined the impact interfaces have on the performance of a Go program. To perform this experiment, Miki invoked a type’s method in two …

Published

Feb 8, 2023

-

2 min read

Interfaces 101 : Heap Escape Ep. 2

go training golang

Introduction In episode 1, Miki had two functions that performed the similar operation, but returned different types. To refactor this, Miki rewrote both functions as a …

go training golang

Introduction Go interfaces are beneficial to Go developers because they: Allow interfaces to separate mechanism from behavior. Increase flexibility of function …

Published

Jan 27, 2023

-

1 min read

Ultimate Go: Advanced Engineering Episode 20

go training golang blockchain

Introduction In episode 19, Bill designed and implemented the data structure for an account on his blockchain. This type will have a nonce field to ensure incoming …

Published

Jan 24, 2023

-

1 min read

Ultimate Go: Advanced Engineering Episode 18

go training golang blockchain

Introduction In episode 17, Bill began to design an in-memory accounting database that will store the account balances on his blockchain. To build this database, Bill …

Published

Jan 24, 2023

-

1 min read

Ultimate Go: Advanced Engineering Episode 19

go training golang blockchain

Introduction In episode 18, Bill defined the Go type that will represent a transaction and implemented the methods to validate one. While developing the transaction type, …

Published

Jan 19, 2023

-

2 min read

Table driven tests in Go

go training golang

Introduction Table tests are a great way to test different inputs and associated outputs for a function in Go. To write a table test, you define a slice of some data …

Published

Jan 19, 2023

-

1 min read

Ultimate Go: Advanced Engineering Episode 17

go training golang blockchain

Introduction In episode 16, Bill implemented additional means of verification for his blockchain’s transactions. The first update he made was to verify if a transaction …

Published

Jan 17, 2023

-

2 min read

Ultimate Go: Advanced Engineering Episode 16

go training golang blockchain

Introduction In episode 15, Bill architected a solution to ensure all the users on his blockchain were given a unique identifier. His approach consisted of essentially …

Published

Jan 17, 2023

-

1 min read

Writing an HTTP handler function in Go

go training golang

Introduction When an API requires implementation details from the user, many developers use an interface for help. However, another way to allow developers to provide …

Published

Jan 12, 2023

-

1 min read

Ultimate Go: Advanced Engineering Episode 15

go training golang

Introduction In episode 14, Bill architected a solution to digitally sign the transactions on his blockchain. His solution retrieved the private key by : loading private …

Published

Jan 12, 2023

-

1 min read

Writing testable examples in Go

go training golang

Introduction Google developed Go to be an alternative to C++ with the internet and scale in mind. Go’s toolchain automates tasks that are easily overlooked, and amongst …

Published

Jan 11, 2023

-

2 min read

Ultimate Go: Advanced Engineering Episode 13

go training golang

Introduction In episode 12, Bill laid out his strategy to handle data hashing on his blockchain. The first step he took was to create a package to handle the …

Published

Jan 11, 2023

-

2 min read

Ultimate Go: Advanced Engineering Episode 14

go training golang

Introduction In episode 13, Bill discussed the idea of adding salt to a hash and how modern crypto-currency blockchains use it to better interpret requests sent to nodes. …

Published

Jan 4, 2023

-

2 min read

Ultimate Go: Advanced Engineering Episode 12

go training golang

Introduction In episode 11, Bill highlighted the issue of identity verification and provided a solution to this problem. The solution proposed was to cryptographically …

Published

Jan 3, 2023

-

1 min read

Ultimate Go: Advanced Engineering Episode 10

go training golang

Introduction In episode 9, Bill introduced the idea of the genesis record and its role in his blockchain. As a recap, the genesis record will be used to customize the …

Published

Jan 3, 2023

-

2 min read

Ultimate Go: Advanced Engineering Episode 11

go training golang

Introduction In episode 10, Bill dove into the technical implementation of his genesis record and defined a custom Go type representing the record. While doing so, he …

go training golang blockchain smart-contract

Introduction I made it my mission in 2022 to learn everything I could about blockchain and as the year ends, I feel like I accomplished my goal. Love it, hate it, or …

Published

Dec 20, 2022

-

1 min read

Ultimate Go: Advanced Engineering Episode 9

go training golang

Introduction In episode 8, Bill wanted to build a blockchain in Go and began to lay the groundwork for the project. Go is a good choice because its standard library has …

Published

Dec 19, 2022

-

2 min read

Ultimate Go: Advanced Engineering Episode 7

go training golang

Introduction In episode 6, Bill gives an overview of what consensus algorithms are and how these algorithms ensure distributed databases are in sync. Moving forward Bill …

Published

Dec 19, 2022

-

1 min read

Ultimate Go: Advanced Engineering Episode 8

go training golang

Introduction In the first part of the series, Bill designed a dependency management system. The dependency manager needed to be distributed, transparent, …

Published

Dec 16, 2022

-

1 min read

Generics vs. Interfaces

go training golang

Introduction In this video, Paulo shows the benefit of leveraging generic functions to write less code that does more. He starts by walking you through an API server he …

Published

Dec 16, 2022

-

2 min read

Ultimate Go: Advanced Engineering Episode 5

go training golang

Introduction In case you missed episode 4, Bill attempted to integrate current database sharing solutions to solve the “database ownership” problem his dependency manager …

Published

Dec 16, 2022

-

1 min read

Ultimate Go: Advanced Engineering Episode 6

go training golang

Introduction In the last video, Bill left off talking about proof of work (PoW) algorithms. In a distributed and decentralized environment, PoW used to be the gold …

Published

Dec 16, 2022

-

1 min read

Understanding Go's Time Format

go training golang

Introduction Most apps that work with time values eventually need to display time to a user. Go has a unique way of allowing you to specify how to display time values …

Published

Dec 14, 2022

-

2 min read

Ultimate Go: Advanced Engineering Episode 3

go training golang

Introduction In episode 2, Bill designed a database for his dependency manager to enable Go developers to have reproducible,durable and secure builds. This database will …

Published

Dec 14, 2022

-

1 min read

Ultimate Go: Advanced Engineering Episode 4

go training golang

Introduction In episode 3, Bill needed to figure out how to share ownership of his dependency manager’s database in a secure and efficient manner. Bill is the only …

Published

Dec 13, 2022

-

1 min read

Ultimate Go: Advanced Engineering Episode 2

go training golang

Introduction In episode 1, Bill finished by describing the dependency management conundrum Go faced in its early days. Prior to the Go team providing the module system, …

Published

Dec 12, 2022

-

1 min read

Ultimate Go: Advanced Engineering Episode 1

go training golang

Introduction In this video, Bill will introduce the concepts of what a blockchain is, the benefits of a blockchain, and the network environment it operates in. Bill …

Published

Jun 6, 2022

-

11 min read

Practical Uses Of Blockchain Technology

go training golang blockchain

Introduction A blockchain is an integrated solution of different computer science problems in the form of a single, append-only, publicly available, transparent, and …

Published

May 5, 2022

-

10 min read

Blockchain In Go: Part IV: Fraud Detection

go training golang blockchain

Introduction In the first three posts, I explained there were four aspects of a blockchain that this series would explore with a backing implementation provided by the …

go training golang blockchain

Introduction In the first two posts, I explained there were four aspects of a blockchain that this series would explore with a backing implementation provided by the …

go training golang blockchain

Introduction In the first post, I explained there were four aspects of a blockchain that this series would explore with a backing implementation provided by the Ardan …

go training golang blockchain

Introduction This is the first post in a series that will explore the semantics and implementation details of the Ardan blockchain project. The code is a reference …

go Training golang

Series Index Generics Part 01: Basic Syntax Generics Part 02: Underlying Types Generics Part 03: Struct Types and Data Semantics Introduction In the previous post, I …

Published

Sep 15, 2020

-

9 min read

Python and Go : Part IV - Using Python in Memory

go python grpc golang

Series Index Python and Go: Part I - gRPC Python and Go: Part II - Extending Python With Go Python and Go: Part III - Packaging Python Code Python and Go: Part IV - Using …

Published

Aug 18, 2020

-

10 min read

Generics Part 02: Underlying Types

go Training golang

Changes The draft is a living document which means these posts will need to change over time. This section documents when changes have taken place to this post. 21/08/20 …

Published

Aug 11, 2020

-

6 min read

Python and Go : Part III - Packaging Python Code

go python grpc golang

Series Index Python and Go: Part I - gRPC Python and Go: Part II - Extending Python With Go Python and Go: Part III - Packaging Python Code Python and Go: Part IV - Using …

Published

Jul 23, 2020

-

13 min read

Generics Part 01: Basic Syntax

go Training golang

Changes The draft is a living document which means these posts will need to change over time. This section documents when changes have taken place to this post. 21/08/20 …

go python grpc golang

Series Index Python and Go: Part I - gRPC Python and Go: Part II - Extending Python With Go Python and Go: Part III - Packaging Python Code Python and Go: Part IV - Using …

Published

Jun 26, 2020

-

10 min read

Dgraph Database Semantics

dgraph graphql go training golang

Introduction In this paper written by Manish Jain (the founder of Dgraph) he describes Dgraph as: a distributed graph database which provides horizontal scalability, …

Published

Jun 8, 2020

-

12 min read

Python and Go : Part I - gRPC

go python grpc golang

Series Index Python and Go: Part I - gRPC Python and Go: Part II - Extending Python With Go Python and Go: Part III - Packaging Python Code Python and Go: Part IV - Using …

Published

May 15, 2020

-

15 min read

Dgraph, GraphQL, Schemas, and CRUD

dgraph graphql go training golang

Introduction In most of the reviews for this post, I was asked why choose a graph database over something else? This is a hard question to answer since my experience …

Published

Apr 16, 2020

-

8 min read

Getting Started With Dgraph and GraphQL+-

dgraph graphql+- go training golang

Introduction I have spent a career building business applications that work with databases, starting with SQL and then moving to No-SQL. I’ve been curious how Graph …

Published

Apr 13, 2020

-

12 min read

Modules Part 06: Vendoring

go Training golang

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Introduction It’s no …

Published

Apr 8, 2020

-

10 min read

Modules Part 05: Gopls Improvements

go Training golang

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Prelude This is a guest …

go Training golang docker

Series Index Reducing Image Size Details Specific To Different Languages Going Farther To Reduce Image Size Introduction In the first two parts of this series, we covered …

go Training golang docker

Series Index Reducing Image Size Details Specific To Different Languages Going Farther To Reduce Image Size Introduction In the first part, we introduced multi-stage …

Published

Feb 10, 2020

-

17 min read

Modules Part 04: Mirrors, Checksums and Athens

go Training golang

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Introduction One of the …

Published

Feb 4, 2020

-

14 min read

Docker Images : Part I - Reducing Image Size

go Training golang docker

Series Index Reducing Image Size Details Specific To Different Languages Going Farther To Reduce Image Size Introduction When getting started with containers, it’s …

Published

Dec 18, 2019

-

17 min read

Modules Part 03: Minimal Version Selection

go Training golang

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Introduction Every …

go Training golang

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Introduction Modules is …

Published

Nov 16, 2019

-

7 min read

Flutter: Forbes had it right

go Training golang

“Flutter and Fuchsia. In 2019 you will see these two words everywhere, and now is your chance to get ahead of the curve.” - Todd Fabacher, writing for Forbes Forbes saw …

Published

Oct 10, 2019

-

9 min read

Modules Part 01: Why And What

go Training golang

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Introduction Modules …

go Training golang testing integration tests

Integration tests give insights to the end-to-end operation of web services. In part 2 of this 2 part series over integration testing in Go we explore how to configure and manage external systems before and during testing as well as the actual act of writing integration tests.

Published

Aug 26, 2019

-

3 min read

Why is DevOps Important?

go Training golang devops

1. What are four keys for great DevOps? Collaboration: DevOps requires collaboration, both within teams and between teams. Good communication between teams implies to …

Published

Jul 22, 2019

-

2 min read

Caddy Partnership With Light Code Labs

go Training golang

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 …

Published

Jul 1, 2019

-

4 min read

An Open Letter To The Go Team About Try

go Training golang

“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 …

Published

Apr 18, 2019

-

8 min read

Concurrency Trap #2: Incomplete Work

go Training golang

One of the traps of concurrency is “incomplete work” which occurs when a program terminates before outstanding Goroutines complete. Depending on the program, this may be a serious problem. This post demonstrates the trap and discusses possible solutions.

go Training golang testing integration tests

Integration tests give insights to the end-to-end operation of web services. In part 1 of this 2 part series over integration testing in Go we explore how to run integration tests in restrictive environments, such as Jenkins.

Published

Dec 19, 2018

-

6 min read

Goroutine Leaks - The Abandoned Receivers

go Training golang

Goroutine Leaks are a common cause of memory leaks in Go programs. In my previous post, I presented an introduction to Goroutine leaks and provided one example of a common mistake that many Go developers make. Continuing that work, this post presents another scenario on how Goroutines could be leaked.

Published

Nov 12, 2018

-

8 min read

Goroutine Leaks - The Forgotten Sender

go Training golang

Goroutine leaks are a common source of memory leaks in concurrent programs. This post defines Goroutine leaks and provides one example of a leak that is easy to miss in production code.

Published

Aug 14, 2018

-

3 min read

Creating the Art for Gopher Kart

Go Gopher GopherCon GopherKart

In the months leading up to GopherCon, my wife Jamilet and I had come up with the idea of creating a “small” browser-based game for the convention using the racing …

Published

Jun 27, 2018

-

6 min read

Ultimate Go Service

go Training golang

Introduction I teach a class called Ultimate Go. The class is three days long and teaches you the history, mechanics and semantics of the Go programming language. The …

Published

Apr 28, 2018

-

5 min read

Bounds Check Elimination In Go

go Training golang

Introduction One 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 …

Published

Mar 23, 2018

-

12 min read

Interface Values Are Valueless

go Training golang

Introduction I’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. …

Published

Feb 20, 2018

-

17 min read

Focus On Being Precise

go Training golang

Introduction I was guided for many years to write functions that are generalized and to create layers upon layers of abstraction so things don’t break as business …

Published

Jan 22, 2018

-

18 min read

Escape-Analysis Flaws

go Training golang

Prelude It will be helpful to read this four-part series first on escape analysis and data semantics. Details on how to read an escape analysis report and pprof output …

Published

Oct 24, 2017

-

22 min read

The Behavior Of Channels

go Training golang

Introduction When I started to work with Go’s channels for the first time, I made the mistake of thinking about channels as a data structure. I saw channels as a queue …

Published

Jul 15, 2017

-

10 min read

Interface Semantics

go Training golang

Prelude If you want to put this post in some better context, I suggest reading the following series of posts, which lay out some other fundamental and relevant design …

Published

Jun 27, 2017

-

8 min read

For Range Semantics

go Training golang

Prelude These are good posts to read first to better understand the material presented in this post: Index of the four part series: Language Mechanics On Stacks And …

Published

Jun 8, 2017

-

14 min read

Design Philosophy On Data And Semantics

go Training golang

Prelude This is the final post in a four part series discussing the mechanics and design behind pointers, stacks, heaps, escape analysis and value/pointer semantics in …

Published

Jun 1, 2017

-

15 min read

Language Mechanics On Memory Profiling

go Training golang

Prelude This is the third post in a four part series that will provide an understanding of the mechanics and design behind pointers, stacks, heaps, escape analysis and …

Published

May 26, 2017

-

12 min read

Language Mechanics On Escape Analysis

go Training golang

Prelude This is the second post in a four part series that will provide an understanding of the mechanics and design behind pointers, stacks, heaps, escape analysis and …

Published

May 18, 2017

-

14 min read

Language Mechanics On Stacks And Pointers

go Training golang

Prelude This is the first post in a four part series that will provide an understanding of the mechanics and design behind pointers, stacks, heaps, escape analysis and …

Published

May 10, 2017

-

6 min read

Design Philosophy On Logging

go Training golang

Prelude This 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 …

Published

Feb 24, 2017

-

8 min read

Package Oriented Design

go Training golang

Updated on February 28th, 2017 Prelude This post is part of a series of posts designed to make you think about your own design philosophy on different topics. If you …

Published

Feb 20, 2017

-

8 min read

Design Philosophy On Packaging

go Training golang

Prelude This post is part of a series of posts designed to make you think about your own design philosophy on different topics. If you haven’t read this post yet, please …

Published

Feb 7, 2017

-

6 min read

Design Philosophy On Integrity

go Training golang

Updated on February 10th, 2017 Prelude This post is part of a series of posts designed to make you think about your own design philosophy on different topics. If you …

Published

Jan 31, 2017

-

6 min read

Develop Your Design Philosophy

go Training golang

Prelude This post is part of a series of posts designed to make you think about your own design philosophy on different topics. I will not be laying out direct examples …

Published

Dec 5, 2016

-

1 min read

Video: Design Philosophy in Go

go Training golang

This is a talk that I gave at the Vancouver Meetup on November 29th, 2016. The talk covers topics around developing your own design philosophy with a focus on decoupling …

Published

Nov 3, 2016

-

6 min read

Application Focused API Design

go Training golang

“I think it’s ok to do heinous stuff to test an API if it makes it more usable by others.” - Nate Finch Prelude If you are new to Go, it might help to read these …

Published

Oct 21, 2016

-

3 min read

Avoid Interface Pollution

go Training golang

Introduction Interfaces should only be used when their added value is clear. I see too many packages that declare interfaces unnecessarily, sometimes just for the sake of …

Published

Oct 9, 2016

-

10 min read

Reducing Type Hierarchies

go Training golang

Introduction I see a lot of developers coming to Go from object oriented programming languages such as C# and Java. Because these developers have been trained to use type …

Published

May 12, 2016

-

6 min read

Installing Go And Your Workspace

go Training golang

Introduction If you are new to Linux or the Mac you might find installing Go to be a bit confusing. It was for me when I started learning Go. Go was the reason I stopped …

Published

May 5, 2016

-

6 min read

Copying Interface Values In Go

go Training golang

I am constantly thinking about the Go language and how things work. Lately I have been thinking how everything in Go is by value. We see this when we pass values to …

Published

Sep 13, 2015

-

18 min read

Composition with Go

go Training golang

Composition goes beyond the mechanics of type embedding. It’s a paradigm we can leverage to design better APIs and to build larger programs from smaller parts. It …

Published

Mar 15, 2015

-

1 min read

Object Oriented Programming Mechanics

go Training golang

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 …

Published

Feb 23, 2015

-

12 min read

Scheduler Tracing In Go

go Training golang

Introduction One of the things I love about Go is the profiling and debug information you can generate. There is a special environmental variable named GODEBUG that will …

Published

Jan 11, 2015

-

10 min read

Stack Traces In Go

go Training golang

Introduction Having some basic skills in debugging Go programs can save any programmer a good amount of time trying to identify problems. I believe in logging as much …

Published

Dec 16, 2014

-

15 min read

Using Pointers In Go

go Training golang

Introduction I am asked quite a bit about when and when not to use pointers in Go. The problem most people have, is that they try to make this decision based on what they …

Published

Nov 10, 2014

-

13 min read

Error Handling In Go, Part II

go Training golang

Introduction In 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 …

Published

Oct 13, 2014

-

12 min read

Error Handling In Go, Part I

go Training golang

Introduction It is idiomatic in Go to use the error interface type as the return type for any error that is going to be returned from a function or method. This interface …

Published

Sep 1, 2014

-

8 min read

Go Compiler nil Pointer Checks

go Training golang

Introduction I was thinking about how the compiler looks to protect the code we write when it can. Invalid memory access checks are one type of safety check the compiler …

Published

Aug 30, 2014

-

1 min read

ALS Ice Bucket Challenge - Go Style

go Training golang

If you have not heard about the ALS Ice Bucket Challenge I would be surprised. It’s everywhere nowadays, being done by celebrities alike. After being challenged by …

Published

Jun 27, 2014

-

9 min read

Ice Cream Makers and Data Races Part II

go Training golang

Introduction Dave Cheney published a post called Ice Cream Makers and Data Races. The post showed an example of an interesting data race that can occur when using an …

Published

Jun 25, 2014

-

12 min read

Actionable Data With MongoDB and Go

go Training golang

Introduction If you are building any kind of application for a consumer based product, it is common to have large amounts of application data being generated about your …

Published

Jun 20, 2014

-

5 min read

Pitfalls With Closures In Go

go Training golang

Introduction Closures in Go are a very powerful construct but they can also be the cause of bugs if you don’t understand how they work. In this post I am going to pull a …

Published

May 3, 2014

-

12 min read

Methods, Interfaces and Embedded Types in Go

go Training golang

Introduction My business partner Ed asked me what would happen if a struct and an embedded field both implemented the same interface. We asked ourselves two questions: …

Published

Apr 6, 2014

-

12 min read

Introduction To Numeric Constants In Go

go Training golang

Introduction One of the more unique features of Go is how the language implements constants. The rules for constants in the language specification are unique to Go. They …

Published

Mar 15, 2014

-

5 min read

Exported/Unexported Identifiers In Go

go Training golang

Introduction One of the first things I learned about in Go was using an uppercase or lowercase letter as the first letter when naming a type, variable or function. It was …

Published

Mar 7, 2014

-

4 min read

Web Form Validation And Localization In Go

go Training golang

Introduction As I improve my knowledge and framework for a Go based web service I am building, I continue to go back and enhance my Beego Sample App. Something I just …

Published

Feb 25, 2014

-

7 min read

Running MongoDB Queries Concurrently With Go

go Training golang

If you are attending GopherCon 2014 or plan to watch the videos once they are released, this article will prepare you for the talk by Gustavo Niemeyer and Steve Francia. …

Published

Feb 17, 2014

-

8 min read

The Nature Of Channels In Go

go Training golang

Introduction In my last post called Concurrency, Goroutines and GOMAXPROCS, I set the stage for talking about channels. We discussed what concurrency was and how …

Published

Jan 29, 2014

-

9 min read

Concurrency, Goroutines and GOMAXPROCS

go Training golang

Introduction When new people join the Go-Miami group they always write that they want to learn more about Go’s concurrency model. Concurrency seems to be the big …

Published

Jan 21, 2014

-

5 min read

Decode JSON Documents In Go

go Training golang

Introduction We are working on a project where we have to make calls into a web service. Many of the web calls return very large documents that contain many …

Published

Jan 16, 2014

-

2 min read

Be Selected To Attend GopherCon 2014

go Training golang

Gopher Academy announced a great program today. Today I’d like to announce the GopherCon Scholarship Program. It’s goal is to increase the visibility of women …

Published

Jan 16, 2014

-

5 min read

Go Package Management For 2014

go Training golang

Introduction In October 2013 I sent out a call to action to the Go community. I wanted to form a group of Gophers that would come together and help write a specification …

Published

Dec 31, 2013

-

6 min read

Macro View of Map Internals In Go

go Training golang

Introduction There are lots of posts that talk about the internals of slices, but when it comes to maps, we are left in the dark. I was wondering why and then I found the …

Published

Dec 20, 2013

-

6 min read

Queue Your Way To Scalability

go Training golang

Introduction The first thing I did when I started programming in Go was begin porting my Windows utilities classes and service frameworks over to Linux. This is what I …

Published

Dec 17, 2013

-

5 min read

Three-Index Slices in Go 1.2

go Training golang

With the release of Go 1.2, slices gained the ability to specify the capacity when performing a slicing operation. This doesn’t mean we can use this index to extend …

Published

Dec 11, 2013

-

11 min read

Sample Web Application Using Beego and Mgo

go Training golang

Introduction I am very excited about the Beego web framework. I wanted to share with you how I use the framework to build real world web sites and web services. Here is a …

Published

Dec 10, 2013

-

7 min read

Building A Weather App Using Go

go Training golang

At Ardan Studios we have spent the last 6 months, in our spare time and on weekends, building a consumer based mobile application called OutCast. The mobile application …

Published

Nov 23, 2013

-

4 min read

Write Your Go Programs Using GEdit

go Training golang

This is a guest post from Tad Vizbaras from Etasoft in South Florida. There are a number of editors and IDEs for Go development. LiteIde, Vim, Emacs and GEdit just to …

Published

Nov 21, 2013

-

4 min read

Label Breaks In Go

go Training golang

Have you ever found yourself in this situation. You have a case statement inside of a for loop and you would like to break from both the case and for statements in a …

Published

Nov 5, 2013

-

5 min read

Using The Log Package In Go

go Training golang

Linux is unique to Windows in many ways, and writing programs in Linux is no exception. The use of standard out, standard err and null devices is not only a good idea but …

Published

Nov 3, 2013

-

8 min read

Using XSLT With Go

go Training golang

I am working on a project that requires pulling and processing different XML feeds from the web and storing the data into MongoDB as JSON. Since new feeds come up …

Published

Oct 26, 2013

-

6 min read

Manage Dependencies With GODEP

go Training golang

Introduction If you are using 3rd party packages, (packages that you don't own or control), you will want a way to create a reproducible build every time you build your …

Published

Oct 17, 2013

-

7 min read

My Channel Select Bug

go Training golang

I was testing new functionality on a program that is already running in production when suddenly the code behaved very badly. What I saw shocked me and then it became …

Published

Oct 10, 2013

-

5 min read

Functions and Naked Returns In Go

go Training golang

In Go values that are returned from functions are passed by value. Go gives you some nice flexibility when it comes to returning values from a function. Here is a simple …

Published

Oct 2, 2013

-

7 min read

Cross Compile Your Go Programs

go Training golang

Introduction In my post about building and running programs in Iron.Io, I needed to switched over to my Ubuntu VM to build linux versions of my test programs locally. I …

Published

Oct 1, 2013

-

2 min read

Go Package Management Call To Action

go Training golang

Nathan Youngman, with the help of others, has produced this document outlining months of research and discovery. I would appreciate everyone to honestly read it before …

Published

Sep 26, 2013

-

10 min read

Detecting Race Conditions With Go

go Training golang

I always find it interesting when I realize that something I have been practicing or dealing with for a long time has a name. This time it happens to be race conditions. …

Published

Sep 26, 2013

-

11 min read

Recursion And Tail Calls In Go

go Training golang

This article was written for and published by Gopher Academy I was looking at a code sample that showed a recursive function in Go and the writer was very quick to state …

Published

Sep 23, 2013

-

9 min read

Iterating Over Slices In Go

go Training golang

Slices are used everywhere in my code. If I am working with data from MongoDB, it is stored in a slice. If I need to keep track of a collection of problems after running …

Published

Sep 14, 2013

-

14 min read

Pool Go Routines To Process Task Oriented Work

go Training golang

After working in Go for some time now, I learned how to use an unbuffered channel to build a pool of goroutines. I like this implementation better than what is …

Published

Sep 10, 2013

-

6 min read

Slices of Slices of Slices in Go

go Training golang

I am working on building code to load polygons for the different Marine Forecast areas in the United States. These polygons need to be stored in MongoDB and there is a …

Published

Sep 7, 2013

-

23 min read

Running Go Programs In IronWorker

go Training golang

Introduction Iron.io has a product called IronWorker which provides a task oriented Linux container that you can run your programs inside. If you are not sure what I …

Published

Sep 4, 2013

-

9 min read

Timer Routines And Graceful Shutdowns In Go

go Training golang

In my Outcast data server I have several data retrieval jobs that run using different go routines. Each routine wakes up on a set interval. The most complex job is the …

go Training golang

Earlier in the month I wrote a post about using C Dynamic Libraries in Go Programs. The article built a dynamic library in C and created a Go program that used it. The …

Published

Aug 28, 2013

-

12 min read

Organizing Code to Support Go Get

go Training golang

For those of you who are like me, trying to learn the Mac and Linux operating systems, Golang programming and deployment constructs all at the same time, I feel your …

Published

Aug 26, 2013

-

7 min read

Collections Of Unknown Length in Go

go Training golang

If you are coming to Go after using a programming language like C# or Java, the first thing you will discover is that there are no traditional collection types like List …

Published

Aug 20, 2013

-

10 min read

Using C Dynamic Libraries In Go Programs

go Training golang

My son and I were having fun last weekend building a console based game in Go. I was recreating a game from my youth, back when I was programming on a Kaypro II. I loved …

Published

Aug 15, 2013

-

11 min read

Understanding Slices in Go Programming

go Training golang

Since I started programming in Go the concept and use of slices has been confusing. This is something completely new to me. They look like an array, and feel like an …

Published

Aug 8, 2013

-

10 min read

Using Time, Timezones and Location in Go

go Training golang

I ran into a problem today. I was building code to consume NOAA’s tide station XML document and quickly realized I was in trouble. Here is a small piece of that XML …

Published

Aug 5, 2013

-

15 min read

Gustavo's IEEE-754 Brain Teaser

go Training golang

Back in June, Gustavo Niemeyer posted the following question on his Labix.org blog: Assume uf is an unsigned integer with 64 bits that holds the IEEE-754 representation …

Published

Jul 29, 2013

-

2 min read

An RSS Feed Searching Framework Using Go

go Training golang

This article was written for and published by Safari Books Online Back in May, I finally decided that it was time to move away from the Microsoft stack to Linux. The cost …

Published

Jul 27, 2013

-

1 min read

An Open Source Debate

go Training golang

This article was written for and published by Safari Books Online If you read my article titled Analyze Data With MongoDB and Go, then you will understand the context of …

Published

Jul 27, 2013

-

10 min read

Understanding Pointers and Memory Allocation

go Training golang

In the documentation provided by the Go language team you will find great information on pointers and memory allocation. Here is a link to that documentation: …

Published

Jul 24, 2013

-

1 min read

Analyze Data With MongoDB and Go

go Training golang

This article was written for and published by Safari Books Online My company is building a mobile application called Outcast. The idea behind Outcast is to give people …

Published

Jul 20, 2013

-

1 min read

OSCON 2013 - The Gophers Are Coming

go Training golang

On June 22nd through the 26th, Portland Oregon is hosting OSCON (Open Source Convention). The event is run by O’Reilly. After looking at the speakers list it …

Published

Jul 12, 2013

-

11 min read

Understanding Type in Go

go Training golang

When I was coding in C/C++ it was imperative to understand type. If you didn’t, you would get into a lot of trouble with both the compiler and running your code. …

Published

Jul 10, 2013

-

7 min read

Object Oriented Programming in Go

go Training golang

Someone asked a question on the forum today on how to gain the benefits of inheritance without embedding. It is really important for everyone to think in terms of Go and …

Published

Jul 6, 2013

-

7 min read

Singleton Design Pattern in Go

go Training golang

Multi-threaded applications are very complicated, especially when your code is not organized and consistent with how resources are accessed, managed and maintained. If …

Published

Jul 5, 2013

-

8 min read

How Packages Work in Go

go Training golang

Since I started writing code in Go it has been a mystery to me how best to organize my code and use the package keyword. The package keyword is similar to using a …

Published

Jun 24, 2013

-

13 min read

Running Go Programs as a Background Process

go Training golang

I have been writing Windows services in C/C++ and then in C# since 1999. Now that I am writing server based software in Go for the Linux OS I am completely lost. What is …

Published

Jun 17, 2013

-

3 min read

Reading XML Documents in Go

go Training golang

I was really surprised how easy it was to read an XML document using the encoding/xml package that comes with the standard library. The package works by defining structs …

Published

Jun 13, 2013

-

3 min read

Send an email in Go with smtp.SendMail

go Training golang

I wanted to send an email from my TraceLog package when a critical exception occurred. Fortunately Go’s standard library has a package called smpt which can be …

Published

Jun 11, 2013

-

5 min read

Go's time.Duration Type Unravelled

go Training golang

I have been struggling with using the Time package that comes in the Go standard library. My struggles have come from two pieces of functionality. First, trying to …

Published

Jun 8, 2013

-

14 min read

Understanding Defer, Panic and Recover

go Training golang

I am building my TraceLog package and it is really important that the package logs any internal exceptions and prevents panics from shutting down the application. The …

Published

Jun 5, 2013

-

8 min read

Documenting Go Code With Godoc

go Training golang

As you know if you read my blog, I have been building a set of new utility packages so I can start developing an application server I need for a new project. I am brand …

Published

Jun 2, 2013

-

3 min read

Installing Go, Gocode, GDB and LiteIDE

go Training golang

Check out my new installtion document: https://www.ardanlabs.com/blog/2016/05/installing-go-and-your-workspace.html I removed the sections about gocode and GDB. These are …

Published

May 31, 2013

-

8 min read

Thread Pooling in Go Programming

go Training golang

After working in Go for some time now, I learned how to use an unbuffered channel to build a pool of goroutines. I like this implementation better than what is …

Published

May 31, 2013

-

4 min read

Why Go Programming

go Training golang

For the past 20 years I have been writing server based and application software on the Microsoft stack. First in C/C++ leveraging the Win32 API and then in C# when .Net …