/Ben Hoyt

The One Billion Row Challenge In Go: From 1m 45s To 4s In Nine Solutions tl;dr: “This article describes the nine solutions I wrote in Go, each faster than the previous. The first, a simple and idiomatic solution, runs in 1 minute 45 seconds on my machine, while the last one runs in about 4 seconds. As I go, I’ll show how I used Go’s profiler to see where the time was being spent.”

featured in #494


Name Before Type: Why ‘age int’ Is Better Than ‘int age’ tl;dr: Ben advocates for placing a variable's name before its type in programming language declarations, as seen in languages like Go and Rust. The author argues that the name holds more semantic meaning and should be more prominent, enhancing code readability. Examples from Go illustrate the benefits of this approach. The author calls for future language creators to adopt the name-before-type syntax for clarity and understanding.

featured in #437


Names Should Be As Short As Possible While Still Being Clear tl;dr: “Some developers do use names that are too short. However, I think the more common mistake is using names that are overly long.” Ben illustrates this point, and the importance of naming in context, using examples.

featured in #430


I/O Is No Longer The Bottleneck tl;dr: "When interviewing programmers, I often ask them to code a simple program to count word frequencies in a text file. It’s a good problem that tests a bunch of skills, and with some follow-up questions, allows you to go surprisingly deep. One of the follow-up questions I ask is, “What’s the performance bottleneck in your program?” Most people say something like “reading from the input file”." Ben discusses why that's not usually the case.

featured in #370


Rob Pike’s Simple C Regex Matcher In Go tl;dr: "Back in 1998, Rob Pike – of Go and Plan 9 fame – wrote a simple regular expression matcher in C for The Practice of Programming... With Go’s C heritage, and Pike’s influence on the Go language, I thought I’d see how well the C code would translate to Go, and whether it was still elegant.

featured in #343


An Intro To Go For Non-Go Developers tl;dr: A brief overview of the standard library and language features. 

featured in #185