<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged gamification</title>
<link>https://coderlegion.com/tag/gamification</link>
<description>Powered by Question2Answer</description>
<item>
<title>Level Up Your Cloud Career with the Google Cloud Arcade</title>
<link>https://coderlegion.com/8375/level-up-your-cloud-career-with-the-google-cloud-arcade</link>
<description>&lt;p&gt;The &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://go.cloudskillsboost.google/arcade&quot;&gt;Google Cloud Arcade&lt;/a&gt;&lt;/strong&gt; is an always-on, no-cost gamified learning program designed to help technical practitioners of all levels build their cloud skills. Hosted on the &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.skills.google&quot;&gt;Google Cloud Skills Boost&lt;/a&gt;&lt;/strong&gt; platform, it offers a fun and interactive way to learn about Google Cloud technologies like computing, application development, big data, and AI/ML.&lt;/p&gt;
&lt;p&gt;By participating, learners can earn digital badges to showcase their professional skills and accumulate points to redeem for prizes.&lt;/p&gt;
&lt;h3 id=&quot;how-the-arcade-works&quot;&gt;How the Arcade Works&lt;/h3&gt;
&lt;p&gt;The Arcade operates on a monthly cycle, featuring new &quot;games&quot; and challenges. Here is the step-by-step process for participating:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Account Setup &amp;amp; Subscription&lt;/strong&gt;&lt;br&gt;
To begin, you need a &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.skills.google&quot;&gt;Google Cloud Skills Boost&lt;/a&gt;&lt;/strong&gt; account. Once logged in, you must officially &quot;subscribe&quot; to the Arcade page to activate your participation and ensure your points are tracked for rewards.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gameplay &amp;amp; Hands-on Labs&lt;/strong&gt;&lt;br&gt;
The core of the program involves completing &quot;games,&quot; which are collections of hands-on labs grouped by subject.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Real Resources:&lt;/strong&gt; Labs give you temporary credentials to use real Google Cloud resources, allowing you to learn by doing rather than just reading.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexibility:&lt;/strong&gt; You can complete the labs in a game in any order and take each lab multiple times to ensure you understand the concepts.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Earning Points &amp;amp; Badges&lt;/strong&gt;&lt;br&gt;
As you complete games, trivia challenges, and skill badges, you earn Arcade points.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Skill Badges:&lt;/strong&gt; Completing a series of hands-on labs and a final assessment challenge earns you a skill badge—a digital credential you can share on your professional profile.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Point System:&lt;/strong&gt; Points are awarded for different activities (e.g., 1 point per Game badge). You can also earn bonus points for finishing labs quickly or participating in special trivia events.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Redeeming Rewards&lt;/strong&gt;&lt;br&gt;
You accumulate points over time to redeem for prizes like Google Cloud swag (e.g., t-shirts, backpacks, mugs) at the &quot;Prize Counter,&quot; which opens periodically throughout the year.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;why-learn-google-cloud-products-&quot;&gt;Why Learn Google Cloud Products?&lt;/h3&gt;
&lt;p&gt;In today's tech landscape, theoretical knowledge is often not enough. Employers are looking for professionals who can navigate real cloud environments.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Market Dominance:&lt;/strong&gt; Google Cloud is a leading provider in cloud computing, particularly in Data, AI, and Kubernetes. Mastery of these tools is highly relevant for roles in DevOps, Data Science, and Cloud Architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Future-Proofing:&lt;/strong&gt; With the rapid rise of Generative AI, learning Google's Vertex AI and related tools through the Arcade places you at the forefront of emerging technology.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;key-benefits-of-the-program&quot;&gt;Key Benefits of the Program&lt;/h3&gt;
&lt;p&gt;Participating in the &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://go.cloudskillsboost.google/arcade&quot;&gt;Google Cloud Arcade&lt;/a&gt;&lt;/strong&gt; offers numerous advantages for students, beginners, and professionals looking to upskill:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Gain In-Demand, Hands-on Skills:&lt;/strong&gt; The program provides access to over 20+ Google Cloud products. The hands-on labs allow you to build practical, real-world skills that employers value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Earn Shareable Digital Credentials:&lt;/strong&gt; The skill badges you earn are tangible proof of your cloud competencies. You can add them to your resume and LinkedIn profile to demonstrate your technical skills to your network.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Boost Your Career:&lt;/strong&gt; Cloud skills are in high demand. Earning Google Cloud credentials can make your resume more competitive for high-growth roles like Cloud Cybersecurity Analyst and Cloud Engineer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No-Cost Learning:&lt;/strong&gt; The entire program, including access to hands-on labs (which usually require credits) and the opportunity to earn badges and swag, is completely free for Arcade participants.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The Google Cloud Arcade turns the sometimes daunting task of learning complex cloud technologies into an engaging, rewarding, and structured journey. By committing to this program, you can build a powerful portfolio of skills and badges that can significantly enhance your professional prospects in the tech industry.&lt;/p&gt;
</description>
<category>Cloud Computing</category>
<guid isPermaLink="true">https://coderlegion.com/8375/level-up-your-cloud-career-with-the-google-cloud-arcade</guid>
<pubDate>Thu, 11 Dec 2025 03:48:05 +0000</pubDate>
</item>
<item>
<title>How we built a block-based email builder</title>
<link>https://coderlegion.com/3953/how-we-built-a-block-based-email-builder</link>
<description>&lt;p&gt;At the &lt;a rel=&quot;nofollow&quot; href=&quot;https://trophy.so&quot;&gt;company&lt;/a&gt; I co-founded we recently released an interactive template editor for gamification emails (things like achievement notifications, weekly usage recaps, and re-engagement emails after periods of inactivity).&lt;/p&gt;
&lt;p&gt;The initial goal was to basically implement a Notion-style document editor, but things got complex pretty quickly. This post breaks down the different approaches we considered, where we ended up, and why we made the decisions we did.&lt;/p&gt;
&lt;h3 id=&quot;goals-amp-potential-approaches&quot;&gt;Goals &amp;amp; Potential Approaches&lt;/h3&gt;
&lt;p&gt;We knew from the start that we wanted our template editor to have the following attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easy to use, even for non-technical users&lt;/li&gt;
&lt;li&gt;Extensible so we can easily add more new block types over time&lt;/li&gt;
&lt;li&gt;Low-maintenance (not too many dependencies, not prone to those small-but-impossible-to-debug issues that can be the bane of engineers’ existence)&lt;/li&gt;
&lt;li&gt;Dynamic, with support for embedded variables and conditional rendering&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We considered the following approaches.&lt;/p&gt;
&lt;h3 id=&quot;raw-html-handlebars-with-previewer&quot;&gt;Raw HTML + Handlebars With Previewer&lt;/h3&gt;
&lt;p&gt;SendGrid uses this approach in their dynamic templates feature:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=10826918541339406880&quot; alt=&quot;SendGrid's approach&quot;&gt;&lt;/p&gt;
&lt;p&gt;If we went this route, our emails would be able to contain pretty much anything, since users would have control over HTML, and something like Handlebars is powerful enough to do all sorts of conditional rendering and variable insertion.&lt;/p&gt;
&lt;p&gt;The obvious downside is that this is quite complicated for non-technical users (potentially disqualifying) and a high barrier to entry even for technical users, since it takes a long time to get a nice looking email out of raw HTML.&lt;/p&gt;
&lt;p&gt;A template library could help with this, but there’d still be more work involved in adapting a template to fit a company’s exact needs and brand.&lt;/p&gt;
&lt;h3 id=&quot;block-based-with-previewer&quot;&gt;Block-Based With Previewer&lt;/h3&gt;
&lt;p&gt;Prismic uses this approach for their marketing page editor:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXe6pAxV0UpiCidtraJUWZEppFq282YHhXx118AHADCOpvwEO3OLyzPdSBUHVMmMtVupvaTNaLkcCuwfE0Y-32fHQZBLINus0nR2NI8aNMlRS4ZYRgUzhfCqtMP42Ux5pyfRb7_lXQ?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Prismic's approach&quot;&gt;&lt;/p&gt;
&lt;p&gt;The goal here is to have a set of reusable blocks that can be added and reordered on the page. The blocks are not WYSIWYG, so they can contain form fields and other controls. To see the end result, users must use the preview tool. Text fields within blocks could support rich text using TipTap and variable insertion via Mustache or Handlebars, and there could be a “Conditional” block type to support conditional rendering of blocks depending on those variables. &lt;/p&gt;
&lt;p&gt;The main advantage of an approach like this over raw HTML is that it lowers the barrier to entry drastically. Users no longer need to fiddle with HTML and CSS, nor do they need to know the intricacies of handlebars for conditional rendering. They just need to be able to drag/drop blocks around and understand the &lt;code&gt;{{variableName}}&lt;/code&gt; syntax.&lt;/p&gt;
&lt;p&gt;But, this approach is slightly less powerful than raw HTML and still requires a previewer tool to see how the email would actually look to its recipients.&lt;/p&gt;
&lt;h3 id=&quot;notion-style-blocks-wysiwyg-&quot;&gt;Notion-Style Blocks (WYSIWYG)&lt;/h3&gt;
&lt;p&gt;This style is all the rage these days.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXeViT7h-EpbdDqSBBa_QR2qZPweapSNxo2vjb9Ts-EyWEY30Oi9G1GUJMXQ3ia0sKlangNyZL_roy8EF_7SkVkaxafNMzaMdktL1K0zOpMqBkDgcWozeRY9kEtqnOd8Zy1Sg0IpMA?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Notion's approach&quot;&gt;&lt;/p&gt;
&lt;p&gt;This approach maintains the advantages of the regular block-based approach, but loses the need for a previewer, since blocks display exactly as they would to recipients. The user can simply place the cursor into a block and start typing to make changes.&lt;/p&gt;
&lt;p&gt;The main downside here is specific to our use case: we really need to support conditional rendering of blocks, and it’s unclear how that could work in a design like Notion’s.&lt;/p&gt;
&lt;h3 id=&quot;experimentation&quot;&gt;Experimentation&lt;/h3&gt;
&lt;p&gt;I started out with the Notion-style approach, using TipTap’s Notion-style editor template. The entire system of blocks was within the scope of TipTap, meaning the entire email template editor was the rich text editor. Every block was a TipTap node and the user could navigate through the document using the arrow keys or clicking around to different areas.&lt;/p&gt;
&lt;p&gt;This got clunky very fast, for a couple of reasons:&lt;/p&gt;
&lt;p&gt;First, we needed block types that had their own text fields within them. That means we needed blocks to have an “edit state”, where when selected they’d no longer be WYSIWYG.This sort of view &amp;amp; edit state at the block level does not work well within TipTap since we’d have to deal with the cursor navigating in and out of these, and text selection (can the user click &amp;amp; drag to highlight text from multiple blocks, even when one is in the edit state?).&lt;/p&gt;
&lt;p&gt;Second, conditional blocks, as previously mentioned. There was no elegant way to get conditional rendering trees to look &amp;amp; feel good within a Notion-style editor.&lt;/p&gt;
&lt;p&gt;We did however like the feel of being able to click into text and use a TipTap-powered rich text experience for italicizing, bolding, and inserting variables using Mustache syntax. TipTap is extensible enough to add things like dynamic menus that appear when you type &lt;code&gt;{{&lt;/code&gt;, showing the plain-English variable names.&lt;/p&gt;
&lt;p&gt;So rather than throwing this out completely and trying out the block-based approach with a previewer, we figured a hybrid approach would be worth a shot. Specifically I tried the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get rid of TipTap as the manager of the blocks, and instead only use it for rich text fields within blocks.&lt;/li&gt;
&lt;li&gt;Create our own simple React component for managing the blocks.&lt;/li&gt;
&lt;li&gt;Have a selection state so users can select one block on the page at a time. The selected block is displayed in an edit mode that shows the block’s fields and controls. All other blocks remain in view mode which is fully WYSIWYG.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This approach worked!&lt;/p&gt;
&lt;p&gt;It allowed us to keep the user-friendliness of the Notion-style editor, but still support dynamic rendering (through a “Conditional” block that shows all conditional paths when in edit mode but only one when in view mode) and having multiple fields within each block. Here’s what the editor looks like in practice:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXeY6oznHvdB9YTOYf8o-CRszimtFRfxe1Fg_QEPR6Q_2b6dgWZbTelA_go0YDiJsUM5arunX9oKyHE_4yYwDo_vVr7yIMGaqYqqAYnnacb55rPEhZZvgHQ6UzTBkE5qK80MJdeU3g?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Our first vesrion&quot;&gt;&lt;/p&gt;
&lt;p&gt;And that conditional block I mentioned looks like this while being edited:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXcEarIFWKOI3z-q8r68H86FV9TkbNcWMWvscTPON2MaqWWfKrC3O1e579snYyzTQg3i0JboDn3_s_TZrhnqcA2llN5cZO8Y10paZIs1NxoyQCa_Mf2sLbtO8DZuf1YDzCB1xwWS?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Conditional blocks&quot;&gt;&lt;/p&gt;
&lt;p&gt;Once we’d settled on the approach it was just a matter of building out all the block types and handling variables correctly. There are a couple interesting bits that I’ll note here.&lt;/p&gt;
&lt;h3 id=&quot;variable-insertion&quot;&gt;Variable Insertion&lt;/h3&gt;
&lt;p&gt;We went with Mustache as it’s the simplest template language with basically zero logic. We want these email templates to use Conditional Blocks for logic—the text editor only needs to support rendering variables. To add Mustache to TipTap I wrote a custom extension, which also renders this nice dropdown menu with the available variables:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXeOOY38NSWMSAN8c4GJ4hI9QEn3aGL7s3O-2JyTKkxVInmP6Gry4tJ0kFI4Kz9-DXIkPFrwTHNPz-IpS9-7_cXzUP7M4p4JQKhskoaEoUybhV97F2ZdZyNgWlL-agPKcD1zEJBwng?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Using variables&quot;&gt;&lt;/p&gt;
&lt;p&gt;I added a preview pane on the right-hand side where users can edit the preview variables used by Mustache to populate the template.&lt;/p&gt;
&lt;h3 id=&quot;adding-smart-blocks&quot;&gt;Adding Smart Blocks&lt;/h3&gt;
&lt;p&gt;The email editor needed to support blocks powered by Trophy that you don’t find in other, more generic email template systems. So far we’ve added:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Achievement progress charts&lt;/strong&gt;: Shows a user’s progress toward a set of related achievements.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXefrv3_NyG5pz3hKruymSxZoAtpGNrlD0KAagW9JSDssmE6hlNN75InLOIABUdI1k7vlXtBAm6ONdmf_FmD61ccESUwDe8Sb0hniQGZaVDrYEzxvFlhF-u0VleU_gKqOsAruMtZ?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Achievement progress chart block&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Achievement unlocked&lt;/strong&gt;: Shows an achievement that the user just unlocked.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXc3nsxGKTfa9pf7iGiZmR1z9-FpfoNQ7uo5cPE8Bd4I5GvfnJUfRYAiIrq4q-xnmW202X2QeuVOMqusK6CgUCrqexRngUpjbRLa3IpVAJdzcsBek60jxaJFv1iUEjVFb5caShcb6g?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Achievement unlocked block&quot;&gt;&lt;/p&gt;
&lt;p&gt;Metric progress chart: Shows a user’s progress over time on a particular metric.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXcj8gOgyKtns3PbDt92ynR1z3QI3i0Py47JBaIk08KfuIiYMUf97QmdrEslAnEAG6NtdQXIVdvv7NY_riq4A1m_L56DOaGLUYrQgQPnnd-1b7b-jXrnMKKgrwTWneMQWqSTZZfe?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Metric progress chart block&quot;&gt;&lt;/p&gt;
&lt;p&gt;Streak: Shows the user’s current streak (if any).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://lh7-rt.googleusercontent.com/docsz/AD_4nXcRtnzla9Wa3ogW9HV6F52WxoTFq6fMJwCYo626aOteDWwMx3B4I-eXmLrjjfiC8DtoWPJ9FXqwrhCAbQFp2ONXBks4CBvNYpaHCJe1gDZFvkg_Pf0M5ykun-VVFh9hQtJ8V1HI?key=IeB-Htyx2JuJkgewLu25Vg&quot; alt=&quot;Streak block&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;takeaways&quot;&gt;Takeaways&lt;/h3&gt;
&lt;p&gt;I learned quite a lot from this! First and foremost: the Notion editor style isn’t for everyone. I think we just assumed that it would work by default, but different types of editors really do require different UX. &lt;/p&gt;
&lt;p&gt;Aside from that, I must say that TipTap is getting better and better; I can’t imagine starting a new project in 2025 and going with a different solution for rich text editing.&lt;/p&gt;
&lt;p&gt;Detailed docs on the template editor and how it works are available &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.trophy.so/platform/emails&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Web Dev</category>
<guid isPermaLink="true">https://coderlegion.com/3953/how-we-built-a-block-based-email-builder</guid>
<pubDate>Sun, 13 Jul 2025 23:07:35 +0000</pubDate>
</item>
</channel>
</rss>