Going Go Programming Recent Posts


The Behavior Of Channels

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 that provided automatic synchronized access between goroutines. This structural understanding caused me to write a lot of bad and complicated concurrent code. I learned over time that it’s best to forget about how channels are structured and focus on how they behave.

Interface Semantics

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 principles: 1) Language Mechanics On Stacks And Pointers 2) Language Mechanics On Escape Analysis 3) Language Mechanics On Memory Profiling 4) Design Philosophy On Data And Semantics In particular, the idea of value and pointer semantics is everywhere in the Go programming language.

For Range Semantics

Prelude These are good posts to read first to better understand the material presented in this post: Index of the four part series: 1) Language Mechanics On Stacks And Pointers 2) Language Mechanics On Escape Analysis 3) Language Mechanics On Memory Profiling 4) Design Philosophy On Data And Semantics The idea of value and pointer semantics are everywhere in the Go programming language. As stated before in those earlier posts, semantic consistency is critical for integrity and readability.

Design Philosophy On Data And Semantics

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 Go. This post focuses on data and the design philosophies of applying value/pointer semantics in your code. Index of the four part series: 1) Language Mechanics On Stacks And Pointers 2) Language Mechanics On Escape Analysis 3) Language Mechanics On Memory Profiling 4) Design Philosophy On Data And Semantics

Language Mechanics On Memory Profiling

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 value/pointer semantics in Go. This post focuses on heaps and escape analysis. Index of the four part series: 1) Language Mechanics On Stacks And Pointers 2) Language Mechanics On Escape Analysis 3) Language Mechanics On Memory Profiling 4) Design Philosophy On Data And Semantics

Language Mechanics On Escape Analysis

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 value/pointer semantics in Go. This post focuses on heaps and escape analysis. Index of the four part series: 1) Language Mechanics On Stacks And Pointers 2) Language Mechanics On Escape Analysis 3) Language Mechanics On Memory Profiling 4) Design Philosophy On Data And Semantics

Language Mechanics On Stacks And Pointers

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 value/pointer semantics in Go. This post focuses on stacks and pointers. Index of the four part series: 1) Language Mechanics On Stacks And Pointers 2) Language Mechanics On Escape Analysis 3) Language Mechanics On Memory Profiling 4) Design Philosophy On Data And Semantics

Design Philosophy On Logging

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 do so first: Develop Your Design Philosophy Introduction Systems 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 develop reliable systems.

Package Oriented Design

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 haven’t read these posts yet, please do so first: Develop Your Design Philosophy Design Philosophy On Packaging Introduction Package Oriented Design allows a developer to identify where a package belongs inside a Go project and the design guidelines the package must respect.

Design Philosophy On Packaging

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 do so first: Develop Your Design Philosophy After this post, read this next one: Package Oriented Design Introduction In an interview given to Brian Kernighan by Mihai Budiu in the year 2000, Brian was asked the following question: