Blockchain has to be one of the most exciting developer opportunities on the planet. As a field still in its infancy, there is so much potential for passionate and dedicated developers to carve out new ground and get creative in a revolutionary space.
But as with all new and complex fields, blockchain requires learning new skills. On the Mighty Block team, the transition from developer to blockchain developer is a common experience. Many of our talented developers have taken (and survived!) the big leap from normal development into the blockchain world, learning the new languages and skills required. So why do they do it?
We checked in with Senior Dev Alec Savvy to learn about his journey and offer some tips to up and coming blockchain developers.
What drew you to working in blockchain?
I got an invitation to apply for a development role. At the time I had heard about blockchain, but it had never drawn my attention. I saw them simply as an attempt to make true decentralised digital currencies. What I was missing at the time was their huge potential and the range of solutions they can offer.
I learned later through my own research, that digital money was only one (and maybe one of the hardest) of a series of applications that could be made possible only through blockchain technology. I became fascinated by the decentralised governance solutions; dApps not owning their user’s data, trustless permissioned sharing of data etc.
The other aspect of the role that was exciting to me was Rust. As an experienced C++ developer, I tend to prefer strictly typed languages. However, before Rust, modern C++ had no real rival. I knew Rust was the most beloved language among developers and really wanted to give it a go.
What new skills did you need to learn to work in the blockchain space? How did you go about learning these? Was it a tough journey?
Learning Rust, though very pleasant, takes a bit of time. I had the opportunity through my role to work on real-life programming solutions and issues in Rust, while simultaneously learning the theory from the Rust Book and Rust By Example. I would spend nearly one hour after work learning Rust.
However, Rust is not the only thing you will need. Learning the blockchain concepts is also a must. We use “Substrate” from Parity Technologies. Substrate is written in Rust in a super generic way and uses Rust’s advanced macros substantially. These were the other hurdles that I had to leap over to be able to become fully productive. It has been a challenging journey, but one which I’ve really enjoyed!
What do you use Rust for on a day to day basis?
Here at Mighty Block we use Rust for the blockchain core, or in other terms, for the software of our blockchain nodes. This is where the blocks are being generated, smart contracts are being executed and the consensus and governance protocols are running.
What makes Rust your language of choice?
Rust offers zero-cost abstractions and assumes the best practice design and development guidelines as defaults. Programmers only need to be explicit when they have to digress from the best initial choice. As a result, Rust is very fast and memory-efficient, while also very reliable. Rust also doesn’t have a garbage collector, which means there would be no indeterministic incident (caused by the language) during the runtime.
These characteristics make Rust an ideal choice for blockchains where reliability and efficiency matter a lot. The other advantage of Rust is in its pretty straightforward compilation to WASM, which is a very efficient platform-independent assembly. Substrate keeps its modules and smart contracts hot-pluggable through keeping and running them in WASM format, where a native format is not yet available. This has provided a self-upgradability solution for the chain.
What do you wish you had known as a new Rust developer?
I actually presented the following slides in an Auckland Rust meetup in an attempt to share my learning experience with the community: Rust Common Pitfalls.
The root cause for some of those pitfalls, in my opinion, is that there are some syntax similarities between C++ and Rust, which is both a good thing and a bad thing. It’s good because it helps you to start quickly if you know C++. It’s bad because it may hinder your learning process. Initially, you will want to follow your C++ assumptions, but after many challenges, you will realise how fundamentally different the two languages are.
Visit https://mightyblock.co/mighty-blog/ for more web3 news