The Figment Learn Notes: Avalanche

0 53
Avatar for elif
Written by
3 years ago

Introduction

Like I promised in an earlier post, I would be writing about my experience using Figment’s Learn Pathways.

We start with Avalanche. It is an open-source platform for launching highly decentralized applications in one interoperable and highly scalable enterprise blockchain ecosystem. It is designed to make it easy to create both public and private blockchains, as well as to build dapps. From their docs and other writing across the internet, they seem to have a soft-spot for finance (although to be fair, almost all blockchain protocols do). They also offer a reward of $50 in the AVAX token (available for a limited time) for all who complete the Pathway.

The Tutorial

Prerequisites

While the Avalanche Pathway doesn’t explicitly say so (at least I didn’t see that written anywhere), the tutorial seems to assume you have at least basic JavaScript knowledge. This is because while it does explain what you are doing and why, it spends no time at all explaining the JavaScript to you. It assumes you are a big girl/boy/they and concentrates on the important thing: learning the protocol. This is a welcome change from a lot of tutorials I have encountered online who seem to be caught between teaching you the language at the same time as they are teaching you the protocol. While this may be frustrating for newcomers, it does help keep the tutorials succinct and streamlined. You worry only about the protocol you are working on, and not on learning the syntax and foibles of the language. While “learn JavaScript by building a dapp” tutorials do have their place, the Figment team seem to have decided that is not the path they wanted to take, which makes for quick and easy progress.

You would need to have at least NodeJS 12 or higher installed on your computer, as well as avalanche (the Avalanche JavaScript API) and dotenv (to help you set your environmental variables). Later in the tutorial, you would be required to install ethereumjs-util to help you manage the Ethereum-based credentials you’ll be using.

Most importantly, though, you would need to sign up for (or if you already have one, log in to) a DataHub account. DataHub is a “Web 3 Gateway” built by Figment to give developers reliable access to RPC and REST APIs for certain protocols. It allows them to work with the latest mainnets and testnets so they can test and implement their products safely without having to worry about the underlying blockchain structure. Essentially, you can quickly build on a blockchain without having to be an expert.

DataHub

The Avalanche DataHub is where you start your journey towards becoming an Avalanche developer. There are other protocols on the DataHub page, but since we are working with Avalanche, we can simply ignore them for now.

The DataHub is a hub where, Uhm, all your data is. Okay, sorry for the dad joke 😄. It is a dashboard that contains your API key, information about how daily data usage/API calls over your daily quota, your usage rate, the services you are using, the logs, links to the relevant documentation, and the pathway tutorials. When you finish each tutorial step, you would be required to click on the verify button for the tutorial on the DataHub page. It is very important that you do this and wait to be verified before you go to the next lesson. It usually takes about 5 minutes, and I was impatient so I decided to go ahead with the next lesson which may have been why my verification got stuck and I kept on getting some really weird error message on the dashboard. I had to abandon that account and open a new one and start the tutorial all over again. To make sure that I couldn’t pass because of a programming error I made, I simply copied the offending file and used it again when I got to where I was stuck the last time, and I had no problem passing through.

The Lessons

While the tutorials don’t have a web-based REPL like Codecademy does, the learning process is never the less interactive. You are giving an API key which you would use to make real calls to DataHub. The code samples are embedded in the webpages, even giving you the option to copy-and-paste if you so desire (which I would advise you against doing. It is always better to type code during tutorials even if you have no idea what you are doing. This actually helps hasten your ability to understand the code as you read it as you type and some of the syntax seeps into your unconscious mind).

Anytime you run the examples, you are actually interacting with DataHub. You are making real API calls, and are actually working with the blockchain. You can look at your dashboard to see your usage rate, both as a graph and as raw numbers. Like I said earlier, the lessons were straightforward and easy to follow. The language was simple, and I believe this would be a great resource for anybody who is seriously thinking of building dapps (especially if they are for finance) on the blockchain.

If you get stuck or need help of any sort, you can find a lot of fellow learners on the Community Discord group. Most of the users there are friendly and helpful, and it does help when you realize you are not alone whenever the going gets tough.

Conclusion

I enjoyed following the Avalanche DataHub Pathway, and I am currently working on completing the rest of the Avalanche tutorials on Figment Learn.

While most of the tutorials on the pathway are introductory, Figment Learn is offering more advanced learners the opportunity to earn up to $500 per lesson if they build tutorials that pass the minimum requirements.

Figment Learn is one of my favorite learning discoveries of recent time, and it looks like it is going to be a resource I would be using — as both a consumer and contributor (I hope) — for a very long time.

1
$ 0.00
Avatar for elif
Written by
3 years ago

Comments