Polymatheia

On Expectations and Fun

posted

The first post I ever made on this blog was about Swearjure, a completely useless but quite fun exploration of what you can do with Clojure if you make all alphanumeric characters illegal. In the Clojure IRC channel back in the day, I explored this with Gary Frederics and Tim McCormack, and thought it was worth it to summarise our “findings” for others to explore.

Since I finally had a blog, I started blogging a bit about other things, not really thinking hard about a particular style or what I wanted the blog to be about. Exactly the current shape and style kind of crystallised when I started preparing my master’s thesis.

A Life of its Own

After I started university, I found out that I had a knack for algorithms and data structures. I also played with Clojure on the side and enjoyed it quite a lot. So for my master’s thesis, I went out and looked for things I could do related to both Clojure and data structures, and ended up exploring both the persistent vector in Clojure and the RRB-tree.

At that point, there weren’t any great blogs or papers on either. The core RRB-tree paper was very sparse, probably as it was aimed to get into a journal. As a result, a proper explanation of why it worked was left as an exercise to the reader.

The same applied to Clojure’s persistent vectors: How they worked under the hood wasn’t properly documented anywhere. And as I deciphered the code for my master’s thesis, I thought it made sense to write it down as a series of blog posts, in the hopes that it would benefit others.

The series was very well received, and I still get emails to this day from people that say they enjoy it. I followed the series up with a very detailed post on how to make the existing Clojure version even faster: I uncovered a bunch of different tricks and ideas during my master’s thesis on the RRB-tree, and some of them could be ported back into the persistent vector.

All of this “cemented” the idea that my blog is a place to learn about data structures. That has changed a bit lately (by which I mean the last… four years), as I have explored how ideas in Go, Haskell & Clojure can be translated and used in the other languages. But there’s still a lot of work and research behind these posts, and they tend to reach some sort of conclusion.

That’s very different from experience reports and howtos, which I have done more of in the last year. And lately, I have been thinking about making more open-ended and exploratory posts, and perhaps even posts about other hobbies of mine.

Of course, nothing’s stopping me from making more exploratory posts, but I want the reader to know whether this is more thorough and conclusive, or if it is exploratory. That’s why I have decided to split all my posts into two categories: Thinkies and Reflections. Thinkies consist more of diary-like posts, howtos, and notes on small system design considerations. Reflections, on the other hand, are more thorough pieces of work where I have used more time on research and thinking.

I’m not entirely sure that’s the best way to categorise my posts long-term. Perhaps Julia Evans’s post Organizing this blog into categories can be a suitable target once I have more posts.

A Stepping Stone for Yourself or Others

I think “incomplete” exploratory posts are great. There are tons of posts saying you should write more, and while I think their rebuttal of the “this has been said before” critique is valid, I also think there are more reasons to write things that aren’t novel.

For starters, the Internet is vast, and you will reach people that the other posts won’t. But there are other things your post can do to people that other posts won’t. Perhaps this post is the one that gets them to explore the area a bit more, or maybe this is the post that validates an idea they themselves have.

Or it could be that your idea is bad and that people will explain why it’s bad. That may hurt a bit initially, but getting constructive feedback ASAP is better than getting it after spending a couple of months on something futile.

On the flip side, I think praises and nods to posts you have made could inspire you to explore and continue the work further. For some time I thought that this would be counter to the announcing your goals studies, which claim that you’ll be less likely to reach your goals if you announce them. But a post is not a goal, nor does it have to be – especially if it is exploratory and open-ended!

Playfulness is Good

I also think posts playing around with an idea to its extreme are underappreciated. Aphyr has some excellent “interview” posts (for example Unifying the Technical Interview) where he goes to great lengths to reverse a linked list in the most nonobvious ways you can imagine.

Speedrunning games is also a great example of playfulness. In and by itself, doing specific steps to complete a game as fast as possible is not very educational. However, trying to find glitches to speed up a speedrun can both be very educational for the one looking for glitches, but also for people trying to understand them.

Consider, for example, parallel universes in Super Mario 64. That glitch will make people understand more about 16-bit signed integers and integer overflows. Other glitches will either make them learn how games are/were designed, and/or how the underlying hardware works.

Some speedrunners and glitch hunters even take it to the next level: They make tools to explore the console’s RAM while the game is running, making tools to speedrun for them, etc etc. Sometimes, sharing your glitch can make people go “aha!” and combine it with their own glitch to speedrun the game even faster.

There was a moment like that in Swearjure’s history as well. We had a hunch that Swearjure was Turing complete, but with the tools that we had, we couldn’t formally prove it. Then one day, Alex Engelberg tweeted about a trick he found where he could nest anonymous functions. I’ll spare you the details (there’s a blog post if you’re interested), but that was the missing piece we needed to prove that Swearjure is Turing complete.

We’ve also made small silly programs related to Swearjure, even a valid interpreter in Haskell as using Clojure proper usually tends to blow up the stack.

While the speedrunning community is orders of magnitude larger than the Swearjure “community”, there are some interesting properties both share: One group has accidentally become experts on console behaviour, game designs and debug tooling. The other has accidentally become experts in Clojure reader internals, nested macros and gensym generation inside Clojure.

I don’t think anyone would go into either community with the aim of getting better at those skills though. It just so happens that you find something fun to play around with, and pulling at that thread makes you explore it more and more. And sometimes, those explorations can yield something of value for more people than just you.

And it’s a bit easier to do that when everyone’s expectations are aligned. My hope is that the category split will make it easier for me to write more small, fun and exploratory blog posts, without feeling that they have to be novel or of high quality.