Embed Motoko: interactive smart contracts in your Medium story or blog post!

Try editing this code snippet:

Ryan Vandersmith
Level Up Coding

--

If you enjoy reading or writing code tutorials, you’re in luck: DFINITY recently collaborated with Embed.ly to integrate Motoko code snippets anywhere on the Medium platform.

Here’s how it works:

1) Visit embed.motoko.org to design your code snippet:

2) Click the “Copy embed link” button in the top-right of the interface:

3) Paste the link into your Medium story and press the enter key:

It’s that simple!

As an Internet Computer (IC) community member who recently joined the Motoko development team at DFINITY, I use this tool almost daily to explore the language and try new ideas without having to spend time redeploying a canister smart contract.

If you want to learn more about the IC ecosystem, I highly recommend writing a few code snippets to reinforce your knowledge from the official documentation. This will help you gain a deeper intuition for Motoko’s syntax, especially if you’re already familiar with another programming language such as JavaScript, Python, or Rust.

If you eventually want to deploy your code snippet as a canister smart contract, we’ve got you covered. Motoko Playground allows you to temporarily deploy your project to the IC mainnet without having to set up a wallet or buy ICP tokens. This is an extremely cool feature which I recommend trying just for the experience of deploying a real-world smart contract.

This integration is a work in progress! We are actively developing this embed service, so feel free to reach out on GitHub if you have any ideas, questions, or bug reports so we can improve this tool for everyone.

Thanks for reading! I look forward to seeing what you create with these interactive code snippets.

~ Ryan

--

--

Enthusiastic programming language designer and full-stack Progressive Web App developer.