Benchmarking Array Traversal in Javascript – Going Backwards is Fastest

There are many ways to traverse an array in Javascript. In this benchmark, we will look at five different ways and the pros and cons of each. Keep in mind that these benchmarks were run in a Chrome browser on Codepen. Results will vary by browser/interpreter. For a working example of these benchmarks, take a look at this codepen: https://codepen.io/lane-c-wagner/pen/GRRGryr. …

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 …

How to: Global Constant Maps and Slices in Go

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 global constant slice or map. The go compiler doesn’t allow these more complex types to be set as constant. Many developers, upon making this realization, decide to then use a dangerous global variable. …

Learning Some Computer Science will Make You a Better (And More Expensive) Engineer

Software Engineering != Computer Science Software engineering is the process of analyzing user needs and designing, constructing, and testing end user applications that will satisfy these needs through the use of software programming languages Techopedia Computer Science is the science that deals with the theory and methods of processing information in digital computers, the design of computer hardware and software, …

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 …