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 is a Pure Function? According …

The Proper Use of Pointers in Go (golang)

Go has become increasingly popular in recent years, especially in my local area. Go 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 memory directly using pointers end …

Documentation Sucks and You Probably Do it Too Much

I often hear that more and better documentation is needed 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 When given a piece of code to work with, developers typically take the path of …

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, where calculations are handled differently depending on the input variables. However, complex and nested if/else statements become a cognitive burden to reason about, and can be hard for the next developer to understand quickly. Guard Clauses …