Purity in my Programming Please

Pure functions are often hyped up in the Javascript world, probably because of the abundance of state in front end applications. While pure functions have their downsides (i.e. inconvenience, potentially large argument lists), I believe they should be used as much as reasonably possible, and I want to focus on pure functions in Go. What … Read more Purity in my Programming Please

How to: Global Constant Maps, Slices, & Arrays in Golang

For the most part, Go developers are pretty good about using constants for global configuration, rather than global variables. A problem arises however when we want a constant slice, array, or map. The go compiler doesn’t allow these more complex types to be set as constant. Many developers, upon making this realization, decided to then … Read more How to: Global Constant Maps, Slices, & Arrays in Golang

Constants in Go vs Javascript, and When to Use Them

Constants can be confusing and easy to misuse in Go if you are coming from an untyped language. In this article we will learn what constants are, and when it is best to make use of them. Most of the points I make here apply to general-purpose programming languages as a whole, but by focusing … Read more Constants in Go vs Javascript, and When to Use Them

Systems and Processes that Aren’t in Code are Terrifying

The dreaded: You may recognize this as a unix cronjob, a job that is scheduled to run on a server periodically. You may be thinking, “Why is that scary? We use cronjobs all the time!” If the code that manages the crontab is source controlled and exists within the organization’s central repositories, then I actually … Read more Systems and Processes that Aren’t in Code are Terrifying

The Proper Use of Pointers in Go (golang)

Go has become increasingly popular in recent years, especially in my local area. It has been consistently displacing other backend languages like Ruby, Python, C# and Java. Go is wanted for its simplicity, explicitness, speed, and low memory consumption. Many developers that are new to the language, or new to a language that can handle … Read more The Proper Use of Pointers in Go (golang)

Documentation Sucks and You Probably Do it Too Much

I often hear that we need more and better documentation in the tech industry. I’ve since come to believe that most documentation is overrated. When Documentation Sucks Incorrect documentation is worse than no documentation, and redundant documentation is worthless. Let’s remove the chaff. Incorrect Documentation Developers typically take the path of least resistance when given … Read more Documentation Sucks and You Probably Do it Too Much

Guard Clauses: How to clean up Conditionals

One of the first techniques developers learn is the if/else statement. For obvious reasons if/else statements are a primary way to create logic trees. This is where we handle calculations differently depending on the input variables. However, complex and nested if/else statements become a cognitive burden to reason about. Therefore, it can be hard for … Read more Guard Clauses: How to clean up Conditionals