String Buiding The Complete Works of Shakespeare

I was recently looking at some of the top selected answers for this problem on code wars and noticed a lot of string concatenation happening. While this may be pragmatically ok for small toy examples, if you are going to use string concatenation in a for loop iterating over anything but a small set, you’re probably going to have a bad time. To highlight this problem, imagine this contrived program that:...

September 12, 2024

Book Review - 100 Go Mistakes and How To Avoid Them by Teiva Harsanyi

After seeing several posts on the /r/golang subreddit, e.g. this one, sing this book’s praises, I decided I better give it read. It also has pretty solid reviews on good reads. There are so many ways to do things in programming, that I admit I found the catchy title engaging - I definitely want to know what I should not be doing! It turns out, there was a lot of things I’ve done in the past that have not been ideal....

August 3, 2024

The Wonderful World of Hashes

Hashes have always been a fascinating class of algorithms to me due to their following characteristics: Fixed output size - the ability to give a function some input, whether the single character “A” or the entire works of Shakespeare, and get a fixed length output is just plain neat Deterministic - you get the same result given the same input One-way functions - it is difficult, and in the case of cryptographic hash functions, computationally infeasible to reverse the hash to get the original input These characteristics unlock all kinds of useful problem-solving mechanisms....

August 1, 2024

Transpiled Go & The Awful German Language

Several years ago I decided to run an experiment. I had a few humble goals: Experiment with Gopherjs - a transpiler that converts Go code to JavaScript Create a few simple exercises to improve my German Leverage Cloudflare for free TLS to give me the s in https, and so I don’t have to muck with certificates Use a bootstrap to make the site look not completely terrible Host an interactive web page on AWS with ec2 and Route 53 with a Go backend to serve the pages and provide server-side validation for the exercises on the site Thus, the https://theawfulgermanlanguage....

July 30, 2024