Save me Ferris, save me

Ferris, a cute crab, the unofficial Rust mascot - png from https://rustacean.net/

girl, why?

Starting this blog series - in which I work through The Rust Programming Language book - was motivated by a hell of a lot more than I initially thought before sitting down to finally write this up.

I originally bought a physical copy (which I vastly prefer for coding for some reason) back in 2021, something I attribute entirely to peer pressure. I used Twitter/X on and off for a little over a decade and for the last couple of years I was on that platform, after entering tech, I put a lot of effort into following LGBT+ peers. It was from them that I first started reading the praises about Rust, and to this day the correlation between being a part of both communities is still sometimes used lovingly as a meme.

According to my highlights, I made it about a third of the way through the book before the main concerns in my life took back over. Funnily enough the time and space to now dedicate to finally finishing it (and blogging about it along the way) comes when life has gotten even heavier than it was before; this effort is not only an unemployment boredom project, but also an attempt to actually find some joy in software again. The last year or two of being a web developer has been one of disillusionment, to say the least; while my personal politics have always been aligned with labor, the last thing I expected to be doing in my mid-30s was becoming a Neo-Luddite.

But to make a hard turn away from the grim-dark shit, the main reason why I wanted to start writing these up was that I hope it might be funny. There are quite a handful of reasons why I maybe shouldn't be doing this as a front-end developer with no CS background. (Which again is a testament to the amazing word of mouth PR that Rust gets.) I am also quite sure that some of these blogs are gonna make me look like a dumbass by exposing all the gaps in my knowledge and lack of variety in my experience with programming. It's my hope that I will at least come off as a loveable dumbass.

the hype and chapter 1: getting started

When people say that working as an engineer/developer is to choose a path of lifelong learning the default assumption of those who don't yet know any better is that the learning will only follow a narrow path centered on whatever language/s or framework/s used. You then start working professionally and the reality sets in that there is a hell of a lot swirling around in between you and finally typing shit out.

The amount of time you spend on things like tooling, ecosystem and workflow was not something that I had anticipated before switching into tech. It's a surprise I equally blame on brutal efficiency of code school and the fact that it's hard to replicate at home the sheer amount of things that can get piled on in work environment.

After a couple of years of wrestling with all those kinds of micro-infrastructure, in the confusing and fast-paced world of modern JavaScript no less, needless to say I was converted to someone who really gives a shit about developer experience.

Say this all to say that I really appreciate the how Chapter 1 starts from a place of orienting you with the entire ecosystem surrounding Rust instead of throwing you directly into code blocks.

More than anything that's what I'd read folks say about Rust, that not only was it a nifty language, but that what really set it apart was that it was purposely made to be a whole package kind of deal.

Chapter 1 walks you through the very quick and easy (even on Windows!) installation and basic tooling: get installed through rustup, make a file, compile it with rustc, run what pops out and bam there's the dopamine hit of making something print in your terminal. This is then topped off by an intro to Cargo, the build system and package manager which is as delightfully easy as it is delightfully named.

the standard hello world that you get after completing chapter 1

The closed nature of the entire toolchain is surprisingly refreshing. Options are great but in our line of work can become extremely heavy. A lot of languages or frameworks claim pride in themselves for trying to get you up and running very quickly, and while my experience is limited, Rust really does deliver that in a way that feels above and beyond.

What is somewhat keeping me going is honestly all the things that smack of JavaScript. Take for example the main function, the first and major/ultimate/what-have-you function that runs in Rust program: it's got a name, it's got parens for arguments, a body block in braces and a call that ends in a semi-colon.

Feels like home y'all.

the Rust main function that output "Hello, world!" into the above terminal

I'll elaborate a lot more and in a lot more detail as I through the rest of the language, but right now I'll say that I am truly learning what folks mean when they say that learning your second programming language is so much easier than your first. Pattern matching stays on top once again.

Thanks for reading! 💜

+ some quick housekeeping - further parts will try to cover 1 or 2 chapters depending on their length. For heavier chapters (ownership? 👀) or projects I'll try to chop things up where it seems to naturally make sense.