Improving a Go HTTP Server: Unit Tests, Middleware, and Subrouters

2025-03-28
Improving a Go HTTP Server: Unit Tests, Middleware, and Subrouters

This blog post details improvements made to a Go HTTP server built from scratch. The author added unit tests, addressed reader feedback regarding case-insensitive headers and multiple header values, and improved handling of response streams and larger payloads. Key additions include middleware support for cleaner code and subrouters for enhanced route organization. The post showcases iterative development and practical problem-solving in Go.

Read more
Development

30 Euros to Stay Accountable: A Productivity Hack

2025-03-06
30 Euros to Stay Accountable: A Productivity Hack

Frustrated by infrequent blogging, the author adopts a unique productivity hack: a self-imposed 30-euro penalty for failing to publish a blog post each month. Inspired by the idea that consistent, lower-stakes output is better than infrequent, high-pressure posts, this commitment motivates him to write regularly. He extends this system to painting miniatures, aiming for 52 blog posts and 60 painted miniatures by year's end. The author plans to report back on the results and expand this method to other projects.

Read more