Getting Started With Motoko: An Amateur Perspective

Ricardo J. Capuz L.
Ricardo J. Capuz L.
Getting Started With Motoko: An Amateur Perspective
Table of Contents
Table of Contents

Motoko is a smart contract programming language for the Internet Computer created by the DFINITY foundation.

Many people don't understand how Blockchain works

The way an outsider sees Blockchain is pretty interesting and maybe kind of funny to an expert.

In reality, most people on earth are blockchain outsiders, so how an outsider sees Blockchain, though interesting, is a topic for another post.

That is not to say that being an outsider is an insult; I consider myself an outsider compared to others in the community. When I watch videos related to The Internet Computer, time and time again, I feel overwhelmed, even when the video is specially made to divulge information for non-technical people.

But, that's just the core of The Internet Computer, the magic begins there, but the real deal happens with the developers. The guys at DFINITY transformed that monster (Blockchain development) into almost a beer mate; an excellent dev environment, delightful architecture, and incredible, dreamy integrations between the world inside The Internet Computer.

Great First Impression

When I first started with the documentation (after seeing almost every video on the DFINITY YouTube channel), the introductory part (Quickstart and Concepts) felt awesome. Β Consequently, I thought my heart would blow up with excitement for all the things that soon I would be able to do.

When I reached the How to and Tutorials sections, I was transported to another world, fascinated by the vision laid out by Chief Scientist Dominic Williams during the passionate introductory video about The Internet Computer Vision.

Motoko: Learning the Basics

So, with my best coffee mug and the beginning of a delightful morning, I started with the Β About this guide section which contains the attractive Motoko vision and core values. They explain what Motoko is and why they developed it. It is a recommended and essential section to understand motives and how to read the guide correctly.

Stable variables and upgrades

I realize it might look simple to many of you, but remember the article title πŸ™„ and be merciful to me and many amateurs who dream about creating so many things with The Internet Computer.

I figured out how to finish the docs and start with my first dApp. I remembered an old idea related to health records and data research. Still, to start with something a little bit less complicated, I decided to create a survey dApp that every dApp could use on the Internet Computer. Β 

The idea is that anyone could integrate the created survey directly into their dApps, just by calling some canister functions. The user could use the same survey many times and also have the ability to share the questions - and data - between many surveys and owners if the user agrees to it.

After playing for a while and learning about this, I'm planning to start the Personal Health Record project but believe it or not, the survey dApp is an integral part of it.

After I built my VSCode workspace with React and the respective dfx, I took as base the code from the Phonebook tutorial, and then: AssocList + Typescript happened.

I'm going to relieve you from hours of suffering; the answer to your developer issues is: Motoko School

Motoko Playground is an excellent place to start coding.

Motoko Playground by DFINITY

Even if they have two videos, for now, they are accommodating. I wrote to the team on Twitter, and they got back with great answers. I wrongly called the Motoko School Twitter owner Steve repeatedly, and after some days, he told me: "Btw, it's not Steve but Sebastian!" LOL! Nonetheless, they provided the support I needed (Steve is another Motoko School co-founder).

Internet Identity: from a Programmer's Perspective

I had my concerns about integrating The II to my dApp, but to my surprise, it was effortless. You have to go to The II Github and follow two or three steps. It's straightforward, but I have to warn you, the current approach to using the II in your local environment requires you to run The II locally, and it's slow when you deploy the canister for the first time.

Next Steps and the Community

That's so far what I have been able to achieve. Still, I'm trying to dedicate 2 hours per weekday and 8 to 12 hours on the weekends (Yep, I got two SMEs, and I love both, so that's all I can give for now) to create awesome projects, support the community and keep sharing my experiences with you.

Speaking of the community, I'm delighted to post here not just as an outsider but also as an advocate. I was posting stuff on DSCVR, and @ICPfan8 messaged me asking if I wanted to write this story about my experiences with Mokoto.

DFINITY Community is a great initiative that brings validated information, allows all of us to have a word, and most of all, to build this endeavor together.

If you have questions, feel free to contact me through @capuzr.



Connect with the Author: Twitter

  • Disclaimer: The views and opinions expressed on this website are solely those of the original author and other contributors. These views and opinions do not necessarily represent those of the Dfinity Community staff and/or any/all contributors to this site.

Become-a-contributor-2-1



Comments are for members only. Join the conversation by subscribing πŸ‘‡.

Great! Check your inbox and click the link
Great! Next, complete checkout for full access to Dfinity Community ∞
Welcome back! You've successfully signed in
You've successfully subscribed to Dfinity Community ∞
Success! Your account is fully activated, you now have access to all content
Success! Your billing info has been updated
Your billing was not updated