Diogo Lisboa

Devlog January 2025

This was the inaugural month for my “working sabbatical”.

The month actually started on the 9th for me as I was coming back from end-of-year vacations so it wasn’t a full month per se. To top it off I got sick on that vacation and then hurt at the gym back home so the month started off slowly.

Work

While currently not working I’m still very much in work mode and have a travel web product I’m working on in private. This is a long project but some progress has been made. I’m not entirely focused on it but I’m glad I’m managing to give it attention.

Topics

With so much freedom comes a difficulty to focus on one thing in particular. I jumped around reading about various topics, from parsers and compilers to type systems, network programming with Go, logic programming with Datalog. Even dabbled in some statically-compiled Scheme with Chicken scheme. Using Zotero for highlights and annotations has been a great way to retain some knowledge as I skim on these topics.

I’ve been using Notion to write small articles about things I’ve been learning. Writing is a great way to train your brain on a programming subject and clear your ideas about what’s good or bad about it, even if those small articles never get published.

Books and Articles

The main idea for the month was to finish Language Implementation Patterns (by Terrence Parr) but I got sidetracked with other interests. The plan is still to get back to it.

Things I’ve read

A few noteworthy reads this month:

Let’s Go, by Alex Edwards: had this one on the proverbial shelf for a while and had skimmed it a few times but I took a more serious read this time. I suppose it’s an intermediate-level book but it touches on some more “difficult” topics in backend Web development with Go. As with all programming books it can’t go too deep into the more interesting topics but the solutions it provides are good and makes for a decent reference. I have a list of "learnings" from the book that maybe are worth publishing in separate.

Go Concurrency Patterns: Context: I probably read this back when it was first published (2014) but got back to it to re-learn the history of the context package and its intended uses. Reading the source code for it was also enlightening, especially the trick with context keys as addresses to package-level vars:

var cancelCtxKey int
// ...
func parentCancelCtx(parent Context) (*cancelCtx, bool) {
    // ...
    p, ok := parent.Value(&cancelCtxKey).(*cancelCtx)
}

Watched Francesc Company’s talk in 2016 about nil in Go and that along with the Go FAQ explanation on nil errors filled a day of research into best practices with returning interfaces in go (such as error). Both are good material for more in-depth considerations on the topic.

Open Source

In mid-January Ian Lance Taylor opened a proposal issue for reducing Go’s if/err boilerplate. I’ve left some thoughts on this comment. The proposal has since been turned into a Github Discussion. My general opinion is I don’t see a problem with if/err boilerplate and to me it’s actually a good thing that error is seen explicitly as control flow in Go, one of the few languages that fully commited to that idea.

Repos

I’ve actually been on a good roll after recovering from the sickness earlier in the month.

I created an experiments repo to compile all the different little things I end up doing that are worth remembering for a future date. I’ve had a folder like this in one way or another for years (sometimes called study or scratch) and invariably I’d end up deleting all of it when it got too big. The result is I lost a whole bunch of thought and language experiments over the years. This repo is an attempt to rectify that and keep them around.

The theme helix-grayscale is a great one to improve focus when coding by eliminating distractions. This was inspired by watching Andrew Gerrand and Brad Fitzpatrick hacking without syntax highlighting. I’ve had minimal highlighting over the years but that opened my eyes to the possibility of having basically none.

awesome-zero-config is a compilation of great tools that work out-of-the-box, with none or minimal configuration necessary. It’s taken for granted how most power user tools require a lot of configuration to make them productive to oneself; we as programmers focus a lot on learning and customizing tools rather than just adapting to better tools with good defaults and workflow.

I got a few more that are still in private so the month’s haul is even better.

Helix

I’ve been using Helix as a daily editor this month. It felt like the right time to change from Vim/NeoVim. The adaptation is a bigger article but to just touch on the subject after a day or two it’s been very productive. Automatic zero-config LSP is a godsend and allowed me to just get to work and not get lost in the infinite possibilities of Lua scripting in NeoVim. I still make a lot of unecessary movements but I’ve been able to retrain my brain on Helix’s motions. I’m still scratching the surface on multicursors but I’ve been able to mostly replace my Vim macros usage with them.

Conclusion

All in all I’m happy with the month’s results. You always feel like you could’ve done more but having been able to produce some artifacts, either repos, learnings or articles, has been satisfying.