This week
- How many millions of times have you seen this pattern in Go where a variable is pre-created just to make a pointer to it down the line? There is a high chance your codebase includes a utility to do that. // Something like this a := 123 aPtr := &a // Or like this func Pointer[T...
About a month ago
- I’ve been exploring Go for building small, fast and self-contained binary applications recently. I’m enjoying how there’s generally one obvious way to do things and the resulting code is boring …
- Go has several ways of sending requests, including some convenient methods such as:http.Get()http.Head()http.Post()http.PostForm()However, these don’t let you add headers to requests! If you need customization of the HTTP method or headers, you need to use...
- Basic Usage of time.Sleep()You can use time.Sleep() to pause your program for a predetermined amount of time, similar to most programming languages.First, you should know that the time package has useful constants that allow you to conveniently specify time in units.1 2 3 4 5 6...
about 2 months ago
- Go 1.26 is coming out in February, so it's a good time to explore what's new. The official release notes are pretty dry, so I prepared an interactive version with lots of examples showing what has changed and what the new behavior is.Read on and see!new(expr) • Type-safe error...
2 months ago
- Building a fair, cancelable semaphore in Go and the subtle concurrency issues involved....
- With a fresh set of analyzers and the same backend as go vet....
- Explore different types of leaks and how to detect them in modern Go versions....
- Compiling and running 'Hello, World!' in 20 programming languages....
3 months ago
- Discusses some design choices used in Jubilant: Python subprocess.run to wrap a CLI tool, a code generator to convert Go structs to Python dataclasses, and the use of uv with a simple Makefile to run commands....
- Interactive book on concurrent programming with auto-tested exercises....
- Automatically erase memory to prevent secret leaks....
- CPU cores, threads, goroutines, and the scheduler....
- errors.AsType is a modern alternative to errors.As....
- Export goroutine-related metrics from the Go runtime....
- Checking concurrent operations and time-sensitive code....
- Your computer runs tons of processes in the background, and pulling a plug out of a socket when it is in the middle of something is not a good idea. Doing that to your running service is also pretty risky, but this is precisely what happens when you terminate your running server...
4 months ago
- Connect to TCP, UDP, IP, or Unix sockets, with an optional timeout....
- I had a quick pair programming session with one of my colleagues. Can you imagine that Claude Code doesn’t need to be your only coding buddy? The validation rules needed a little tweak, so here is the piece of code I typed, and below is the version suggested by my friend....
- Having access to multiple parallel CPU cores isn't a new thing by any means, people have been programming in parallel for half a century now, but recent years we've found ourselves at an inflection point. Moore's law is dying, beefy single cores are no longer keeping up. Modern...
- The same way IANA and Python do....
5 months ago
- Concurrent-safe operations without explicit synchronization....
- Consistent approach to hashing and equality checks in custom collections....
- With version 1.0 released after 2010....
Rows per page