Learning Rust - The beauty and the pain

Learning Rust - The beauty and the pain

Chronicles of a JavaScript Enthusiasts

Β·

3 min read

Disclaimer: This is a braindump of a my experience whilst trying to add Rust programming language to my skill set and how I've come to appreciate the fascinating language

How it started

Hey there πŸ‘‹, I'm excited to have you read this. Let's go over a bit of introduction before I begin the storytelling.

I'm Opeoluwa, A JavaScript enthusiast and backend developer. I love trying to solve day-to-day challenges using my technical know-how which has caused me to learn a few languages and frameworks, amongst them - C++, Node.js, Typescript, Vue and SQL

Rust, the exodus

Sometime last December, I figured I need to extend my knowledge of core computer science concepts if I want to get better at what I do. First, I need a "fitting" language on which these concepts will be built.

I returned to C++, taking my time to read through Ivor Horton's book -Beginning C++17 From Novice to Professional. Ivor, really displayed a masterpiece therein.

However, I sensed I needed more 😌. C++ seems harder to grasp this time and it is reported to have quirks with memory handling.

This led to my search of programming languages that offer the powers of C++, or at least something more performant than JavaScript. I found R and Rust so I opted for Rust considering the fact that it has documentation on embedded systems programming - a field I used to love.

Nevertheless, learning Rust proved more demanding than anticipated and I've hopped into learning it full time and nothing will change that.

A new Rustacean

My first successful Rust program, was written trying to solve the fizz buzz challenge😌. I couldn't be happier.

But, Fizz buzz challenge was really more of a toy. I needed more. I need to know how best one can learn Rust quickly...

The Rust official documentation popularly known as the book seems even more demanding. There are a lot of concepts one needs to get from the first few chapters 🀦

I deflected to reading tutorials, and blog post and eventually subscribed to Rust news letter which makes accessing tutorials easier. I watched videos, joined the Rust communities. One significant thing is, I learn something new almost every week.

At that point in time, I have a handful of concepts under my belt and I can do more that solve Fizz buzz challenge. I also found Rust programming language more fascinating.

However, the fascination doesn't solve the problem of learning Rust neither does it solve the problem of learning core computer science concepts. I was happy about the development nonetheless πŸ˜ƒ.

Unleashing thunderStorm β›ˆοΈ

I was gaining traction, this time I choose to rebuild a utility I once built in Node/JavaScript, it's essentially a Command Line Application for scaffolding Node.js application.

The project named this, after the prototype called Thunderstorm, made me learn a lot of things about Rust

I learned much more aboutstruct, ownership, enum, module I also learned how to publish crates; which are essentially known as packages, dependencies, or libraries in other programming languages πŸ“¦ .

The end

In all, I learned one thing, Rust programming language does not strictly follow C/C++ convection, speaking of the language design, despite the language's common concept.

The best way I've found is, to grasp as many concepts as possible about the language, and think of it as a relay race.

You have to stay on a point, know a handful. Once you do, now you have the baton, run as fast as you can - build project, make mistakes... It's all part of the plan.

Also, one does not have to code along when seeing a tutorial or reading a blog, read it to the end. See the video to the end, take your baton, and run.

Rust is an amazing language but one needs patience and persistence to get something out of it.

I'm running the third lap of my race building a URL shortenerπŸ˜…

Β