DEV Community

Cover image for My Journey with Rust & Substrate
Adib Hanna
Adib Hanna

Posted on

My Journey with Rust & Substrate

A few months ago, I decided to learn Rust , mainly because I’m very interested in Substrate (a Blockchain framework). At first, I thought it would be an easy task, and that it will take just a few days and I should be up and running. Well, that wasn’t the case, I really struggled with this language, it reminded me of my University days, studying C++, I felt like I don’t know what I’m doing, which is probably very true.

So, I decided to take a step back and have another take on this process, approach it a bit differently and in a more systematic way. On my first try, I simply went to the docs read everything, and tried some code. That didn’t really help much, it only made me more confused and less motivated.
The second time around, I decided to follow a “consistent motivation” approach - something that I came up with while writing this post.

Basically, whenever I feel lost and unmotivated, I’ll go watch some YouTube videos that would excite me.
Here are some of my favorite:

My Process

  • Read the Rust docs, all of it, without trying any of their coding examples, I just wanted to get a feel of what’s going on in this language - the story behind it. That helped my intuition for whenever I read Rust code.
  • Watched a TON of YouTube videos. I found a bunch of great channels of devs streaming themselves learning and coding Rust. That was inspiring and gave me the desire and motivation to actually try to code things myself.
  • Followed the top Rust accounts on Twitter. The goal was to keep myself up to date with all things Rust. They also share great resources and blog posts.
  • Re-read the Rust docs again, this time I tried all the code they provided, and I spent a lot of time familiarising myself with its syntax.
  • Read as many blog posts as I can find.
  • Read all of Substrate codebase on Github.
  • Build something with Substrate.

Lesson Learned

  • Don’t give up quickly.
  • Realize that learning takes time.
  • You’re not the only person struggling with learning new things.
  • Read other people’s code (!important).
  • READ THE DOCS.
  • CODE CODE CODE.

Rust Resources

Substrate Resources

This is my first blog post ever, I hope it helps someone with their coding journey. Oh, and I’m definitely open to any feedback that could help me improve the quality of what I’m sharing on this blog.

Follow my posts on: Adib Hanna

Cheers!

Top comments (8)

Collapse
 
jkhaui profile image
Jordy Lee

Thanks for sharing! I think we are witnessing something special with Substrate and Polkadot, and the dev experience will only improve with time :)

Collapse
 
adibhanna profile image
Adib Hanna

That's true! the team is building really great tooling that will help us take the Blockchain to the next level!

Collapse
 
electronshot profile image
weezy20 • Edited

The substrate codebase has to be the most intimidating use of Rust's trait system. This is my first time learning substrate and looking at all those types makes me unstable. How did you manage to get productive in substrate?

Collapse
 
taimoorkhan profile image
Taimoor khan

Thanks for sharing, I am similar condition as you were. Is it really necessary to have firm knowledge of blockchain before diving into Substrait's environment? I am curious because I have just started learning blockchain with Substrait and their tutorials mentioned no prior knowledge of blockchain is requirement to get started.

Collapse
 
codier profile image
Di Peng

thanks for sharing your exp. I just started learning Rust and Substrate and am struggling as well. Glad to know I am not alone

Collapse
 
v_spyromilios profile image
Evangelos Spyromilios

hey, thanks for sharing !

Collapse
 
lasharela profile image
Lasha Kvantaliani

Is there any group, place where you can ask questions for Substrate. The chatgroup they have on official website just is not good.

Collapse
 
adibhanna profile image
Adib Hanna

They do have a channel on Riot.im
riot.im/app/#/room/#polkadot-water...