Last week I decided I would learn Rust, and Advent of Code was how I was gonna go about it. I was full of vim and vigour, optimistic about being able to catch up (I started a day late) and looking forward to daily exercises. Fuck yeah! Let’s do this! 🦀

But after spending most of my weekend trying to build momentum, all that optimism I started out with began to fade away, and was replaced by a palpable sense of frustration and despair.

A stressed out man holding his head in his hands

My ego took a real hit. After all, I’ve been writing software for more than 2 decades. I’ve shipped software in more than a few languages. How hard can it be to learn another one?

Well, it turns out it can be really hard. Especially when you only have yourself to blame for making the whole experience 10 times harder than it needed to be.

By this point you’re probably asking yourself “What exactly did he do wrong?”. Oof, where do I start…?

Changing IDE for the wrong reasons

I’ve been an Intellij guy since 2007. Back then it was just Java I was writing, but over the years I’ve used the Ultimate Edition to develop tonnes of things, such as:

  • backends in Kotlin, PHP, Javascript, Typescript, Python, Go
  • frontends in Javascript and Typescript
  • Android apps
  • Terraform scripts for ops
  • Nix configs
  • shell scripts for gluing together all the things!

For me Intellij is the one IDE to rule them all, and I’ve been a happy paying user for my entire professional career. That was, until I was introduced to Nix.

For reasons that I won’t go into right now, getting Intellij to play nice with Nix is a bit difficult at times.

Admittedly an element of this is my understanding of Nix; I am by no means an expert just yet. But the short version is that I was having problems getting Intellij to play nice with Rust on my Desktop (NixOS) and Macbook (using nix-darwin).

And rather than spend the time to understand the problem and get Intellij working with Rust in my Nix based environment, I made the rather naive and short-sighted decision that I would combine learning Rust with adopting a TUI based development setup.

Cognitive Overload

I’ve been curious about TUI based development for a while now, motivated in part because there’s generally less friction with them in a Nix based environment.

And over the last few months I’ve been looking for ways to better leverage my powerful desktop when I’m not at home, or run bespoke development environments in the cloud, and for these use cases a TUI based environment has several benefits.

But fuck me, choosing to go TUI at the same time as trying to learn Rust all because I didn’t want to spend the time to figure out the issues with Intellij… well that was a dumb move.

Very quickly, as the title says, I hit cognitive overload.

What I grossly under-estimated was how much of what I do is automatic. I look at the screen, think about what I want to be there, and it appears. My fingers operate on a background thread leaving most of my brain free to focus on the task at hand.

That task should have been learning Rust 🦀.

But instead I was constantly fighting with my new and unfamiliar setup, and that was taking a toll.

Learning how I learn

Despite tying one hand behind my back and standing on one leg I was making some progress. Not a lot, but some. And through the fog of frustration and exasperation I started to realise something: I don’t actually like Advent of Code 😅.

Don’t get me wrong, I think it is, and has been a good thing for many people, and there is plenty of evidence to back that up. But I learned this week that directed learning exercises, which Advent of Code is, do not fit well with how I personally learn best.

And the reason why is simple: I learn on the job.

Since completing my Computer Science degree many moons ago, everything I know about how to make ‘puters go brrr has been learned in one way or another as the direct result of needing to do something.

So when I’m reading a spec talking about Santa’s Elves (AOC is Xmas ❄️ themed obviously) traversing the jungle playing games like Rock, Paper, Scissors etc. right out of the gate my brain is like: what the fuck are we doing this for?

I get that it’s a means of gently introducing problems that will require figuring out how to use enums etc in the language you’ve chosen to learn. But it’s an approach I’ve come to understand that I just don’t switch on to.

So when you combine that with the aforementioned cognitive overload, well you have a recipe for a right clusterfuck.

Going forward

I still want to learn Rust 🦀 … I will learn Rust 😄.

As I mentioned in my previous post, there are things I want to do and Rust appears to be the best way of doing them.

But instead of following a directed learning exercise like AOC, I’m just gonna start getting my hands dirty. I’ve already been making small commits to projects like Treefmt, and I’ll have a look around for some more small projects like that and see if I can lend a hand.

Before I do any of this though… I’m gonna fix my setup with Intellij, like I should have done in the first place!