Why I'm Learning Rust
Published: 2021-04-06 19:23:09

I've been a JavaScript developer for nearly my entire career. I've even spent much of said career _teaching_ other people to write JavaScript. And now, all of a sudden, here I am [coming to you live on Mondays (and Tuesdays) to stream Learning Rust](https://www.twitch.tv/aishacodes).

I could sum this up quickly by saying "Why? Because I can!" but there are other good reasons to learn Rust and I'd also like to share some of the resources I've used so far.

## Move fast without breaking things

My (perhaps over-) simplified impression of Rust's goals is that it's trying to be *fast, safe, and friendly*. You get the crunchy, low-level goodness that you get with a language like C++ but with guardrails that make it more difficult to make costly mistakes. 

In addition, at least so far, the error messages and documentation I've read have been uncommonly clear and helpful. In the following example, the compiler is not only telling me that I tried to use a variable that doesn't exist but is telling me there's a similar name that _does_ exist which may be (is) what I'm looking for.

```bash
error[E0425]: cannot find value `filename` in this scope
 --> src/main.rs:9:23
  |
9 |     println! ("{:?}", filename);
  |                       ^^^^^^^^ help: a local variable with a similar name exists: `fileName`
```

## Learning with a buddy

Probably the best part of this process for me has been that I'm not doing it alone! My brilliant colleague [ChaelCodes](https://www.therelicans.com/chaelcodes) is right there with me, which has made the last couple of weeks so much more fun. We approach the material differently, come up with different questions, and can play off of each other's strengths.

Aaaand sometimes we get sidetracked and I sing songs. 😅

{% embed https://www.twitch.tv/aishacodes/clip/AcceptableNastyWalletWoofer--BgAAr2q2Sj2_bvR %}

The point is that **I highly recommend connecting with at least one other person also actively learning whatever you're trying to learn**. It might be difficult to find someone you vibe with but it's worth the effort!

Some ideas for finding your learning buddy:

- Put out a call on Twitter
- Check your Slack and Discord communities for an "accountability" channel
- _Join_ whatever platform people use to talk about your subject of interest
- Ask around at work to see whether anyone has the interest/bandwidth

## Circling back to web dev

My friend [Laurie Barth](https://laurieontech.com/posts/rust/) was the first person to spark a real interest in Rust for me. She did a great job of sharing her first impressions of the language on her blog. That led to me digging into some of [Chris Biscardi's writing on _his_ experience with Rust](https://www.christopherbiscardi.com/rust). Essentially, hearing what other folks in my very JavaScript-heavy circle were doing with Rust got the wheels spinning in my head too!

Chris is building a Jamstack framework called [Toast](https://github.com/toastdotdev/toast) with both Rust and JavaScript that feels like it's right up my alley. I'd like to be able to contribute to the project and better understand how it works!

I'm not planning on shifting to systems engineering or game dev anytime soon, so it helps to have a project in mind that's relevant to my primary area of interest (broadly, web development).

## Resources

I'm excited by what I've learned so far! It feels good to have the time and freedom to devote to learning something like this because I want to. If you've decided you want to as well, check out the following resources and be sure to [drop in on my Twitch channel](https://www.twitch.tv/aishacodes?utm_campaign=DevRel&utm_medium=theRelicans&utm_source=blog) and tell me what you're building with Rust!

- [The Rust Programming Language](https://doc.rust-lang.org/book/) book
- [Rustlings](https://github.com/rust-lang/rustlings/) course
- Chris Biscardi's Egghead playlist [Learning Rust by Working Through the Rustlings Exercises](https://egghead.io/courses/learning-rust-by-solving-the-rustlings-exercises-a722)
- [Rust by Example](https://doc.rust-lang.org/stable/rust-by-example/)