Technical Writing
Below are the programming-related articles I’ve written (see also my non-technical writings). The list includes the guest contributions I’ve written for LWN.net, and tech blog articles for several of the companies I’ve worked for.
2024
- Go version performance (2024 edition) uses GoAWK to show how the speed of Go programs has improved from version 1.0 through to 1.22. (April)
- The One Billion Row Challenge in Go presents my nine Go solutions to this problem, which range in running time from 1m45s down to 3.4s. (March)
- Switching from S3 to Tigris on Fly.io describes how I moved my side project from using Amazon S3 for file hosting to using Tigris. (February)
- Stray Pointers interview: Jim Lawless interviewed me on his podcast (this is a transcription). We discuss Forth, C, CGI, Python, Go, and AWK. (January)
2023
- Generate text using a simple Markov chain algorithm in Python for fun and almost certainly no profit. (November)
- How (not) to apply for a software job gives advice for writing a software job application and resume/CV. (September)
- The AWK book’s 60-line version of Make discusses the minimal Make program in The AWK Programming Language and my Python port of it. (September)
- Using the WordStar diamond in 2023 explains the “Wordstar diamond” and how you can still use these key bindings from the 1970s on modern systems. (August)
- Name before type explains why a variables’s name should come first in declarations, for example
age int
instead ofint age
. (August) - The proposal to enhance Go’s HTTP router looks at Jonathan Amsterdam’s proposal to enhance
http.ServeMux
to match HTTP methods and wildcard paths. (July) - Gogit is just enough of a Git client to create a repo, commit, and push itself to GitHub, written in a scripting style. (July)
- Names should be as short as possible while still being clear is my variable naming philosophy. (July)
- File structure != API shows how decoupling file structure from a Python package’s API makes it nicer to use. (June)
- Designing Pythonic library APIs describes principles I’ve found useful for designing good Python library APIs. (June)
- From Go on EC2 to Fly.io is about how I moved my Go-based side projects from Amazon EC2 to Fly.io, simplified deployment, and saved $9 a month. (February)
2022
- Code coverage for your AWK programs describes GoAWK’s code coverage support, which was contributed by Ukranian developer Volodymyr Gubarkov. (December)
- I/O is no longer the bottleneck in 2022, and hasn’t been for a while. Disk I/O is fast, and this article provides some numbers. (November)
- microPledge was the Kickstarter-like startup we launched in 2007. This is a discussion of why it failed and what we learned. (November)
- Rob Pike’s simple C regex matcher in Go looks at my translation of Pike’s elegant regex matcher from C to Go. (August)
- Tools I use to build my website describes how I build
benhoyt.com
with GitHub Pages, Jekyll, a simple HTML+CSS layout, Sublime Text, and Sublime Merge. (August) - Modernizing AWK by adding CSV support discusses why and how I added proper CSV support to GoAWK, my POSIX-compatible AWK interpreter. (May)
- Prig is for Processing Records In Go. It’s a text processing tool like AWK, but it uses Go as the scripting language. (February)
- Go version performance charts how much the performance of Go has improved from version 1.2 through to 1.18 – in its compiler, runtime, and libraries. (February)
- Optimizing GoAWK describes how I made GoAWK faster by switching from tree-walking to a bytecode compiler with a virtual machine interpreter. (February)
2021
- AWKGo, an AWK-to-Go compiler describes a simple compiler that translates a subset of the AWK text processing language into Go source code. (November)
- Improving the Go RESTful API tutorial describes my re-implementation of the code from an official Go tutorial, making it more robust and maintainable. (November)
- Simple Lists describes a tiny to-do list app I wrote the old-school way: server-side Go that renders HTML, and no JavaScript. (October)
- Structural pattern matching in Python 3.10 is a critical but informative look at this new feature, with real-world code examples. (September)
- Mugo is a toy, single-pass compiler for a tiny subset of Go – just enough to compile itself. It compiles to x86-64 assembly on Linux. (April)
- How to implement a hash table explains how to implement a simple hash table data structure, with code and examples in the C programming language. (March)
- Performance comparison of counting and sorting word frequencies in various languages: Python, Go, C++, C, AWK, Forth, Rust, and others. (March)
- The small web is beautiful: a vision for the “small web”, small software, and small architectures. Also, a bonus rant about microservices. (March)
- Coming in Go 1.16: ReadDir and DirEntry: A look at the new
os.ReadDir
function coming in Go 1.16, with a comparison toos.scandir
in Python. (January)
2020
- Fuzzing in Go is an overview of fuzz testing and the go-fuzz tool, as well as a look at the recent draft design for including fuzz testing in the
go
tool. (August, LWN.net) - Searching code with Sourcegraph looks at Sourcegraph, a code search and code intelligence tool. (August, LWN.net)
- Different approaches to HTTP routing in Go compares routing techniques, including five custom approaches and three using third-party routing libraries. (July)
- Go filesystems and file embedding presents the draft designs for a filesystem interface and a standard way to embed files in a Go binary. (July, LWN.net)
- The sad, slow-motion death of Do Not Track talks about the valiant but almost-dead 10-year effort to prevent tracking with the “
DNT: 1
” header. (July, LWN.net) - What’s new in Lua 5.4 covers exactly that. (July, LWN.net)
- An overview of Hugo, a flexible static website generator written in Go and optimized for speed. (July, LWN.net)
- Generics for Go gives some background, the current state, and potential timeline for including generics in the Go programming language. (July, LWN.net)
- More alternatives to Google Analytics looks at some heavier replacements for Google Analytics, as well as the GoAccess log-based analytics tool. (June, LWN.net)
- Lightweight Google Analytics alternatives discusses what Google Analytics tracks, and presents two lightweight alternatives: GoatCounter and Plausible. (June, LWN.net)
- Intro to Go is a brief introduction to Go for programmers who haven’t used Go before: Why use it? The standard library. And the language itself. (June)
- ZZT in Go describes my port of Adrian Siekierka’s “Reconstruction of ZZT” to Go, done in a semi-automated way using a Pascal-to-Go converter. (May)
- Testing in Go: philosophy and tools describes the minimalist philosophy of testing in Go and the built-in testing tools. (May, LWN.net)
- The state of the AWK surveys the AWK landscape, looks at new features in GNU Awk, and discusses why AWK is still relevant in 2020. (May, LWN.net)
- What’s coming in Go 1.15 is an overview of what’s coming in the Go 1.15 final release in August 2020. (May, LWN.net)
- Don’t sanitize input shows why you shouldn’t try to sanitize user input; instead, escape output correctly. (February)
- SEO for Software Engineers goes over the basics of Search Engine Optimization, written for software developers. (February, Compass.com)
2019
- Fast Cloudfront log queries shows how to use AWS Lambda to partition your Cloudfront logs for faster querying via Athena. (December, Compass.com)
- Learning Elm describes how I ported a medium-sized web frontend from React to Elm and had fun with a pure functional language in the process. (October)
- Replacing Google Analytics with GoAccess describes how I replaced Google tracking with simple log-based analytics on my personal website. (April)
2018
- GoAWK is an AWK interpreter written in Go, and this article describes how I wrote it, tested it, and measured and improved its performance. (November)
- LoxLox is an interpreter for Crafting Interpreters’ Lox programming language written in Lox! (October)
- Writing good commit messages looks at why quality commit messages are important and how to write them. (September, Compass.com)
2017
- Littlelang is a dynamically-typed programming language I designed and wrote an interpreter for in Go (and in littlelang itself!). (December)
- Learning Go describes how I learnt the basics of Go (its good parts as well as a few quirks) by porting a medium-sized web backend from Python. (November)
- Pentomino puzzle solver uses Python code generation to find all 2339 tilings of the 12 free pentominoes on a 6x10 board. Based on my dad’s Forth version. (July)
- pyast64 is a toy (but working) compiler that turns Python syntax into x86-64 assembly using Python’s built-in AST module. (June)
- pygit implements just enough of a Git client (in 500 lines of Python) to create a repo, commit, and push itself to GitHub. (April)
- Two kinds of speed responds to dynamic-typing dislike with some reasons I think dynamically typed languages like Python are still a good idea. (April)
- Duplicate image detection with perceptual hashing in Python describes a simple algorithm to detect duplicate or very similar images. (March, Jetsetter.com)
- Developing GiftyWeddings.com explains how I got started with my wedding gift registry website and also describes the 2016 revamp I gave the site. (January)
2016
- Contributing os.scandir() to Python describes my experience contributing a medium-sized feature to the Python 3.5 standard library. (August)
2015
- Using Ansible to restore developer sanity talks about how we went from a deployment including 28 manual steps to a single Ansible command. (July, Oyster.com)
2013
- Saving 9 GB of RAM with Python’s __slots__ describes the huge memory savings we got using
__slots__
on a single class. (November, Oyster.com) - Yes, my credit card number does have spaces! rants about payment forms that don’t allow you to type the spaces in your credit card number. (July, Brush.co.nz)
- OpenSSL hangs CPU with Python <= 2.7.3 on Windows details a serious bug in an older version of OpenSSL that causes O(N2) behaviour. (April, Oyster.com)
- An arm wrestle with Python’s garbage collector describes how we eliminated 4.5 second stop-the-world GC pauses. (January, Oyster.com)
- Masterminds of Programming reviews an excellent book that interviews the creators of 17 important programming languages. (January, Brush.co.nz)
2012
- C#’s async/await compared to protothreads in C++ looks at how two very different async constructs unroll to state machines in a similar way. (November, Brush.co.nz)
2011
- CherryPy, ctypes, and being explicit details a bug in CherryPy on Windows due to lack of
ctypes
argument types. (October, Oyster.com) - How our photo search engine really works describes how I wrote Oyster’s photo search engine. (July, Oyster.com)
- Should you use C++ for an embedded project? asks some hard questions about C versus C++ in small embedded systems. (January, Brush.co.nz)
2010
- C++ for C programmers, part 2 of 2 introduces the object-oriented features of C++, for C programmers. (August, Brush.co.nz)
- C++ for C programmers, part 1 of 2 introduces the non-OO features of C++, for C programmers. (May, Brush.co.nz)
- Why I’m not moving to Linux just yet gave the reasons I wasn’t about to switch to Linux in 2010, notably poor font rendering and inconsistent UI. (April, Brush.co.nz)
2009
- Go Forth and WikiReadit asks Christopher Hall, one of the main software developers of the WikiReader, why he chose Forth for testing and sub-apps. (December, Brush.co.nz)
- Code generation with X-Macros in C describes X Macros, a little-known but very useful way to use the C preprocessor to initialize code and data. (August, Brush.co.nz)
- Blast from the demoscene past recalls the demoscene and two reasons that kind of coding still matters today. (June, Brush.co.nz)
- Knuth, goto, Python, and OOP shows how Donald Knuth predicted modules, Python-like use of indentation, and object-oriented programming. (April, Brush.co.nz)
- Cracking an INI file with a jackhammer looks at some bloated INI file parsers in C and C++, then introduces my own,
inih
. (February, Brush.co.nz) - RAII, AC/DC, and the “with” statement explains RAII in C++, and why it’s a terrible acronym. (February, Brush.co.nz)
2008
- Helvetica: can a font be a film? talks about Arial versus Helvetica, and about the film Helvetica. (September, Brush.co.nz)
- Protothreads and C++ introduces my port of Adam Dunkels’ protothreads to C++. (July, Brush.co.nz)
- Thank you, Adobe Reader 9! is satire about how bloated Adobe Reader had become, even in 2008. (July, Brush.co.nz)
- Can modern software be snappy? discusses how software is slower and more bloated than ever, despite increasingly powerful computers. (June, Brush.co.nz)
- SOAP won’t make you clean talks about horribly complex SOAP APIs. (February, Brush.co.nz)
- Link rot, soft 404s, and DecentURL describes a method for detecting “soft 404s”, not-found pages which don’t return HTTP 404. (January, Brush.co.nz)
- Ten quirky things about Python lists, um, ten quirky things about Python. (January, Brush.co.nz)
2007
- Recursive decent parsing [sic] shows how to turn a simple BNF grammar into code. (November, Brush.co.nz)
- Ten things I love && hate about C has a pretty self-explanatory title. (October, Brush.co.nz)
- nobraces: Python indentation for C is a fun program that allows you to use Python-like indentation in C. (September, Brush.co.nz)
- Learning to write from Mr Green talks about clear writing versus business jargon. (September, Brush.co.nz)
- The Case for case sensitivity counters Jeff Atwood’s diatribe against case sensitivity in programming languages. (July, Brush.co.nz)
- How did you learn to program? describes how I got into programming as a teenager. (June, Brush.co.nz)
1997
- Lookup Tables is an article about lookup tables in Forth that I co-authored with Hans Bezemer when I was 16. My first published technical writing. (September)
Copyright
Unless it says otherwise in the individual document, the works above are © Ben Hoyt under a Creative Commons BY-NC-ND license, which basically means you can copy and share them freely, as long as you link back to benhoyt.com, don’t make money with them, and don’t alter the content. Enjoy!
I’d love it if you sponsored me on GitHub – it will motivate me to work on my open source projects and write more good content. Thanks!