<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[The Zeals Tech Blog - Medium]]></title>
        <description><![CDATA[ZEALS brings omotenashi to the world with AI-powered conversations, creating meaningful, human-centered customer experiences that build trust, loyalty, and business growth. For job opportunities, you can find them here: https://careers.zeals.ai/en/ - Medium]]></description>
        <link>https://medium.com/zeals-tech-blog?source=rss----5cbecc15c49e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>The Zeals Tech Blog - Medium</title>
            <link>https://medium.com/zeals-tech-blog?source=rss----5cbecc15c49e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 05:05:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/zeals-tech-blog" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Chat to Trust: How Mathematical Verification Can Transform Conversational Commerce at Zeals]]></title>
            <link>https://medium.com/zeals-tech-blog/from-chat-to-trust-how-mathematical-verification-can-transform-conversational-commerce-at-zeals-d641938a4756?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/d641938a4756</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[factual-ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[verification]]></category>
            <category><![CDATA[chatbots]]></category>
            <dc:creator><![CDATA[weihong chin]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 02:08:59 GMT</pubDate>
            <atom:updated>2025-09-17T02:08:55.952Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Trust Question: Can We Guarantee AI Conversations Are Correct?</h3><p>Picture this scenario happening across different industries every day. A financial services customer messages asking about loan eligibility, and the AI confidently approves them despite missing requirements. A beauty brand’s chatbot recommends a product combination that violates safety guidelines. An automotive dealer’s AI quotes warranty coverage that doesn’t actually apply to the customer’s specific model. Each of these mistakes doesn’t just frustrate customers — they can trigger regulatory violations, legal liability, and lasting damage to brand trust.</p><p>This isn’t a hypothetical nightmare — it’s a daily reality for conversational commerce platforms handling millions of customer interactions across every industry. As Zeals continues its explosive growth trajectory serving enterprise clients globally, the challenge isn’t just about financial compliance or beauty product safety. It’s about a fundamental question:</p><blockquote>How can we ensure AI conversations are mathematically provable to be correct, regardless of the industry?</blockquote><h3>Understanding the Universal Trust Gap in Conversational Commerce</h3><p>Before diving into the solution, let’s understand why this problem affects every industry using conversational commerce, not just regulated sectors like finance.</p><p>Traditional e-commerce operates with structured, predictable interactions. A customer clicks buttons, fills forms, and follows predetermined paths. The rules are binary, the pathways are defined, and validation is straightforward.</p><p>Conversational commerce, however, operates in the complex realm of natural language where customers express their needs in countless ways. When Zeals’ AI agents engage customers across LINE, Instagram, and Facebook Messenger, they’re interpreting intent, understanding context, and making recommendations based on probabilistic models. While conversational commerce can significantly improve customer engagement and conversion, each conversation carries the risk of AI hallucination — where the model generates plausible-sounding but incorrect information.</p><p>Consider how this challenge manifests across different industries:</p><ul><li><strong>Retail</strong>: Size recommendations based on complex fit guides and return policies</li><li><strong>Automotive</strong>: Warranty coverage depending on model year, mileage, and service history</li><li><strong>Telecommunications</strong>: Data plan eligibility based on device compatibility and usage patterns</li><li><strong>Healthcare</strong>: Product recommendations considering allergies, medications, and conditions</li><li><strong>Education</strong>: Course prerequisites and certification requirements</li></ul><p>The fundamental challenge remains the same: natural language is <em>ambiguous</em>, but business rules must be <strong>precise</strong>.</p><h3>Enter VERified: The Universal Bridge Between AI and Business Rules</h3><p>This is where VERified’s breakthrough approach becomes transformative for platforms like Zeals. Instead of hoping the AI interprets policies correctly, VERified provides mathematical proof that responses align with any business rules, regardless of industry. But perhaps more importantly, VERified serves as a crucial bridge between three key stakeholders in the conversational commerce ecosystem: Zeals’ engineers, business teams, and enterprise clients.</p><p>But before we explore the business transformation, let’s understand exactly <strong>HOW</strong> VERified works at a technical level.</p><h3>How VERified Works: The Technical Architecture</h3><p>Think of VERified as a sophisticated quality control system that sits between the AI’s response generation and the customer. Just as a manufacturing plant has multiple quality checkpoints before a product ships, VERified uses multiple verification methods to ensure every AI response meets business requirements. Let me walk you through the four-step process that makes this possible.</p><h3>Step 1: Policy Extraction and Structuring</h3><p>The journey begins with transforming your business policies from human-readable documents into machine-verifiable formats. Most companies have their rules scattered across policy documents, training materials, and institutional knowledge. VERified’s first job is to make sense of all this information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*d734pGgQTthu2ao3oNzAsg.png" /></figure><p>The extraction process uses advanced language models to identify the key components within policy documents. When a financial institution provides a policy stating:</p><blockquote>Personal loans require customers aged 20 or older with full-time employment and annual income exceeding 3 million yen</blockquote><p>VERified doesn’t just copy this text. Instead, it breaks it down into structured components that machines can verify:</p><ul><li>Variables (customer_age, employment_type, annual_income)</li><li>Constraints (age must be 20 or greater, employment must equal “full-time”)</li><li>Thresholds (income must exceed 3,000,000)</li><li>Relationships (ALL conditions must be met for eligibility)</li></ul><p>This extraction handles the nuances of natural language. The system understands that <em>“at least one year”</em> means 12 months or more, and <em>“exceeding 3 million”</em> translates to a mathematical comparison. This intelligence allows VERified to work with policies written in natural business language rather than requiring technical specifications.</p><h3>Step 2: Three-Layer Verification Architecture</h3><p>Once policies are structured, VERified employs three complementary verification methods that work in parallel. This multi-layered approach ensures comprehensive coverage, with each layer designed to catch different types of errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ylso3dUhF6r0JF4_g0KLQA.png" /></figure><p><strong>Layer 1: Symbolic Logic Verification</strong> This is the mathematical enforcer. It converts business rules into formal logic expressions and provides absolute certainty for rule compliance. When checking if a 23-year-old with ¥2.5M income qualifies for a loan requiring ¥3M+, symbolic logic delivers a definitive “no” — there’s no ambiguity in mathematics.</p><p><strong>Layer 2: Semantic Similarity Verification</strong> While symbolic logic handles precise rules, real conversations involve natural language with all its variations. The semantic layer ensures the AI’s response aligns with policy intent, even when using different words. It catches subtle contradictions like an AI saying “no fees apply” when the policy specifies a “monthly service charge.”</p><p><strong>Layer 3: Knowledge Graph Reasoning</strong> The most sophisticated layer maps complex relationships between entities, rules, and outcomes. It excels at multi-step reasoning, understanding that a customer needs EITHER high balance OR long tenure for premium status, not necessarily both. This layer catches logical gaps that simpler rule-checking might miss.</p><p>These three layers operate simultaneously, typically completing their analysis in under 100 milliseconds. Each provides a different perspective on the same response, creating a comprehensive safety net.</p><h3>Step 3: Argumentation Framework Integration</h3><p>The three verification layers often produce different insights, and that’s by design. The argumentation framework acts as the intelligent arbiter, weighing these different perspectives to reach a final decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l7GjyafiaX_Oas1RK33Pvw.png" /></figure><p>The framework doesn’t just combine votes, it understands the nature of each validation. A symbolic logic violation (hard constraint failure) carries more weight than a semantic concern. If the symbolic layer says <em>“this violates the age requirement,”</em> that’s definitive. But if only the semantic layer raises concerns about tone or phrasing, the framework might allow the response with minor modifications.</p><p>Most importantly, the framework generates human-readable explanations. When a response is flagged as invalid, it doesn’t just say “error” — it explains exactly which rules were violated and why. It even suggests corrections, turning a simple yes/no validation into actionable guidance for response regeneration.</p><h3>Step 4: Real-Time Integration with Conversational Flow</h3><p>The technical elegance of VERified truly shines in how seamlessly it integrates with existing conversational flows. Users experience no delays or interruptions, they simply receive accurate, verified responses.</p><h3>VERified as the Three-Way Bridge</h3><p><strong>For Zeals Engineers: From Custom Code to Configurable Rules</strong></p><p>Without VERified, engineers face a daunting challenge. Every client has unique business rules, and traditionally, each rule requires custom code. A cosmetics brand needs age verification for certain products. An automotive dealer has complex warranty matrices. A telecom provider has intricate plan compatibility rules. Engineers end up maintaining hundreds of custom validation scripts, making the system brittle and hard to scale.</p><p>VERified transforms this by providing a standardized rule engine. Engineers no longer hard-code business logic — they build the infrastructure once, and VERified handles the rule interpretation. This means faster deployment, easier maintenance, and more time for engineers to focus on platform innovation rather than client-specific customization.</p><p><strong>For Zeals Business Teams: From Promises to Proofs</strong></p><p>Business development teams often find themselves in a difficult position. They promise clients accurate, compliant conversations, but they can’t always guarantee the AI will interpret rules correctly. This creates tension during sales processes and ongoing client relationships.</p><p>VERified changes the conversation entirely. Business teams can now demonstrate with mathematical certainty — that client rules will be enforced. During sales pitches, they can show real-time verification happening. When clients express concerns about accuracy, the business team has concrete proof, not just promises. This transforms Zeals from a conversational platform provider to a trusted business partner.</p><p><strong>For Zeals Clients: From Hope to Control</strong></p><p>Perhaps most importantly, VERified empowers Zeals’ enterprise clients with unprecedented control over their conversational AI. Instead of submitting rule change requests and waiting for implementation, clients can see their business logic expressed clearly and watch it being enforced in real-time.</p><p>When a retail client updates their return policy, they immediately see how VERified will verify conversations about returns. When a financial institution changes loan eligibility criteria, they can test and validate the new rules instantly. This transparency and control build trust and reduce the friction in client relationships.</p><h3>The Bottom Line: From Probable to Provable, Universally</h3><p>As Zeals continues its global expansion across diverse industries, the ability to guarantee conversation accuracy becomes a universal differentiator. VERified represents more than just error prevention — it’s about transforming conversational AI from a probabilistic tool into a trustworthy business system that works for any industry with definable rules.</p><p>For Zeals’ diverse enterprise clients, this means:</p><ul><li><strong>Increased conversion rates</strong> through accurate, rule-compliant recommendations</li><li><strong>Reduced risk</strong> across regulatory, legal, and reputational dimensions</li><li><strong>Faster time-to-market</strong> for new products, promotions, and policies</li><li><strong>Enhanced customer trust</strong> through consistent, verifiable interactions</li><li><strong>Improved collaboration</strong> between their teams and Zeals</li></ul><p>For Zeals itself, VERified creates:</p><ul><li><strong>Scalable growth</strong> across industries without proportional engineering complexity</li><li><strong>Stronger client relationships</strong> built on transparency and shared control</li><li><strong>Competitive advantage</strong> as the only platform offering mathematical verification</li><li><strong>Operational efficiency</strong> through standardized rule management</li><li><strong>Market leadership</strong> in trustworthy conversational commerce</li></ul><p>The future of conversational commerce isn’t just about engaging conversations in specific industries — it’s about conversations that every business, in every industry, can trust completely. Whether the conversation is about loan eligibility, skincare compatibility, warranty coverage, or any other business rule, the need for accuracy remains universal.</p><p>With VERified serving as the bridge between Zeals’ technical capabilities, business objectives, and client needs, that future is not just probable; it’s provable. And in a world where AI increasingly shapes customer interactions across every industry, that mathematical certainty isn’t just an advantage — it’s essential.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d641938a4756" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/from-chat-to-trust-how-mathematical-verification-can-transform-conversational-commerce-at-zeals-d641938a4756">From Chat to Trust: How Mathematical Verification Can Transform Conversational Commerce at Zeals</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Same Problem, Different Words: Designing Real B2B Product for Japan and the US]]></title>
            <link>https://medium.com/zeals-tech-blog/same-problem-different-words-designing-real-b2b-product-for-japan-and-the-us-802630876d19?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/802630876d19</guid>
            <category><![CDATA[ux-research]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[cross-cultural-design]]></category>
            <category><![CDATA[japanese-design]]></category>
            <category><![CDATA[b2b-product-design]]></category>
            <dc:creator><![CDATA[Anastasia WL]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 01:07:02 GMT</pubDate>
            <atom:updated>2025-07-04T01:06:49.019Z</atom:updated>
            <content:encoded><![CDATA[<h4>“Oh great, another article about Japanese design being cluttered and Western design being minimalist.” THAT’S NOT WHAT THIS IS, I SWEAR.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SGNYROD_aqjfeqdR" /><figcaption>Photo by <a href="https://unsplash.com/@freys?utm_source=medium&amp;utm_medium=referral">Freysteinn G. Jonsson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>What I want to focus on today is something way more interesting and way more practical: how do you design B2B products when your Japanese users want one thing, your US-based users want something completely different, and you’re stuck in the middle trying to make everyone happy with limited resources?</p><p>I’m Ana, and I’m a Product Designer on the Analytics Team at Zeals. Welcome to my daily reality.</p><h3>The Setup: One Product, Two Worlds</h3><p>Here’s the backstory.</p><p>Zeals started in Japan, that’s our home base, our bread and butter, our main squeeze. But like any ambitious company, we’ve expanded to the US market, and let me tell you, it’s been… educational. Japan is still our primary business, but the US is growing fast, and with growth comes needs. Strong, often contradictory needs from the main market.</p><p>As the designer on the Analytics team, I get to be the lucky person who sits right in the middle of this cultural product tug-of-war, and recently, I had an experience that perfectly illustrates it.</p><h3>The Great Persona Debate</h3><p>One day, the US team comes to me with what seems like a straightforward request. They want an analytics feature that can generate customer personas. A classic request: likes, dislikes, pain points, interesting insights, etc. Makes sense. Personas are a staple of product design. I’m thinking, “Cool, that’s doable.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rJ3CQkvYJlTnn6bh" /><figcaption>Photo by <a href="https://unsplash.com/@vladhilitanu?utm_source=medium&amp;utm_medium=referral">Vlad Hilitanu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>But the thing about working at a company with global reach and finite resources is that you can’t just build everything everyone asks for. So I did what any responsible designer would do: I took this request to our Japanese team to see where it would land on our priority list.</p><p>The response? <em>Cricket sounds.</em></p><p>Apparently, this feature was about as high-priority as organizing your sock drawer. Low. Very low.</p><h3>When User Research Makes You Want to Scream</h3><p>At first, I was genuinely frustrated. Like, hair-pulling, staring-at-the-ceiling, questioning-my-career-choices frustrated. Here I am, trying to serve two masters who seem to want completely opposite things. The US team is practically begging for personas, while the Japanese team is giving me the equivalent of a polite shrug.</p><p>So I dug deeper. I interviewed users from both sides, trying to understand what was really going on beneath the surface.</p><p>What I discovered was:</p><p><strong>The US approach</strong>: Create detailed client reports with fresh persona insights after every chatbot conversation analysis. They’re constantly updating and refining these personas based on new data from chatbot interactions. It’s like persona maintenance — always tweaking, always improving.</p><p><strong>The Japanese approach</strong>: Build personas once at the beginning to create conversation scenarios, then pretty much leave them alone. The persona is more like a foundation that gets set and rarely changed.</p><p>At first glance, these seemed completely contradictory. I’m thinking, “Great, so we need to build two different features for two different markets. There goes my simple solution.”</p><h3>The Plot Twist</h3><p>But after more conversations, more digging, and probably too much coffee, I had an epiphany. Were these user needs really contradictory? What if their needs were related, but just packaged differently?</p><p>The US team called it a “persona,” but what they really needed was access to user insights and behavioral data from conversations.</p><p>The Japanese team didn’t care about the “persona” label, but they still needed the exact same underlying data for their client reporting. They just didn’t call it a “persona”.</p><p>Everything clicked into place. The problem wasn’t that they wanted different things, the problem was that they were asking for the same thing, just using different vocabulary. Is this a cultural thing? A business thing? I have no idea.</p><h3>The Solution: Tags, Not Personas</h3><p>Instead of building the traditional persona feature the US team originally requested, I designed something I called a “tag cloud.” Think word cloud, but instead of random words, it’s filled with meaningful tags extracted from conversations with end-users in our chatbot.</p><p>This solution was beautiful because:</p><ul><li>The US team could use these tags to build their dynamic persona reports</li><li>The Japanese team could use the same data for their client reporting needs</li><li>We only had to build one feature instead of two</li><li>Everyone got what they actually <strong>needed</strong>, even if it wasn’t what they originally asked for</li></ul><h3>The Bigger Picture</h3><p>This experience taught me something important about designing for global markets: sometimes the biggest cultural difference isn’t in aesthetics or interface preferences but in how people talk about and conceptualize the same underlying needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cm33WGsfh57gnY2W" /><figcaption>Photo by <a href="https://unsplash.com/@benofthenorth?utm_source=medium&amp;utm_medium=referral">Ben Griffiths</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Instead of getting caught up in the surface-level requests, dig deeper. Ask why they need what they’re asking for. Understand the job they’re trying to get done, not just the feature they think will do it.</p><p>Most importantly, don’t assume that different words mean different needs. In this case, “personas” and “client reporting data” were just different ways of saying “I need insights about our users.”</p><h3>The Takeaway</h3><p>Designing B2B products for multiple markets isn’t about choosing sides or building everything twice. It’s about finding the common threads that run beneath cultural and linguistic differences. It’s about being a translator, not just of languages, but of needs, workflows, and business objectives.</p><p>Sure, there are real cultural differences that affect product design. But sometimes the biggest breakthroughs come from realizing that people aren’t as different as they first appear. They might use different words, follow different processes, and have different priorities, but at the end of the day, they’re often trying to solve remarkably similar problems.</p><p>And honestly, that makes the job way more interesting than just debating whether Japanese websites are “too busy.” Now if you’ll excuse me, I have some more contradictory requirements to untangle — and I’m actually excited about it.</p><p><em>Thinking about joining our design team? We’re always looking for curious, user-focused designers who thrive in collaborative environments and aren’t afraid of a little chaos. Check out our open positions or reach out if you’d like to know more.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=802630876d19" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/same-problem-different-words-designing-real-b2b-product-for-japan-and-the-us-802630876d19">Same Problem, Different Words: Designing Real B2B Product for Japan and the US</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product Design at Zeals: What we do and how we do it]]></title>
            <link>https://medium.com/zeals-tech-blog/product-design-at-zeals-what-we-do-and-how-we-do-it-379263e9831c?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/379263e9831c</guid>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[design-teams]]></category>
            <category><![CDATA[design-process]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Anastasia WL]]></dc:creator>
            <pubDate>Tue, 01 Jul 2025 11:35:05 GMT</pubDate>
            <atom:updated>2025-07-01T00:45:11.214Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Spoiler alert: It’s not just making things look pretty (though we do love a good user interface)</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NaWHLa74KrzBiEX3" /><figcaption>Photo by <a href="https://unsplash.com/@jasongoodman_youxventures?utm_source=medium&amp;utm_medium=referral">Jason Goodman</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hey there! I’m Ana, and I’m a Product Designer on the Analytics Team at Zeals. Fun fact: I’m technically the “newest” addition to our design team, even though I’ve been here for 2 years now. Time flies when you’re having fun!</p><h3><strong>The Design Team: Small but Mighty</strong></h3><p>Let me paint you a picture of our design team at Zeals.</p><p>We’re like that friend group where everyone has different majors but somehow just <em>gets</em> each other: we are all designers, but we work on different domains of the product. We’re definitely the smaller crew compared to our engineering and product management teams, but that doesn’t mean we’re hiding in the corner being quiet. Being small actually works in our favor. We’re nimble, we can pivot quickly, and we don’t need three committee meetings to decide on a button style. Where bigger teams might get bogged down in process, we’re already sketching solutions and testing ideas. This is the good thing about being a designer in a startup: we get to move fast and break things (in the best possible way).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OCjafXL9JPf8cwmY" /><figcaption>Photo by <a href="https://unsplash.com/@yuliamatvienko?utm_source=medium&amp;utm_medium=referral">Yulia Matvienko</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We’ve mastered the art of being “independently together.” This means that each of us owns our respective domains (mine being Analytics, where I make data look good AND easy to understand), but we’re not completely isolated in our own little bubbles. Every week, we huddle up for our design crits, where we bring our domain’s design problems for the team to solve together, and we share our work-in-progress, which often includes heated debate about whether that button should be on the right or left.</p><p>This approach helps us keep our design language consistent across all products while letting each of us dive deep into our specialized areas. It’s the best of both worlds, giving us creative freedom with collaborative guardrails.</p><h4>We Own It (All of It)</h4><p>As product designers at Zeals, we don’t just design “the pretty part” and call it a day. We own the entire lifecycle of whatever feature or product we’re working on.</p><p>We’re involved from the very beginning, when we’re still trying to figure out what problem we’re actually solving, all the way to post-launch refinements. Sounds like a lot of work, but we’re not lone wolves howling at the moon. Product Managers and Engineers are basically our work besties. We’re in constant collaboration, bouncing ideas off each other, solving problems together. It’s a true partnership where everyone brings their expertise to the table.</p><h4>Beyond the Interface</h4><p>Sure, we care about making good-looking interfaces, but our <em>real job</em> is beyond that. We’re experience architects. We think about the entire user journey from the moment someone first encounters our product, to their 100th time using it. It’s like being a user experience detective, therapist, and fortune teller all rolled into one. We design for the happy path, but we also plan for the messy, chaotic, real-world scenarios where users inevitably do unexpected things.</p><h4>The Never-Ending Story</h4><p>If you’re looking for a job where you design something once and move on to the next project, product design at Zeals probably isn’t for you. Here, we ship, we learn, we iterate — on repeat.</p><p>Every launch teaches us something new. Maybe users are behaving in a different way than we expected. Maybe that brilliant flow we designed makes perfect sense to us but confuses everyone else. Maybe our analytics charts are not as easy to understand as we thought.</p><p>And you know what? That’s exactly what we want. Each piece of feedback, each data point, each user interview gives us fuel for the next iteration. We’re constantly refining, improving, and sometimes even completely rethinking our approach. It keeps things interesting and ensures we’re always moving closer to that sweet spot of user satisfaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GnsdKso5Pizgkz_s" /><figcaption>Photo by <a href="https://unsplash.com/@uxindo?utm_source=medium&amp;utm_medium=referral">UX Indonesia</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The Reality Check</h3><p>Don’t get me wrong — it’s not all smooth sailing and perfectly aligned stakeholders. Some days we’re juggling competing priorities, advocating for user needs against tight deadlines, or trying to explain why that “simple” change actually requires rethinking the entire flow. But that’s what makes it exciting. Every challenge is a puzzle to solve, every constraint is a creative opportunity, and every user pain point is a chance to make something better.</p><p>At the end of the day, being a product designer at Zeals means you get to be part of something bigger than just making pixels look nice. We’re solving real problems for real people, working with talented humans who challenge us to be better, and constantly learning new things.</p><p>Plus, in my totally unbiased opinion, our designers are the most awesome people. Just saying.</p><p><em>Thinking about joining our design team? We’re always looking for curious, user-focused designers who thrive in collaborative environments and aren’t afraid of a little chaos. Check out our open positions or reach out if you’d like to know more.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=379263e9831c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/product-design-at-zeals-what-we-do-and-how-we-do-it-379263e9831c">Product Design at Zeals: What we do and how we do it</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Agile and Why Does It Matter?]]></title>
            <link>https://medium.com/zeals-tech-blog/what-is-agile-and-why-does-it-matter-3edf8fce8b58?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/3edf8fce8b58</guid>
            <category><![CDATA[scrum-master]]></category>
            <category><![CDATA[agile-coaching]]></category>
            <category><![CDATA[scrum-agile]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[culture]]></category>
            <dc:creator><![CDATA[David Esteban Ines]]></dc:creator>
            <pubDate>Thu, 21 Sep 2023 09:55:53 GMT</pubDate>
            <atom:updated>2023-09-21T09:55:53.625Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone! I’m David, and as a Scrum Master at Zeals, I like working with agile in my teams to constantly improve and adapt our product and processes over time. In this article, I’ll touch more upon what agile means and why it matters in our teams, so that you can also understand it’s necessity in creating top, quality products efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GRGVykJlJggrQTTC1Dqtyg.jpeg" /><figcaption>Image by <a href="https://www.freepik.com/free-vector/professional-group-working-project_4950283.htm#query=agile&amp;position=5&amp;from_view=search&amp;track=sph">katemangostar </a>on Freepik</figcaption></figure><p><strong>What is Agile and Why Does It Matter?</strong></p><p>Agile is a development methodology and way of working based on a cyclical process of refining or tweaking the latest version or iteration of a product, process, or idea to make a subsequent version using an incremental approach. Scrum teams working with agile implement incremental changes and deliver them in a timely manner. For me, I personally see Agile as a recipe that blends collaboration, flexibility, and customer-focused approach to create amazing results. Agile allow us to navigate challenges smoothly, tweaking and improving all the way.</p><p>Instead of long development cycles, Agile lets you break projects into manageable tasks, delivering value in small doses. This not only speeds up the delivery of results but also allows our teams to adapt to changes on the go. Our company is in a constantly changing environment and, therefore, reducing the time for the adaptation/learning curves is an early victory.</p><p><strong>Collaboration is a Key Aspect of Working with Agile</strong></p><p>At the heart of Agile lies collaboration. Zeals is made up of very diverse teams very diverse teams but working together in one product with multiple features, this means sharing ideas, and bringing the unique skills of each team together in order to achieve a common goal.</p><p>At Zeals, if the Product and Technology department embraces Agile, it means we are placing the customer at the center of everything and we learn how to adapt to their changing needs creating products and services that truly matter to them, our industry is a rapidly changing world, where agility holds the key to success. This not only strengthens customer loyalty but also opens the door to new business opportunities.</p><p><strong>Key Takeaways</strong></p><p>Agile isn’t just about adopting a methodology; it’s a deep and meaningful cultural shift, as it requires trust, flexibility, and an open mindset. I know, some times its not easy to implement but a team committed to Agile values becomes an unstoppable force capable of overcoming any obstacle.</p><p>But how do you navigate this transformative journey? This is where Agile coaching comes in. Agile coaches will provide the necessary tools, support, and insights to ensure that Agile principles are not just understood, but woven into the fabric of your company’s culture.</p><p>In an industry where adaptability and innovation are the key, implementing Agile is the path to business greatness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3edf8fce8b58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/what-is-agile-and-why-does-it-matter-3edf8fce8b58">What is Agile and Why Does It Matter?</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Fundamental Test Process in Software Testing]]></title>
            <link>https://medium.com/zeals-tech-blog/the-fundamental-test-process-in-software-testing-7da96e1d6e33?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/7da96e1d6e33</guid>
            <category><![CDATA[qa-testing]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[test-planning]]></category>
            <category><![CDATA[qa-automation]]></category>
            <dc:creator><![CDATA[フエザル (Fais)]]></dc:creator>
            <pubDate>Wed, 02 Aug 2023 04:17:09 GMT</pubDate>
            <atom:updated>2023-08-02T04:17:09.363Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*5rr2IhRsXRtsrZr_" /></figure><p>At Zeals, I have recently been working on the entire test process of “Robotic Process Automation,” which refers to automating the process of inputting previously collected information into a target webform at a specified URL and the automation of filling out client forms. So, for this reason, I thought it would be good to explain more about testing, as well as the importance of each step in the testing process.</p><p>Testing, despite common misconceptions, follows a systematic approach. The initial step in this process is test planning, followed by test case creation, execution preparation, and status evaluation, concluding with test closure. Consequently, the essential activities of the test process can be categorized into the subsequent stages:</p><p>1. Planning and Control</p><p>2. Analysis and Design</p><p>3. Implementation and Execution</p><p>4. Evaluating exit criteria and Reporting</p><p>5. Test Closure activities</p><h3>Planning and Control</h3><p><strong>Test planning encompasses several crucial activities:</strong></p><p>· Determining the test approach for conducting the test, in order to ascertain the extent of potential risks, as well as to pinpoint the objectives of testing.</p><p>· Implementing test policies and a test strategy. Test strategy is an outline that describes the testing portion of the software development cycle. It is created to inform PMs, testers, and developers about key issues of the testing process. This includes the testing objectives, method of testing, total time and resources required for the project, and the testing environments.</p><p>· Conducting a comprehensive evaluation to ascertain the necessary resources for testing, such as personnel, testing environments, and computer systems.</p><p>· Arranging the allocation of time for carrying out tasks related to analyzing and designing tests, implementing them, executing them, and evaluating the results.</p><p>· Defining specific criteria known as Exit criteria in order to establish the conditions under which the testing phase can be concluded. These criteria are primarily focused on measuring the extent of coverage, which pertains to the percentage of software statements that must be executed during the testing process. By monitoring these criteria, Testers can assess the accuracy and completeness of testing activities. Additionally, these criteria provide clear guidelines for the tasks and evaluations that must be accomplished at each level of testing before the tester can declare the testing phase as complete.</p><p><strong>The main responsibilities of test control include the following:</strong></p><p>· To assess and analyze the results of reviews and testing.</p><p>· To oversee and record the advancement, scope of testing, and conditions for completion.</p><p>· To provide information on testing.</p><p>· To commence measures aimed at rectifying the situation.</p><p>· To make decisions.</p><h3>Analysis and Design:</h3><p><strong>The primary responsibilities of test analysis and test design encompass the following essential tasks:</strong></p><p>· To review the test basis. The test basis serves as essential information for initiating test analysis and developing customized test cases. It primarily encompasses documentation that forms the foundation for test cases, including requirements, design specifications, product risk analysis, architecture, and interfaces. These test basis documents enable us to gain a comprehensive understanding of the expected functionalities and behavior of the system once it is developed.</p><p>· To ascertain the conditions under which tests should be conducted.</p><p>· To create the tests.</p><p>· To assess the testability of both the requirements and the system, we must conduct a comprehensive evaluation.</p><p>· In order to establish the test environment and determine the necessary infrastructure and tools, we must think about the design process.</p><h3>Implementation and Execution:</h3><p>When conducting the implementation and execution of tests, Testers consider the test conditions and convert them into test cases and procedures, along with other Testware such as automation scripts, the test environment, and any additional testing infrastructure. Test cases are composed of conditions a tester uses to assess an application’s correct functionality. Testware refers to all the tools and resources used for testing software, including scripts, the test environment, and other infrastructure elements that can be reused in the future.</p><p><strong>The implementation of the test involves a set of primary responsibilities.</strong></p><p>· To assess the functionality of a software application, it is necessary to develop and prioritize test cases. These test cases involve the utilization of various techniques to create test data. Test data refers to the information entered during testing to evaluate different features and aspects of the software. Additionally, test procedures are created to provide instructions for conducting the tests. To streamline the testing process, testers may also employ test harnesses and automated test scripts. The test harness is a collection of software and test data that enable the testing of specific program units under varying conditions, allowing for the monitoring of their behavior and outputs.</p><p>· To create test suites from the test cases to streamline the process of conducting tests. Test suites refer to a compilation of test cases designed to evaluate a software program and demonstrate its predetermined set of functionalities. These test suites typically include comprehensive instructions and system configuration details to be employed during testing. Test suites serve the purpose of grouping together test cases that share similar characteristics.</p><p>· To execute and authenticate the setup.</p><p><strong>Test execution has the following significant responsibilities:</strong></p><p>· To carry out test suites and individual test cases in accordance with the specified testing procedures.</p><p>· Confirmation testing or re-testing involves rerunning the tests that failed to verify a fix’s effectiveness.</p><p>· The purpose of logging the test execution results in the software testing process is to document the test cases executed, their order, and the relevant details such as who executed them and their results (pass/fail). This information is recorded in the test log, which serves as an audit trail.</p><p>· To evaluate the achieved outcomes in contrast to the anticipated outcomes.</p><p>· Incidents are reported when there are differences between the actual outcomes and the anticipated outcomes.</p><h3>Evaluating Exit Criteria and Reporting:</h3><p>The risk evaluation of the project will establish the standards, known as exit criteria for each test stage, which will serve as the benchmark for determining the adequacy of testing.</p><p>Exit criteria are relevant in situations where certain conditions must be met to determine when a process or activity can be considered:</p><p>· Most test cases undergo execution with a specific rate of successful completion.</p><p>· Bug rate dips below a specific threshold.</p><p>· When the deadlines have been met.</p><p><strong>Evaluating exit criteria has the following major tasks:</strong></p><p>· To verify the test logs against the predetermined exit criteria outlined in the test planning process.</p><p>· To determine the necessity of additional tests or the need to modify the specified exit criteria.</p><p>· To compose a comprehensive report on test results and findings for stakeholders.</p><h3>Test Closure activities:</h3><p>Test closure activities in software testing are typically performed upon delivery of the software. However, there are various other circumstances where the testing process can be officially concluded.</p><p>· Once all the requisite data has been collected for the testing process.</p><p>· In the event of the termination of a project.</p><p>· When a specific objective is successfully attained.</p><p>· Maintenance releases or updates are conducted.</p><p><strong>Test Closure activities encompass several essential responsibilities:</strong></p><p>· This task verifies the completion of planned deliverables and ensures the resolution of all incident reports.</p><p>· The process of concluding and storing Testware, such as test scripts and test environments, in a formal manner for future reuse.</p><p>· The Testware will be transferred to the maintenance organization, which will provide software support.</p><p>· To assess the outcome of the testing process and extract valuable insights for forthcoming releases and projects.</p><p><strong>CONCLUSION</strong>:</p><p>Testing is a process rather than a single activity. Testing must be planned and it requires discipline to carry it out. Here at Zeals, we believe testing is a fundamental and crucial part of any software project. Following the fundamentals of the testing process, we plan for testing adequately to ensure that the product or service is of the highest quality and meets the requirements of the user.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7da96e1d6e33" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/the-fundamental-test-process-in-software-testing-7da96e1d6e33">The Fundamental Test Process in Software Testing</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Empowering Data Management with Google Cloud Platform: Unleashing the Power of a Data Lakehouse]]></title>
            <link>https://medium.com/zeals-tech-blog/empowering-data-management-with-google-cloud-platform-unleashing-the-power-of-a-data-lakehouse-e773e8941b37?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/e773e8941b37</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-lakehouse]]></category>
            <dc:creator><![CDATA[Sirajus Salayhin]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 07:52:46 GMT</pubDate>
            <atom:updated>2023-06-29T07:52:46.665Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In today’s data-driven world, organizations face the challenge of managing and analyzing large amounts of data from different sources. To overcome this challenge, the concept of a data lakehouse has emerged as a powerful solution.</p><p>This article will explore how we leveraged Google Cloud Platform (GCP) technologies to build a robust data lakehouse. Our architecture includes GCP services such as Datastream, GCS, BigQuery (Biglake), Cloud Composer, Dataproc, Dataplex, and Data Catalog.</p><h3>What is a Data Lakehouse?</h3><p>A Data Lakehouse is a unified and scalable data platform that combines the best of data lakes and data warehouse.</p><h3>Architecture</h3><p>The top-level architecture of Data Lakehouse:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQZJuRVGp4TJESE6rY-7Yg.png" /><figcaption>Data Lakehouse Architecture</figcaption></figure><h4>Lakehouse Components</h4><p>The data lakehouse is composed of the following components:</p><p><strong>Ingestion:</strong> Capturing and importing data from different sources into the data lakehouse for real-time or batch processing.</p><p><strong>Processes:</strong> Applying data transformations, aggregations, and analytics to get valuable insights from the data within the data lakehouse.</p><p><strong>Storage:</strong> Providing a reliable and scalable storage layer to store large volumes of structured, semi-structured, and unstructured data in its raw and processed forms.</p><p><strong>Consumption:</strong> To retrieve and analyze data from the data lakehouse using various tools and technologies such as SQL queries, serverless applications, business intelligence (BI) tools, and machine learning (ML) applications.</p><p><strong>Governance:</strong> Establishing policies, procedures, and controls to ensure data quality, security, privacy, and compliance within the data lakehouse. This includes managing metadata, access controls, data lineage, and auditing capabilities.</p><h4>Organizing Data in a Data Lakehouse</h4><p>To organize data in our lakehouse, we follow Medallion Architecture which is a systematic approach to logically organizing data within a Data Lakehouse. It follows a standardized structure comprising three main layers, namely Bronze, Silver, and Gold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/0*Xg2HT1nC66zM3-8c" /><figcaption>Data Management</figcaption></figure><p><strong>Bronze Layer:</strong></p><ul><li>It acts as a landing zone for the Data Lakehouse.</li><li>Raw, unprocessed data is stored in the Bronze Layer.</li><li>In bronze, data is ingested from various sources without any transformation.</li><li>Data is stored in its raw form, making it easy to trace back to its source.</li><li>It provides a comprehensive and historical view of the data.</li></ul><p><strong>Silver Layer:</strong></p><ul><li>The Silver Layer is a curated and transformed version of the raw data.</li><li>Data from the Bronze Layer is processed, cleaned, and standardized.</li><li>This is a cleaned version of Raw Data.</li><li>Data quality checks and validation are performed to ensure accuracy.</li></ul><p><strong>Gold layer:</strong></p><ul><li>The Gold Layer represents refined and business-ready data.</li><li>The Gold Layer contains aggregated, summarized, and pre-calculated data for efficient querying and analysis.</li><li>It is optimized for specific use cases and analytical purposes.</li><li>Advanced analytics, machine learning, and data modeling are performed on the data in the Gold Layer.</li><li>Data in the Gold Layer is often delivered through business intelligence tools, dashboards, or data APIs for consumption by end-users.</li></ul><h3>Implementation of Google Cloud services</h3><p>We have implemented a data lakehouse on the Google Cloud Platform (GCP) using the following technologies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1rNAAyehgYSi48A4" /><figcaption>Big Lake (Image: Google Cloud Platform Official Documentation)</figcaption></figure><ul><li>Datastream: CDC for real-time data ingestion from DBMS</li><li>Cloud Storage (GCS): For low-cost storage, this is the main storage of our Data</li><li>BigLake: Storage engine that unifies data warehouses and data lakes</li><li>Cloud Composer: For orchestration of data pipelines</li><li>Dataproc: Managed Spark/ Hadoop clusters for data processing</li><li>Dataflow: Real-time data processing from Google Pub/Sub</li><li>Dataplex: For data management and governance</li><li>Data Catalog: For metadata management</li></ul><h3>Benefits of Data Lakehouse:</h3><p>Implementation of Data Lakehouse has some benefits which include:</p><p><strong>Unified Data Storage</strong>: A data lakehouse provides a unified storage solution for various types of data, making it easier to manage and analyze all data in one place.</p><p><strong>Scalability</strong>: It can easily scale to handle large volumes of data as our business grows, ensuring smooth data management without compromising performance.</p><p><strong>Flexibility</strong>: A data lakehouse supports diverse data types, including structured, semi-structured, and unstructured data</p><p><strong>Data Exploration and Discovery</strong>: With a data lakehouse we can use various tools for data exploration and analytical purposes.</p><p><strong>Cost-Effectiveness</strong>: By utilizing cloud-based resources and optimized data storage techniques, it is a cost-effective solution for storing and processing data.</p><p><strong>Real-Time and Batch Processing</strong>: It allows for both real-time and batch processing of data, ensuring timely analysis of streaming data while also handling large-scale data processing tasks.</p><p><strong>Advanced Analytics and Machine Learning</strong>: With a data lakehouse, we can leverage advanced analytics techniques and apply machine learning algorithms to extract meaningful insights and predictions from the data.</p><p><strong>Data Governance and Security</strong>: A data lakehouse provides robust data governance and security features, allowing us to control data access, enforce privacy policies, and maintain data integrity and compliance with regulations.</p><h3>Conclusion</h3><p>We have successfully built a data lakehouse on the Google Cloud Platform. The lakehouse provides a unified platform for storing, managing, and analyzing data. It is scalable, secure, and cost-effective. We are confident that the data lakehouse will help us to make better decisions and improve our business.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e773e8941b37" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/empowering-data-management-with-google-cloud-platform-unleashing-the-power-of-a-data-lakehouse-e773e8941b37">Empowering Data Management with Google Cloud Platform: Unleashing the Power of a Data Lakehouse</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[UX Research Q&A at Zeals]]></title>
            <link>https://medium.com/zeals-tech-blog/ux-research-q-a-at-zeals-58a0b78d9cbe?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/58a0b78d9cbe</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[ux-research]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[user-experience-research]]></category>
            <category><![CDATA[user-behavior]]></category>
            <dc:creator><![CDATA[Ashley Oros]]></dc:creator>
            <pubDate>Thu, 11 May 2023 03:23:07 GMT</pubDate>
            <atom:updated>2023-05-11T03:23:07.386Z</atom:updated>
            <content:encoded><![CDATA[<p>At Zeals, we like to keep communication lines open and curiosity high. So when a coworker wanted to know more about UX Research, I got ready to share my perspective with them. They were curious about the amount of time it takes to conduct UX Research and if it was possible to maintain high-quality research results while also limiting the research time. This is a tricky question because it’s important to maintain a balance between time and results. I would like to share my perspective on how not only to do “speedy” UX Research but in a way that we don’t lose good quality.</p><p><em>Please note there are many ways and perspectives to achieve this, but I am tailoring my answer specifically for Zeals.</em></p><figure><img alt="An alloy top spinner" src="https://cdn-images-1.medium.com/max/1024/0*burzy_Uud6Pjz7X-" /><figcaption>Photo by <a href="https://unsplash.com/ja/@hautier?utm_source=medium&amp;utm_medium=referral">Christophe Hautier</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>UXR Tip #1</strong></p><p>From the start, I believe it’s important to <strong>prioritize what you want to understand</strong>. There are many unknowns within research and it’s important to not get overwhelmed by the amount we don’t know yet. Listing out all the research questions and prioritizing the most important ones with your team is a great way to start planning for upcoming research. This will prevent wasting time on lower-priority research that can be saved for later. Think about how the research will prioritize not only the business and tech side, but the <strong><em>user needs </em></strong>as well.</p><p>Once the highest priority research has been decided, the UX Researcher can help you decide on <strong>the correct methodology</strong> for finding the answers to the unknowns. This is crucial in saving time and doing speedy research as sometimes the answer to a question can be solved with a simple A/B test. Other times, it requires recruiting users, compensating time, and designing high-fidelity prototypes which can take more time. If you’d like research to move even faster, narrow the scope of the research from the start instead of leaving the goal too broad.</p><p><strong>UXR Tip #2</strong></p><p>Although it does take time to recruit participants, time can also be saved by <strong>using remote tools</strong> to help recruit participants, measure surveys, and usability tests. In order to make iterations quickly and identify issues, sending out unmoderated surveys and/or usability tests allows participants to complete them according to their schedule. This saves time for the researcher and participants which is a win-win for us!</p><p><strong>UXR Tip #3</strong></p><p>Although it’s great to move fast and get the research completed, conducting speedy research does come with the <strong>risk of lowering the quality</strong> of the research in the end. There will be a lot of quantitative data showing up after each test is completed, but it’s not enough to accept numbers at face value. The numbers don’t explain the why behind a 5/10 or the why for a sad face emoji. It’s best to ensure research is given enough time to gather and analyze all the data. Ideally, it’s best to give a few weeks per research project, but answering a short question could take about a few days depending on the participants’ schedule.</p><figure><img alt="Colorful Post-It notes on a wall." src="https://cdn-images-1.medium.com/max/1024/0*U9ZMAq2NA8Q_N7A6" /><figcaption>Photo by <a href="https://unsplash.com/@jasongoodman_youxventures?utm_source=medium&amp;utm_medium=referral">Jason Goodman</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>To wrap up, yes, it is possible to conduct speedy UX Research. We can speed up the process by prioritizing the research questions, selecting the right methodology, and using remote tools to help with the process. However, if the UX Researcher advises spending a few weeks to learn more about an important part of the user flow, think of all the great insights you’ll learn!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58a0b78d9cbe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/ux-research-q-a-at-zeals-58a0b78d9cbe">UX Research Q&amp;A at Zeals</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Your Own Time-Based OTP Generator]]></title>
            <link>https://medium.com/zeals-tech-blog/implementing-your-own-time-based-otp-generator-3b971a31330b?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/3b971a31330b</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[otp-verification]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[binary]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Vi Hsieh]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 05:32:53 GMT</pubDate>
            <atom:updated>2023-03-01T05:32:53.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vXZ6YjcjJu4iATiKfLpE0g.jpeg" /></figure><p>Recently I came across a coding challenge that required challengers to generate their own Time-Based One-Time Password (TOTP) following a set of pre-defined rules. It required a basic understanding of the TOTP standard defined in <a href="https://www.rfc-editor.org/rfc/rfc6238">RFC 6238</a>, and in turn, the underlying HOTP (HMAC-Based One-Time Password) algorithm defined in <a href="https://www.rfc-editor.org/rfc/rfc4226#section-5">RFC 4226</a>.</p><p>Oof, daunting. Until then, I hadn’t given OTPs much thought beyond “How does this work?”</p><p>Turns out, everything about how it works is detailed in well written documents that are easily accessible in both availability and, to my surprise, difficulty. But more wonderfully, these documents provide insight into the design decisions of the algorithms.</p><p>For example, in <a href="https://www.rfc-editor.org/rfc/rfc4226#section-5">RFC 4226</a>, while foreshadowing the rise of smart phones,</p><blockquote><em>… the current approach that requires an end user to carry an expensive, single- function device that is only used to authenticate to the network is clearly not the right answer. For two-factor authentication to propagate on the Internet, it will have to be embedded in more flexible devices that can work across a wide range of applications.</em></blockquote><p>the authors revealed their belief in embedding OTP in more flexible devices, and this is what led to the open-system approach of HOTP which ensures its interoperability.</p><p>Thank you, Krawczyk, et. al.</p><p>The RFC series warrants its own blog post and it is not this one, sorry to disappoint. This blog post is a tutorial for implementing your own Time-Based One-Time Password in <strong>Python</strong> following the algorithms described in <a href="https://www.rfc-editor.org/rfc/rfc6238">RFC 6238</a> and <a href="https://www.rfc-editor.org/rfc/rfc4226#section-5">RFC 4226</a>.</p><h3>TOTP Definition</h3><p><a href="https://www.rfc-editor.org/rfc/rfc6238">RFC 6238</a> states that TOTP is defined as TOTP = HOTP(K, T).</p><pre>def totp(k, t):<br>    return hotp(k, t)</pre><p>Welp, looks like we’ll have to take a step back and implement HOTP first.</p><h3>HOTP Defintion</h3><p><a href="https://www.rfc-editor.org/rfc/rfc4226#section-5">RFC 4226</a> states:</p><p><em>The HOTP algorithm is based on an increasing counter value and a static symmetric key known only to the token and the validation service. In order to create the HOTP value, we will use the HMAC- SHA-1 algorithm, as defined in </em><a href="https://www.rfc-editor.org/rfc/rfc2104"><em>RFC 2104</em></a><em>.</em></p><p>Hmm, guess we’ll have to take another step back and… just kidding, we’ll dip our toes in that rabbit hole another time.</p><p>Python’s built-in hmac module will help us generate the HOTP value for now.</p><p><em>As the output of the HMAC-SHA-1 calculation is 160 bits, we must truncate this value to something that can be easily entered by a user.</em></p><p>With that, we get the definition: HOTP(K,C) = Truncate(HMAC-SHA-1(K,C)).</p><pre>def hotp(k, c):<br>    return truncate(hmac_sha_1(k, c))</pre><p>Primary Parameters</p><ul><li>k: The Key, which is the shared secret between the client and server. The server must share this key or the method for deriving this key with the client.</li><li>c: An 8-byte counter value. This value increments after each OTP generation. Therefore, the counter has to be synchronized between the client and server.</li></ul><p>Client and Server</p><ul><li>Client: the HOTP generator</li><li>Server: the HOTP validator</li></ul><p>The key(k) and counter(c) are the principal verification factors for authentication. We will not get into the details of the HMAC algorithm, so to put it simply, HMAC is a method for authenticating a <em>message</em> by using a hash function (eg. SHA-1) and a <em>shared secret</em>. Given the same values for the shared_secret, message, and hash_function, the following is always <strong>true</strong>.</p><pre># pseudo-code<br>hmac(shared_secret, message, hash_function) == hmac(shared_secret, message, hash_function)</pre><p>In HOTP, the key k is the shared secret, and the counter c is the message.</p><p>Because the counter value increments after each OTP generation, the value is guaranteed to be single-use, thus ensuring the one-time property of the password.</p><h4>For the purposes of this tutorial, we will ignore the need to increment the counter because we will only focus on the OTP generation.</h4><p>We’ll get to the truncate function in a little bit. For now, understand that this is the function that would convert a long hash string into the 6-digit OTP values we most frequently see in two-factor authentication.</p><p>Let’s go over the steps to generate an HOTP value, taken directly from the RFC (<a href="https://www.rfc-editor.org/rfc/rfc4226#section-5.3">Section 5.3</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*l4r263_WKsfalegH7NRJuQ.png" /></figure><p>Step 2 and 3 made no sense to me, but we’ll figure them out as we go over the steps one-by-one.</p><h3>Step 1: Generate an HMAC-SHA-1 value</h3><p>We will use the built-in <a href="https://docs.python.org/3/library/hmac.html#hmac.new">hmac.new</a> method to help us generate the HMAC-SHA-1 value.</p><pre>import hmac</pre><p>For this implementation, we will use an arbitrary string &quot;password&quot; and base32 encode it to use as our shared secret. Our counter value is 0.</p><pre>import base64<br><br>secret = base64.b32encode(b&quot;password&quot;)<br>counter = 0<br>counter_bytes = counter.to_bytes(8, byteorder=&#39;big&#39;)  # 8-byte, big-edian<br>hs_hmac = hmac.new(secret, counter_bytes, &quot;sha1&quot;)<br><br><br>&gt;&gt;&gt; hs_hmac<br>&lt;hmac.HMAC object at 0x1093d4220&gt;<br>&gt;&gt;&gt; hs_hmac.hexdigest()<br>&#39;30eb405e8b59bf997aa83f904cd03cd41e3585b3&#39;</pre><p><em>The counter value is hashed </em><a href="https://www.rfc-editor.org/rfc/rfc4226#section-5.2"><em>high-order byte first</em></a><em>, so we’re ordering the most significant byte at the beginning of the byte array with </em><em>byteorder=&#39;big&#39;. See </em><a href="https://docs.python.org/3/library/stdtypes.html#int.to_bytes"><em>python docs</em></a><em>.</em></p><p>Step 1.2 states that HS is a 20-byte string, which we can obtain from the hmac object using the digest() <a href="https://docs.python.org/3/library/hmac.html?highlight=hmac#hmac.HMAC.digest">method</a>.</p><pre>hs = hs_hmac.digest()<br><br><br>&gt;&gt;&gt; hs<br>b&#39;0\xeb@^\x8bY\xbf\x99z\xa8?\x90L\xd0&lt;\xd4\x1e5\x85\xb3&#39;</pre><p>Next, we have to begin tackling the Truncate function which the RFC breaks down into two steps: Step 2 (dynamic truncation) and Step 3 (reduction modulo 10^digit).</p><h3>Step 2: Generate a 4-byte string (Dynamic Truncation)</h3><p>The RFC has helpfully provided us with the function defintion for dynamic truncation:</p><pre>DT(String) // String = String[0]...String[19]<br> Let OffsetBits be the low-order 4 bits of String[19]<br> Offset = StToNum(OffsetBits) // 0 &lt;= OffSet &lt;= 15<br> Let P = String[OffSet]...String[OffSet+3]<br> Return the Last 31 bits of P</pre><p>To avoid confusion, we will give our functions and variables the same names as above but in snake case for readability.</p><pre>def DT(hs):<br>    offset_bits = low_order_4_bits(hs[19])<br>    offset = st_to_num(offset_bits)<br>    p = hs[offset:offset+4]<br>    return last_31_bits(p)</pre><p>In summary,</p><ol><li>The DT function receives a 20-byte string.</li><li>Using the first byte, we generate an offset value.</li><li>Then we we extract from the 20-byte string 4 bytes starting from the offset value.</li><li>Finally, we return the last 31 bits from the extracted 4 bytes.</li></ol><p>Now, let’s go over the DT function line-by-line.</p><pre>offset_bits = low_order_4_bits(hs[19])</pre><p>To get our offset value, we need to first extract the low-order 4 bits of hs[19] . This can be achieved by <a href="https://en.wikipedia.org/wiki/Mask_(computing">masking</a>).</p><pre>def low_order_4_bits(val):<br>    return val &amp; 0b1111</pre><h4>Bytes and Bits</h4><h4><em>If you’re already familiar with binary and bitwise operations, you may want to skip this section.</em></h4><p>To understand the logic behind our low_order_4_bits function, let&#39;s take a deeper look at the values we are dealing with.</p><p>The value we pass into the function is hs[19]. With hs being a 20-byte string, we understand that hs[19] is the last byte in the byte string.</p><pre>&gt;&gt;&gt; hs<br>b&#39;0\xeb@^\x8bY\xbf\x99z\xa8?\x90L\xd0&lt;\xd4\x1e5\x85\xb3&#39;<br>&gt;&gt;&gt; hs[19]<br>179</pre><p>Hmm? It’s an integer?</p><p>Yes! Hexadecimal, binary, ascii, decimal. These are all different ways to represent the same values.</p><p>By representing the same value (179) in bytes, decimal, and binary, we get a better understanding of what we&#39;re working with.</p><pre>&gt;&gt;&gt; hs[19]<br>179<br>&gt;&gt;&gt; (179).to_bytes(1, &#39;big&#39;)   # big or little doesn&#39;t matter here<br>b&#39;\xb3&#39;<br>&gt;&gt;&gt; b&#39;\xb3&#39;.hex()  # bytes to hexadecimal<br>&#39;b3&#39;<br>&gt;&gt;&gt; int(&#39;b3&#39;, 16)  # hexadecimal to decimal (base-16 to base-10)<br>179<br>&gt;&gt;&gt; bin(179)       # decimal to binary<br>&#39;0b10110011&#39;<br>&gt;&gt;&gt; int(&#39;10110011&#39;, 2)  # binary to decimal (base-2 to base-10)<br>179</pre><p>Now, with this understanding, let’s return to our low_order_4_bits function. The RFC instructs us to extract the last four bits of the byte (hs[19]).</p><p>As seen above, the binary for hs[19] (or 179) is 10110011. It has 8 bits. We want to get rid of the first 4 bits (1011) and return 0011. To achieve this, we need to use the bitwise AND operator (&amp;).</p><p>For our mask, we will use the binary 00001111. You can think of the zeroes as representing the positions that we want to &quot;turn off&quot;, and the ones as the positions we want to keep &quot;on&quot;. (This is only true for bitwise AND.)</p><p>As you recall, the binary for 179 is 10110011.</p><pre>&gt;&gt;&gt; 179 &amp; 0b00001111         # masking decimal with binary<br>3<br>&gt;&gt;&gt; 0b10110011 &amp; 0b00001111  # masking binary with binary<br>3<br>&gt;&gt;&gt; 0b00001111               # binary of 00001111 is 15<br>15<br>&gt;&gt;&gt; 179 &amp; 15                 # masking decimal with decimal   <br>3<br>&gt;&gt;&gt; bin(3)                   # binary of 3 is 0011 or 11<br>&#39;0b11&#39;</pre><p>In binary, prefix zeroes can be omitted (00001111 == 1111), so 11 in binary is the last four bits (0011) we were looking to extract.</p><pre>&gt;&gt;&gt; 0b0011<br>3<br>&gt;&gt;&gt; 0b11<br>3<br>&gt;&gt;&gt; 0b00001111<br>15<br>&gt;&gt;&gt; 0b1111<br>15</pre><p>As you can see, we have successfully extracted the last 4 bits of 179 by masking it with 0b1111.</p><p>Given what we know about binaries and masking, these are the different ways we can write the same function:</p><pre>def low_order_4_bits(val):<br>    return val &amp; 0b1111<br><br>def low_order_4_bits(val):<br>    return val &amp; 15<br><br>def low_order_4_bits(val):<br>    return val &amp; 0b00001111</pre><p>A more common way to represent the bitmask is with a hexadecimal number, which we will see again later.</p><pre>def low_order_4_bits(val):<br>    return val &amp; 0xf</pre><pre>&gt;&gt;&gt; 0xf<br>15<br>&gt;&gt;&gt; hex(15)<br>&#39;0xf&#39;</pre><p>Whew.</p><p>Back to our dynamic truncation function.</p><pre>def DT(hs):<br>    offset_bits = low_order_4_bits(hs[19])<br>    offset = st_to_num(offset_bits)<br>    p = hs[offset:offset+4]<br>    return last_31_bits(p)</pre><p>We already saw how our return value for low_order_4_bits is automatically treated as a number, so we can remove the second line in the function. Yay!</p><pre>def DT(hs):<br>    offset = low_order_4_bits(hs[19])<br>    p = hs[offset:offset+4]<br>    return last_31_bits(p)</pre><p>Recall that the objective of this step (Step 2) is to generate a 4-byte string from the original 20-byte string (hs). The RFC instructs us to do this by extracting 4 consecutive bytes from an offset. Now that we have calculated our offset which is 3, we can simply slice the 20-byte string from index 3 to index 3 + 4, just like you would an array.</p><p>That was easy!</p><p>Next, we have to return the last 31 bits from our slice of bytes. A byte is 8 bits, so currently we have 32 bits (8 * 4). How do we return the last 31 bits?</p><p>Masking!</p><p>Fortunately, the RFC has graciously provides us with the value to use for our mask (0x7f) which we will be using on the first byte of this slice.</p><blockquote><em>The reason for masking the most significant bit of P is to avoid confusion about signed vs. unsigned modulo computations. Different processors perform these operations differently, and masking out the signed bit removes all ambiguity.</em></blockquote><p>Not only do we have to mask the first byte with 0x7f, we will also be masking the rest of the bytes with 0xFF which in binary is 11111111. This ensures that the byte we append to the array is at most 8 bits. Isn&#39;t a byte always 8 bits? Depending on the architecture of your system, a <a href="https://en.wikipedia.org/wiki/Byte">byte</a> can be larger than 8 bits.</p><p>We’ll start with an intuitive, iterative approach by initiating an empty <a href="https://docs.python.org/3/library/stdtypes.html#bytearray">bytearray</a> that will be our return value. Then, we’ll mask the first byte of the slice with 0x7f and then iterating over the rest of the slice to mask the rest of the bytes with 0xFF before appending it to our bytearray.</p><pre>def last_31_bits(p):<br>    res = bytearray()<br>    res.append(p[0] &amp; 0x7F)    # 7 bits<br>    for b in p[1:]:<br>        res.append(b &amp; 0xFF)   # 8 bits<br>    return res</pre><pre>&gt;&gt;&gt; ba = last_31_bits(p)<br>&gt;&gt;&gt; ba<br>bytearray(b&#39;^\x8bY\xbf&#39;)<br>&gt;&gt;&gt; ba.hex()<br>&#39;5e8b59bf&#39;<br>&gt;&gt;&gt; int(ba.hex(), 16)<br>1586190783<br>&gt;&gt;&gt; bin(int(ba.hex(), 16))<br>&#39;0b1011110100010110101100110111111&#39;<br>&gt;&gt;&gt; len(bin(int(ba.hex(), 16)))<br>33</pre><p>33 minus the length of the prefix (“0b”) at the beginning of the binary string is 31.</p><p>We’re done with Step 2!</p><h3>Step 3: Compute an HOTP value</h3><p>Let’s review the instructions for Step 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*NRfn5uZl1RinudGGfN9fKA.png" /></figure><p>We already know how to convert a bytearray to an integer. Easy peasy.</p><pre>s_bits = last_31_bits(p)<br>s_num = int(s_bits.hex(), 16)<br><br># or<br>s_num = int.from_bytes(s_bits, &#39;big&#39;)<br><br><br>&gt;&gt;&gt; s_num<br>1586190783</pre><p>Next, in order to generate a 6-digit value for our OTP, we need to calculate s_num mod 10^6.</p><pre>otp = s_num % 10 ** 6<br><br><br>&gt;&gt;&gt; otp<br>190783</pre><p>We have our One-Time Password!</p><p>To check our work, we will use the <a href="https://github.com/pyauth/pyotp">PyOTP library</a>.</p><pre>pip install pyotp</pre><p>Recall that we used a base32 encoded value to generate our HMAC-SHA-1 value in Step 1.</p><pre>&gt;&gt;&gt; secret<br>b&#39;OBQXG43XN5ZGI===&#39;<br>&gt;&gt;&gt; base64.b32decode(secret)<br>b&#39;password&#39;</pre><p>Because the <a href="https://github.com/pyauth/pyotp">PyOTP library</a> expects to receive a base32 encoded secret and then <em>decodes</em> the secret before hashing, if we pass our current secret directly to the pyotp.HOTP method, b&#39;password&#39; will be used to generate the hmac value instead of b&#39;OBQXG43XN5ZGI===&#39; which is what we used throughout this tutorial.</p><p>In order to get the same result, we have to base32 encode our already encoded secret one more time so the library uses the same value as we did for hashing.</p><pre>import pyotp<br><br>secret = base64.b32encode(b&quot;password&quot;)<br>secret = base64.b32encode(secret)  # b&#39;J5BFCWCHGQZVQTRVLJDUSPJ5HU======&#39;<br>hotp = pyotp.HOTP(secret)<br><br><br>&gt;&gt;&gt; hotp.at(0)<br>190783<br>&gt;&gt;&gt; hotp.at(0) == otp<br>True</pre><p>We did it! 🎉</p><p>Here’s our work so far:</p><pre>import hmac<br>import base64<br><br>counter = 0<br>secret = base64.b32encode(b&quot;password&quot;)<br><br><br>def low_order_4_bits(val):<br>    return val &amp; 0b1111<br><br><br>def last_31_bits(p):<br>    res = bytearray()<br>    res.append(p[0] &amp; 0x7F)  # 7 bits<br>    for b in p[1:]:<br>        res.append(b &amp; 0xFF)   # 8 bits<br>    return res<br><br><br>def DT(hs):<br>    offset = low_order_4_bits(hs[19])<br>    p = hs[offset:offset+4]<br>    return last_31_bits(p)<br><br><br>def hotp(k, c):<br>    counter_bytes = c.to_bytes(8, byteorder=&#39;big&#39;)  # 8-byte, big-edian<br>    hs_hmac = hmac.new(k, counter_bytes, &quot;sha1&quot;)<br>    hs = hs_hmac.digest()<br>    s_bits = DT(hs)<br>    s_num = int(s_bits.hex(), 16)<br>    return s_num % 10 ** 6</pre><p>Before we move on to TOTP, I’d like to point out <a href="https://github.com/pyauth/pyotp/blob/618106c1dee7f5bf22da2c5d6739ab87070d3fc2/src/pyotp/otp.py#L28">PyOTP’s logic</a> for getting the last 31 bits in the dynamic truncation function.</p><pre>offset = hmac_hash[-1] &amp; 0xF<br>code = (<br>  (hmac_hash[offset] &amp; 0x7F) &lt;&lt; 24<br>  | (hmac_hash[offset + 1] &amp; 0xFF) &lt;&lt; 16<br>  | (hmac_hash[offset + 2] &amp; 0xFF) &lt;&lt; 8<br>  | (hmac_hash[offset + 3] &amp; 0xFF)<br>)</pre><p>Instead of iterating through the bytearray slice to mask and append the masked values to a new bytearray, pyotp instead utilizes the bitwise OR operator and the bitwise left shift (&lt;&lt;) operator.</p><p>This is actually the exact same logic shown in the <a href="https://www.rfc-editor.org/rfc/rfc4226#section-5.4">example given in the RFC</a>.</p><pre>int offset   =  hmac_result[19] &amp; 0xf ;<br>int bin_code = (hmac_result[offset]  &amp; 0x7f) &lt;&lt; 24<br>   | (hmac_result[offset+1] &amp; 0xff) &lt;&lt; 16<br>   | (hmac_result[offset+2] &amp; 0xff) &lt;&lt;  8<br>   | (hmac_result[offset+3] &amp; 0xff) ;</pre><p>So, we really could have just copied and pasted directly from the RFC and made this blog post a lot shorter. 🤷🏻‍♀️</p><p>Let’s talk TOTP.</p><h3>TOTP Definition</h3><p>With HOTP cleared and well understood, TOTP itself is actually extremely simple since it is essentially just an extension of HOTP.</p><p>From <a href="https://www.rfc-editor.org/rfc/rfc6238#section-4.2">the RFC</a>,</p><blockquote><em>Basically, we define TOTP as TOTP = HOTP(K, T), where T is an integer and represents the number of time steps between the initial counter time T0 and the current Unix time.</em></blockquote><p>In HOTP, the moving factor is the number of times an OTP has been generated. After each OTP generation, the counter increases by one. On the other hand, in TOTP, the moving factor is time. After a given length of time, the number of time steps increases by one regardless of how many times the an OTP has been generated.</p><p>This allows for multiple different TOTP generators to be implemented entirely independently from each other <em>and</em> the TOTP verifier. A new TOTP generator can be implemented after the TOTP verifier has already verified several OTPs as long as the generator and verifier share the initial counter time T0 and the same time-step value X.</p><p>Let’s agree that T0 is 0 (the Unix epoch), and X is 30 seconds.</p><p>This means that if it has been 30 seconds since the Unix epoch, then T is 1. If it has been 89 seconds since the Unix epoch, then T is 2.</p><p>For the purposes of this tutorial we will ignore timezones.</p><pre>import datetime<br>import time<br><br>t = 30<br><br><br>def totp(k, t):<br>    s_since_epoch = time.mktime(datetime.datetime.now().timetuple())<br>    time_steps = int(s_since_epoch / t)<br>    return hotp(k, time_steps)</pre><p>Done!</p><p><a href="https://docs.python.org/3.8/library/time.html#time.mktime">time.mktime</a> returns the number of seconds since epoch given a <a href="https://docs.python.org/3.8/library/time.html#time.mktime">struct_time</a> in local time. We divide this value by the time step interval using the default floor function and convert the result to an integer. This value is our counter value for the hotp function we had defined earlier.</p><p>Let’s check our work! We’ll be using the same secret as before, so again, we have to encode the (already encoded) secret to test our answer against the library’s.</p><pre>&gt;&gt;&gt; totp = pyotp.TOTP(base64.b32encode(secret))<br>&gt;&gt;&gt; totp.now()<br>&#39;487975&#39;<br>&gt;&gt;&gt; hotp(secret, int(time.mktime(datetime.datetime.now().timetuple())/30))<br>487975<br>&gt;&gt;&gt; hotp(secret, int(time.mktime(datetime.datetime.now().timetuple())/30)) == int(totp.now())<br>True</pre><p>Aaand, with that, we have successfully implemented our own Time-Based One-Time Password!</p><p><a href="https://gist.github.com/vimiomori/e1c32e5ac1682bc02fb56da8ab8fbdc4#file-otp-py">Here</a>’s the github gist of our work.</p><h3>References</h3><ul><li><a href="https://www.rfc-editor.org/rfc/rfc6238">RFC 6238</a></li><li><a href="https://www.rfc-editor.org/rfc/rfc4226#section-5">RFC 4226</a></li><li><a href="https://github.com/pyauth/pyotp">PyOTP</a></li><li><a href="https://docs.python.org/3/library/functions.html?highlight=int#int">Python Docs</a></li><li><a href="https://realpython.com/python-bitwise-operators/#bitwise-or">Real Python — Bitwise Operators in Python</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b971a31330b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/implementing-your-own-time-based-otp-generator-3b971a31330b">Implementing Your Own Time-Based OTP Generator</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Helm Your Kubernetes Application]]></title>
            <link>https://medium.com/zeals-tech-blog/helm-your-kubernetes-application-7af6293bcfcf?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/7af6293bcfcf</guid>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[infra]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[sre]]></category>
            <dc:creator><![CDATA[Shahin Mahmud]]></dc:creator>
            <pubDate>Wed, 08 Feb 2023 09:18:04 GMT</pubDate>
            <atom:updated>2023-02-08T09:18:04.469Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*652JEoQbt27188ge9pY4UQ.jpeg" /></figure><p>At Zeals, most of our workloads run on Kubernetes including our own application and open-source application. We use helm extensively to manage and automate the lifecycle of our application. In this article, we are going to discuss, how helm works internally and how we can make a helm chart for an application.</p><h4>What is helm?</h4><p>Helm is the <strong><em>package manager</em></strong> for Kubernetes. Just like any other package manager, Helm lets us package and share our own Kubernetes app and find, install, upgrade, and manage other available Kubernetes apps.</p><p>Helm packages are called <strong><em>charts</em></strong>. A helm package registry is called a helm <strong><em>repository</em></strong>. A repository can host one or many charts and it can be hosted anywhere by following the protocol that the helm cmd client understands.</p><p>And an installed helm chart (package) on a Kubernetes cluster is called helm <strong><em>release</em></strong>.</p><p>In this article, we are going to use <strong><em>helm v3</em></strong></p><h4><strong>Why Helm?</strong></h4><p>Kubernetes applications often contain several Kubernetes resources like configmaps, secrets, roles, deployments, crds, and many others. And oftentimes, some values need to be shared across resources. Helm provides <em>a templating option, </em>making it easy to change the config and manage applications on Kubernetes.</p><p>Also, it keeps the history of <strong>releases</strong> and has an easy option to roll back to a previous version.</p><h4>How to use helm?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0n7UbpGIJMWmIa5ngzuk5g.jpeg" /></figure><p>At first, we need to add the helm repository that contains our desired chart to the local index. This will add all the chart-related information on that repository to the local index.</p><pre>$helm repo add bitnami https://charts.bitnami.com/bitnami<br><br>$helm search repo bitnami<br>NAME                                         CHART VERSION APP VERSION   DESCRIPTION                                       <br>bitnami/airflow                              14.0.7        2.5.0         Apache Airflow is a tool to express and execute...<br>bitnami/apache                               9.2.11        2.4.55        Apache HTTP Server is an open-source HTTP serve...<br>bitnami/appsmith                             0.1.9         1.9.2         Appsmith is an open source platform for buildin...<br>bitnami/argo-cd                              4.4.2         2.5.7         Argo CD is a continuous delivery tool for Kuber...<br>bitnami/argo-workflows                       5.1.2         3.4.4         Argo Workflows is meant to orchestrate Kubernet...<br>bitnami/aspnet-core                          4.0.2         7.0.2         ASP.NET Core is an open-source framework for we...<br>bitnami/cassandra                            10.0.0        4.1.0         Apache Cassandra is an open source distributed ...<br>bitnami/etcd                                 8.7.2         3.5.6         etcd is a distributed key-value store designed ...<br>........</pre><p>Let&#39;s install Etcd by using the bitnami/etcd helm chart!<br>we can see all information about the chart by</p><pre>$helm show all bitnami/etcd </pre><p>We can also see the details here — <br><a href="https://github.com/bitnami/charts/tree/main/bitnami/etcd">https://github.com/bitnami/charts/tree/main/bitnami/etcd</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OmGGN4Y6eCz6jiSyCyMigw.png" /></figure><p><strong><em>Chart.yaml </em></strong>contains general info about the chart.<br><strong><em>templates </em></strong>folder contains various templates and when rendered with values, it generates Kubernetes manifests which get deployed.<br><strong><em>values.yaml </em></strong>contains all the default values to install etcd with default values provided by the chart.</p><pre>$kubectl create ns etcd<br><br>$helm install etcd bitnami/etcd -n etcd<br>NAME: etcd<br>LAST DEPLOYED: Thu Jan 19 12:55:45 2023<br>NAMESPACE: default<br>STATUS: deployed<br>REVISION: 1<br>TEST SUITE: None<br>NOTES:<br>CHART NAME: etcd<br>CHART VERSION: 8.7.2<br>APP VERSION: 3.5.6<br><br>** Please be patient while the chart is being deployed **<br><br>etcd can be accessed via port 2379 on the following DNS name from within your cluster:<br><br>    etcd.default.svc.cluster.local<br><br>To create a pod that you can use as a etcd client run the following command:<br><br>    kubectl run etcd-client --restart=&#39;Never&#39; --image docker.io/bitnami/etcd:3.5.6-debian-11-r21 --env ROOT_PASSWORD=$(kubectl get secret --namespace default etcd -o jsonpath=&quot;{.data.etcd-root-password}&quot; | base64 -d) --env ETCDCTL_ENDPOINTS=&quot;etcd.default.svc.cluster.local:2379&quot; --namespace default --command -- sleep infinity<br><br>Then, you can set/get a key using the commands below:<br><br>    kubectl exec --namespace default -it etcd-client -- bash<br>    etcdctl --user root:$ROOT_PASSWORD put /message Hello<br>    etcdctl --user root:$ROOT_PASSWORD get /message<br><br>To connect to your etcd server from outside the cluster execute the following commands:<br><br>    kubectl port-forward --namespace default svc/etcd 2379:2379 &amp;<br>    echo &quot;etcd URL: http://127.0.0.1:2379&quot;<br><br> * As rbac is enabled you should add the flag `--user root:$ETCD_ROOT_PASSWORD` to the etcdctl commands. Use the command below to export the password:<br><br>    export ETCD_ROOT_PASSWORD=$(kubectl get secret --namespace default etcd -o jsonpath=&quot;{.data.etcd-root-password}&quot; | base64 -d)</pre><p>Let&#39;s see the helm release and deployed Kubernetes resources-</p><pre># list all the installed charts(release)<br>$helm list -n etcd<br>NAME NAMESPACE REVISION UPDATED                              STATUS   CHART      APP VERSION<br>etcd etcd      1        2023-01-19 13:10:39.745863 +0600 +06 deployed etcd-8.7.2 3.5.6<br><br># kub resources<br>$kubectl get all -n etcd<br>NAME         READY   STATUS    RESTARTS   AGE<br>pod/etcd-0   1/1     Running   0          107s<br><br>NAME                    TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)             AGE<br>service/etcd            ClusterIP   10.0.15.160   &lt;none&gt;        2379/TCP,2380/TCP   107s<br>service/etcd-headless   ClusterIP   None          &lt;none&gt;        2379/TCP,2380/TCP   107s<br><br>NAME                    READY   AGE<br>statefulset.apps/etcd   1/1     109s</pre><p>We can change the default values by providing our own values and helm will merge the values that we set with the default values present in the chart and render Kubernetes manifests accordingly.</p><p>Let’s change the root password by creating new <strong><em>values.yaml</em></strong></p><pre>auth:<br>  rbac:<br>    rootPassword: &quot;shahin&quot;</pre><pre># To see what kubernetes manifest would be generated after merging values<br># helm upgrade {release_name} {chartname} -f {path/values.yaml}<br>$helm upgrade etcd bitnami/etcd -f values.yaml -n etcd --debug --dry-run<br>.... rendered kubernetes manifest<br><br># upgrade<br>$helm upgrade etcd bitnami/etcd -f values.yaml -n etcd<br>Release &quot;etcd&quot; has been upgraded. Happy Helming!<br>NAME: etcd<br>LAST DEPLOYED: Thu Jan 19 14:12:25 2023<br>NAMESPACE: etcd<br>STATUS: deployed<br>REVISION: 2 # with each upgrade, revision increases<br>TEST SUITE: None<br>NOTES:<br>CHART NAME: etcd<br>CHART VERSION: 8.7.2<br>APP VERSION: 3.5.6<br>.......</pre><p>It&#39;s possible to provide multiple values.yaml. While rendering a template, the last provided value will take precedence. We can also use <br>--set key=value with or without values.yaml.</p><p>We can see the list of installed charts (releases) on the cluster with the following:</p><pre># show all releases in all namespaces<br>$helm list -A <br><br># show all releases in etcd namespace<br># helm list -n {namespace}<br>$helm list -n etcd<br>NAME NAMESPACE REVISION UPDATED                              STATUS   CHART      APP VERSION<br>etcd etcd      2        2023-01-22 16:05:52.983818 +0600 +06 deployed etcd-8.7.2 3.5.6      </pre><p>We can roll back to a previous revision which will deploy the previous version of Kubernetes manifests to the cluster. Uninstalling the release will delete every Kubernetes resource related to that release.</p><pre># rollback<br>$helm rollback etcd 1<br><br>#uninstall<br>$helm uninstall etcd</pre><h4>How does helm work?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*652JEoQbt27188ge9pY4UQ.jpeg" /></figure><p><strong>Template<br></strong>Templating is about processing text. In a template, you can define text with a value placeholder, import other templates, and process input value with functions the templating engine understands. When templating engine renders that text with values it generates raw text data. Helm templating engine is built on top of go templating. <br>For example:</p><pre>template = `My name is {{.Name}}`<br><br>If we process template with Name = Shahin<br>we will get -<br>My name is Shahin</pre><p><strong>Chart<br></strong>A chart contains templates for Kubernetes manifests and helper templates. Also, it has default values for the templates. Later when installing the chart, helm renders templates with the default values and user-provided values to Kubernetes manifests.</p><p><a href="https://github.com/bitnami/charts/blob/main/bitnami/etcd/templates/configmap.yaml">https://github.com/bitnami/charts/blob/main/bitnami/etcd/templates/configmap.yaml</a><br>It’s importing helper templates, processing, and using values:</p><pre>{{- if (include &quot;etcd.createConfigmap&quot; .) }}<br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: {{ printf &quot;%s-configuration&quot; (include &quot;common.names.fullname&quot; .) | trunc 63 | trimSuffix &quot;-&quot; }}<br>  namespace: {{ .Release.Namespace | quote }}<br>  labels: {{- include &quot;common.labels.standard&quot; . | nindent 4 }}<br>    {{- if .Values.commonLabels }}<br>    {{- include &quot;common.tplvalues.render&quot; ( dict &quot;value&quot; .Values.commonLabels &quot;context&quot; $ ) | nindent 4 }}<br>    {{- end }}<br>  {{- if .Values.commonAnnotations }}<br>  annotations: {{- include &quot;common.tplvalues.render&quot; ( dict &quot;value&quot; .Values.commonAnnotations &quot;context&quot; $ ) | nindent 4 }}<br>  {{- end }}<br>data:<br>  etcd.conf.yml: |-<br>    {{- include &quot;common.tplvalues.render&quot; ( dict &quot;value&quot; .Values.configuration &quot;context&quot; $ ) | nindent 4 }}<br>{{- end }}</pre><p>When a chart is packaged, it&#39;s compressed into a single <br><strong><em>{chart_name-version}.tgz</em></strong> file like <strong><em>etcd-8.7.2.tgz</em></strong>.</p><p><strong>Repository</strong>:<br>A helm repository hosts a file named <strong><em>index.yaml </em></strong>which contains information about all the charts that the repository has.<br>Chart information includes the chart name, version, metadata, and URL of the packaged chart to download.</p><p><em>bitnami repository index.yaml</em></p><pre>etcd:<br>  - annotations:<br>      category: Database<br>    apiVersion: v2<br>    appVersion: 3.5.4<br>    created: &quot;2022-06-06T21:50:10.120044659Z&quot;<br>    dependencies:<br>    - name: common<br>      repository: https://charts.bitnami.com/bitnami<br>      tags:<br>      - bitnami-common<br>      version: 1.x.x<br>    description: etcd is a distributed key-value store designed to securely store<br>      data across a cluster. etcd is widely used in production on account of its reliability,<br>      fault-tolerance and ease of use.<br>    digest: sha256:a522643668d04c32c56770e45c3e0752ac153530910bc2b4e5127d493e99b9a8<br>    home: https://github.com/bitnami/charts/tree/master/bitnami/etcd<br>    icon: https://bitnami.com/assets/stacks/etcd/img/etcd-stack-220x234.png<br>    keywords:<br>    - etcd<br>    - cluster<br>    - database<br>    - cache<br>    - key-value<br>    maintainers:<br>    - name: Bitnami<br>      url: https://github.com/bitnami/charts<br>    name: etcd<br>    sources:<br>    - https://github.com/bitnami/bitnami-docker-etcd<br>    - https://coreos.com/etcd/<br>    urls:<br>    - https://charts.bitnami.com/bitnami/etcd-8.2.5.tgz # chart url<br>    version: 8.2.5 # chart version<br>  - annotations:<br>      category: Database<br>    apiVersion: v2<br>    appVersion: 3.5.4<br>    created: &quot;2022-06-03T15:32:47.628296228Z&quot;<br>    dependencies:<br>    - name: common<br>      repository: https://charts.bitnami.com/bitnami<br>      tags:<br>      - bitnami-common<br>      version: 1.x.x<br>    description: etcd is a distributed key-value store designed to securely store<br>      data across a cluster. etcd is widely used in production on account of its reliability,<br>      fault-tolerance and ease of use.<br>    digest: sha256:dbde6c7608a046a64f689404b36ff8a04c2207aa0c138498db07deeea77dc8e2<br>    home: https://github.com/bitnami/charts/tree/master/bitnami/etcd<br>    icon: https://bitnami.com/assets/stacks/etcd/img/etcd-stack-220x234.png<br>    keywords:<br>    - etcd<br>    - cluster<br>    - database<br>    - cache<br>    - key-value<br>    maintainers:<br>    - name: Bitnami<br>      url: https://github.com/bitnami/charts<br>    name: etcd<br>    sources:<br>    - https://github.com/bitnami/bitnami-docker-etcd<br>    - https://coreos.com/etcd/<br>    urls:<br>    - https://charts.bitnami.com/bitnami/etcd-8.2.4.tgz<br>    version: 8.2.4<br><br>otherCharts:<br>  - ........</pre><p><strong>Release<br></strong>As we saw earlier, helm list can show us the installed releases in the Kubernetes cluster, which means it needs a backend to store the release information. For Helm3, it’s Kubernetes <strong><em>secrets. </em></strong>All the release is stored as Kubernetes secrets.</p><p>When we installed etcd chart with default values, it created a secret for that with the name sh.helm.release.v1.etcd.v1 , and when we upgraded it, it created sh.helm.release.v1.etcd.v2 . For each upgrade, it creates a new secret with the version part of the name incremented as v1, v2...vn</p><p>And when we do helm list it shows all releases from the latest versioned secrets.</p><pre>$kubectl get secrets -n etcd<br>NAME                         TYPE                 DATA   AGE<br>sh.helm.release.v1.etcd.v1   helm.sh/release.v1   1      13m # Initial relase<br>sh.helm.release.v1.etcd.v2   helm.sh/release.v1   1      12m # upgrade<br><br><br>$kubectl get secrets sh.helm.release.v1.etcd.v2 -o yaml -n etcd<br>apiVersion: v1<br>data:.....<br>kind: Secret<br>metadata:<br>  creationTimestamp: &quot;2023-01-22T10:05:59Z&quot;<br>  labels:<br>    modifiedAt: &quot;1674381962&quot;<br>    name: etcd # added a label by the relase name<br>    owner: helm<br>    status: deployed<br>    version: &quot;2&quot;<br>  name: sh.helm.release.v1.etcd.v2<br>  namespace: etcd<br>  resourceVersion: &quot;4891&quot;<br>  uid: f9889029-f19e-4f80-a71c-694b6f2665b4<br>type: helm.sh/release.v1</pre><p>Now, that we understand, how helm uses secrets to store <strong><em>releases, </em></strong>let’s see what a release is:</p><pre>// ****** from the official codebase ****<br><br>// Lock is a lock file for dependencies.<br>//<br>// It represents the state that the dependencies should be in.<br>type Lock struct {<br> // Generated is the date the lock file was last generated.<br> Generated time.Time `json:&quot;generated&quot;`<br> // Digest is a hash of the dependencies in Chart.yaml.<br> Digest string `json:&quot;digest&quot;`<br> // Dependencies is the list of dependencies that this lock file has locked.<br> Dependencies []*Dependency `json:&quot;dependencies&quot;`<br>}<br><br>type Chart struct {<br> // Raw contains the raw contents of the files originally contained in the chart archive.<br> //<br> // This should not be used except in special cases like `helm show values`,<br> // where we want to display the raw values, comments and all.<br> Raw []*File `json:&quot;-&quot;`<br> // Metadata is the contents of the Chartfile.<br> Metadata *Metadata `json:&quot;metadata&quot;`<br> // Lock is the contents of Chart.lock.<br> Lock *Lock `json:&quot;lock&quot;`<br> // Templates for this chart.<br> Templates []*File `json:&quot;templates&quot;`<br> // Values are default config for this chart.<br> Values map[string]interface{} `json:&quot;values&quot;`<br> // Schema is an optional JSON schema for imposing structure on Values<br> Schema []byte `json:&quot;schema&quot;`<br> // Files are miscellaneous files in a chart archive,<br> // e.g. README, LICENSE, etc.<br> Files []*File `json:&quot;files&quot;`<br><br> parent       *Chart<br> dependencies []*Chart<br>}<br><br>// Info describes release information.<br>type Info struct {<br> // FirstDeployed is when the release was first deployed.<br> FirstDeployed time.Time `json:&quot;first_deployed,omitempty&quot;`<br> // LastDeployed is when the release was last deployed.<br> LastDeployed time.Time `json:&quot;last_deployed,omitempty&quot;`<br> // Deleted tracks when this object was deleted.<br> Deleted time.Time `json:&quot;deleted&quot;`<br> // Description is human-friendly &quot;log entry&quot; about this release.<br> Description string `json:&quot;description,omitempty&quot;`<br> // Status is the current state of the release<br> Status Status `json:&quot;status,omitempty&quot;`<br> // Contains the rendered templates/NOTES.txt if available<br> Notes string `json:&quot;notes,omitempty&quot;`<br> // Contains the deployed resources information<br> Resources map[string][]runtime.Object `json:&quot;resources,omitempty&quot;`<br>}<br><br>// Release describes a deployment of a chart, together with the chart<br>// and the variables used to deploy that chart.<br>type Release struct {<br> // Name is the name of the release<br> Name string `json:&quot;name,omitempty&quot;`<br> // Info provides information about a release<br> Info *Info `json:&quot;info,omitempty&quot;`<br> // Chart is the chart that was released.<br> Chart *chart.Chart `json:&quot;chart,omitempty&quot;`<br> // Config is the set of extra Values added to the chart.<br> // These values override the default values inside of the chart.<br> Config map[string]interface{} `json:&quot;config,omitempty&quot;`<br> // Manifest is the string representation of the rendered template.<br> Manifest string `json:&quot;manifest,omitempty&quot;`<br> // Hooks are all of the hooks declared for this release.<br> Hooks []*Hook `json:&quot;hooks,omitempty&quot;`<br> // Version is an int which represents the revision of the release.<br> Version int `json:&quot;version,omitempty&quot;`<br> // Namespace is the kubernetes namespace of the release.<br> Namespace string `json:&quot;namespace,omitempty&quot;`<br> // Labels of the release.<br> // Disabled encoding into Json cause labels are stored in storage driver metadata field.<br> Labels map[string]string `json:&quot;-&quot;`<br>}</pre><p>Release holds information like release_name, kubernetes manifests(rendered from template &amp; values), version, release status, creation,deletion time,<br>chart&#39;s related file such as template, default values</p><p>All this data is turned into json and then compressed and stored as a Kubernetes <strong>secret</strong>.</p><p>Let’s check the decoded secrets created for an etcd release:</p><pre># full secret data<br>$kubectl get secrets sh.helm.release.v1.etcd.v2 -n etcd --template={{.data.release}} | base64 -D | base64 -D | gzip -d | jq<br>.... big json file .....<br><br># release info data<br>$kubectl get secrets sh.helm.release.v1.etcd.v2 -n etcd --template={{.data.release}} | base64 -D | base64 -D | gzip -d | jq .info    <br>{<br>  &quot;first_deployed&quot;: &quot;2023-01-22T16:04:56.928624+06:00&quot;,<br>  &quot;last_deployed&quot;: &quot;2023-01-22T16:05:52.983818+06:00&quot;,<br>  &quot;deleted&quot;: &quot;&quot;,<br>  &quot;description&quot;: &quot;Upgrade complete&quot;,<br>  &quot;status&quot;: &quot;deployed&quot;,<br>  &quot;notes&quot;: &quot;CHART NAME: etcd\nCHART VERSION: 8.7.2\nAPP VERSION: 3.5.6\n\n** Please be patient while the chart is being deployed **\n\netcd can be accessed via port 2379 on the following DNS name from within your cluster:\n\n    etcd.etcd.svc.cluster.local\n\nTo create a pod that you can use as a etcd client run the following command:\n\n    kubectl run etcd-client --restart=&#39;Never&#39; --image docker.io/bitnami/etcd:3.5.6-debian-11-r21 --env ROOT_PASSWORD=$(kubectl get secret --namespace etcd etcd -o jsonpath=\&quot;{.data.etcd-root-password}\&quot; | base64 -d) --env ETCDCTL_ENDPOINTS=\&quot;etcd.etcd.svc.cluster.local:2379\&quot; --namespace etcd --command -- sleep infinity\n\nThen, you can set/get a key using the commands below:\n\n    kubectl exec --namespace etcd -it etcd-client -- bash\n    etcdctl --user root:$ROOT_PASSWORD put /message Hello\n    etcdctl --user root:$ROOT_PASSWORD get /message\n\nTo connect to your etcd server from outside the cluster execute the following commands:\n\n    kubectl port-forward --namespace etcd svc/etcd 2379:2379 &amp;\n    echo \&quot;etcd URL: http://127.0.0.1:2379\&quot;\n\n * As rbac is enabled you should add the flag `--user root:$ETCD_ROOT_PASSWORD` to the etcdctl commands. Use the command below to export the password:\n\n    export ETCD_ROOT_PASSWORD=$(kubectl get secret --namespace etcd etcd -o jsonpath=\&quot;{.data.etcd-root-password}\&quot; | base64 -d)&quot;<br>}<br><br># default chart values<br>$kubectl get secrets sh.helm.release.v1.etcd.v2 -n etcd --template={{.data.release}} | base64 -D | base64 -D | gzip -d | jq .chart.values<br><br># values we upgraded with<br>$kubectl get secrets sh.helm.release.v1.etcd.v2 -n etcd --template={{.data.release}} | base64 -D | base64 -D | gzip -d | jq .config          <br>{<br>  &quot;auth&quot;: {<br>    &quot;rbac&quot;: {<br>      &quot;rootPassword&quot;: &quot;shahin&quot;<br>    }<br>  }<br>}</pre><p><em>So, whenever we say helm creates, updates, list, and delete releases, it means it creates, updates, deletes, or list (by label selector) Kubernetes secrets.</em></p><p><strong>What happens when </strong><strong>helm repo add ?<br></strong>Helm CLI appends repository info into a local host file named repository.yaml containing data about repository URL, authentication info, etc. <br>For example repository.yamlon my machine looks like this, as I have added two repositories so far — one is bitnami and another one is istio.</p><pre>#{local_dir_path}/repository.yaml<br>apiVersion: &quot;&quot;<br>generated: &quot;0001-01-01T00:00:00Z&quot;<br>repositories:<br>- caFile: &quot;&quot;<br>  certFile: &quot;&quot;<br>  insecure_skip_tls_verify: false<br>  keyFile: &quot;&quot;<br>  name: bitnami<br>  pass_credentials_all: false<br>  password: &quot;&quot;<br>  url: https://charts.bitnami.com/bitnami<br>  username: &quot;&quot;<br>- caFile: &quot;&quot;<br>  certFile: &quot;&quot;<br>  insecure_skip_tls_verify: false<br>  keyFile: &quot;&quot;<br>  name: istio<br>  pass_credentials_all: false<br>  password: &quot;&quot;<br>  url: https://istio-release.storage.googleapis.com/charts<br>  username: &quot;&quot;</pre><p>It also downloads the <strong><em>index.yaml</em></strong> file of the repository into the local cache directory.<br>For bitnami, helm created bitnami-index.yaml in the local cache directory.</p><p>How to find the location of repository.yaml and index.yaml files cache directory?</p><pre># depending the os, the location would varies<br># for me, it&#39;s macos<br>$helm env<br>helm env<br>HELM_BIN=&quot;helm&quot;<br>HELM_CACHE_HOME=&quot;/Users/**/Library/Caches/helm&quot;<br>HELM_CONFIG_HOME=&quot;/Users/**/Library/Preferences/helm&quot;<br>HELM_DATA_HOME=&quot;/Users/**/Library/helm&quot;<br>HELM_DEBUG=&quot;false&quot;<br>HELM_KUBEAPISERVER=&quot;&quot;<br>HELM_KUBEASGROUPS=&quot;&quot;<br>HELM_KUBEASUSER=&quot;&quot;<br>HELM_KUBECAFILE=&quot;&quot;<br>HELM_KUBECONTEXT=&quot;&quot;<br>HELM_KUBETOKEN=&quot;&quot;<br>HELM_MAX_HISTORY=&quot;10&quot;<br>HELM_NAMESPACE=&quot;default&quot;<br>HELM_PLUGINS=&quot;/Users/**/Library/helm/plugins&quot;<br>HELM_REGISTRY_CONFIG=&quot;/Users/**/Library/Preferences/helm/registry.json&quot;<br># this where repository index.yaml and chart.tgz files are cached<br>HELM_REPOSITORY_CACHE=&quot;/Users/**/Library/Caches/helm/repository&quot;<br># repository.yaml file<br>HELM_REPOSITORY_CONFIG=&quot;/Users/**/Library/Preferences/helm/repositories.yaml&quot;</pre><p><strong>How does helm CLI connect to Kubernetes clusters?<br></strong>It uses the local kubeconfig file for connecting to Kubernetes clusters.</p><p><strong>What happens when </strong><strong>helm install release_name repository/chart?<br></strong>Helm CLI merges the chart’s default value and user-provided value and renders the template which generates Kubernetes manifests. <br>It creates a release with all the data we discussed above with the initial release status as pending-install .</p><p>Then it deploys the generated Kubernetes manifests by calling the Kubernetes API server. Before deploying, it sorts the manifests. This is because if chart manifests create a namespace and resources under that namespace, the namespace should be deployed first.</p><pre>// Those occurring earlier in the list get installed before those occurring later in the list.<br>{ <br> &quot;Namespace&quot;,<br> &quot;NetworkPolicy&quot;,<br> &quot;ResourceQuota&quot;,<br> &quot;LimitRange&quot;,<br> &quot;PodSecurityPolicy&quot;,<br> &quot;PodDisruptionBudget&quot;,<br> &quot;ServiceAccount&quot;,<br> &quot;Secret&quot;,<br> &quot;SecretList&quot;,<br> &quot;ConfigMap&quot;,<br> &quot;StorageClass&quot;,<br> &quot;PersistentVolume&quot;,<br> &quot;PersistentVolumeClaim&quot;,<br> &quot;CustomResourceDefinition&quot;,<br> &quot;ClusterRole&quot;,<br> &quot;ClusterRoleList&quot;,<br> &quot;ClusterRoleBinding&quot;,<br> &quot;ClusterRoleBindingList&quot;,<br> &quot;Role&quot;,<br> &quot;RoleList&quot;,<br> &quot;RoleBinding&quot;,<br> &quot;RoleBindingList&quot;,<br> &quot;Service&quot;,<br> &quot;DaemonSet&quot;,<br> &quot;Pod&quot;,<br> &quot;ReplicationController&quot;,<br> &quot;ReplicaSet&quot;,<br> &quot;Deployment&quot;,<br> &quot;HorizontalPodAutoscaler&quot;,<br> &quot;StatefulSet&quot;,<br> &quot;Job&quot;,<br> &quot;CronJob&quot;,<br> &quot;IngressClass&quot;,<br> &quot;Ingress&quot;,<br> &quot;APIService&quot;,<br>}</pre><p>It then updates the release (Kubernetes secret) with a status and other information.</p><p><strong>What happens when </strong><strong>helm uinstall release_name ?<br></strong>It queries the API server to get the secrets for that release by a label selector name: release_nameand it uses the secrets with the latest version number. As we discussed earlier, these secrets contain generated Kubernetes manifests and many other things.</p><p>It then does some sorting of manifests and then deletes those manifests by calling the Kubernetes API server. After that, the secret is updated or deleted depending on the user-provided flags like keep-history .</p><p><strong>What happens when </strong><strong>helm upgrade release_name chart_name ?<br></strong>It fetches the last non-deleted release (Kubernetes secrets), merges user-provided value with existing release values, and generates manifest, incrementing the previous release version by 1.</p><p>It also checks for which new resources to be created comparing the new release manifests with the existing ones and whether there is any conflict. It then deploys the manifests and updates the release.</p><h4>How to package and share our own application?</h4><p>We are going to develop a helm chart for this -<a href="https://github.com/BackAged/tdset-operator">https://github.com/BackAged/tdset-operator</a> and package and share it as GitHub self-hosted repository.</p><p>The application is a Kubernetes controller, it contains crd, roles, serviceaccount, rolebinding, deployment(controller) .</p><p>You can see the list of manifests we need to template — <a href="https://github.com/BackAged/tdset-operator/tree/main/example">https://github.com/BackAged/tdset-operator/tree/main/example</a></p><p>If you would like to know how to write a Kubernetes operator -<a href="https://medium.com/@shahin-mahmud/write-your-first-kubernetes-operator-in-go-177047337eae">https://medium.com/@shahin-mahmud/write-your-first-kubernetes-operator-in-go-177047337eae</a></p><p>The basic workflow looks like this:</p><pre># creates a package<br>$helm create tdset <br><br># add templates for all the manifest<br><br># package the chart will generate a file chart_name-version.tgz<br>$helm package {chart_directory}<br><br><br># create index.yaml for repository with valid url of the packaged chart for download<br>$helm repo index --url<br><br><br># host your index.yaml and packaged chart</pre><p>Here I have the charts handling all the manifests we need: <a href="https://github.com/BackAged/tdset-operator/tree/main/charts/tdset/templates">https://github.com/BackAged/tdset-operator/tree/main/charts/tdset</a></p><p>Let&#39;s cover the service account template to see how templating works.</p><p>In the <strong><em>values.yaml </em></strong>we have this config. These are default values, during installation these values would be used if not overridden by user-provided values.</p><pre>#values.yaml<br>serviceAccount:<br>  # Specifies whether a service account should be created<br>  create: true<br>  # Annotations to add to the service account<br>  annotations: {}<br>  # The name of the service account to use.<br>  # If not set and create is true, a name is generated using the fullname template<br>  name: &quot;&quot;</pre><p>In the <strong><em>templates/serviceaccount.yaml </em></strong>we check whether <strong><em>serviceAccount.create </em></strong>value is set to true, only then generate service account manifests. We set the service account name as a user-provided value if none then the default value, we put this logic in a helper template and just include it in the manifest.</p><pre>#templates/serviceaccount.yaml<br>{{- if .Values.serviceAccount.create -}}<br>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: {{ include &quot;tdset.serviceAccountName&quot; . }}<br>  labels:<br>    {{- include &quot;tdset.labels&quot; . | nindent 4 }}<br>  {{- with .Values.serviceAccount.annotations }}<br>  annotations:<br>    {{- toYaml . | nindent 4 }}<br>  {{- end }}<br>{{- end }}</pre><pre>#templates/_helpers.tpl<br>{{/*<br>Create a default fully qualified app name.<br>We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).<br>If release name contains chart name it will be used as a full name.<br>*/}}<br>{{- define &quot;tdset.fullname&quot; -}}<br>{{- if .Values.fullnameOverride }}<br>{{- .Values.fullnameOverride | trunc 63 | trimSuffix &quot;-&quot; }}<br>{{- else }}<br>{{- $name := default .Chart.Name .Values.nameOverride }}<br>{{- if contains $name .Release.Name }}<br>{{- .Release.Name | trunc 63 | trimSuffix &quot;-&quot; }}<br>{{- else }}<br>{{- printf &quot;%s-%s&quot; .Release.Name $name | trunc 63 | trimSuffix &quot;-&quot; }}<br>{{- end }}<br>{{- end }}<br>{{- end }}<br><br>{{/*<br>Create the name of the service account to use<br>*/}}<br>{{- define &quot;tdset.serviceAccountName&quot; -}}<br>{{- if .Values.serviceAccount.create }}<br>{{- default (include &quot;tdset.fullname&quot; .) .Values.serviceAccount.name }}<br>{{- else }}<br>{{- default &quot;default&quot; .Values.serviceAccount.name }}<br>{{- end }}<br>{{- end }}</pre><p>We are going to share this chart in GitHub self-hosted repository using<br><a href="https://github.com/helm/chart-releaser-action">https://github.com/helm/chart-releaser-action</a>.</p><p>We need a charts/ directory containing all the charts that we are going to host in this repository and a branch: gh-pages and apply that branch as GitHub page source.</p><p>After adding the GitHub workflow using chart-releaser-action, on every push on master, it will check for chart version updates, if a new version is found, it will create a new release adding the packaged chart as an asset to the release and generate the index.yaml file with URL set to GitHub release asset.</p><p><a href="https://github.com/BackAged/tdset-operator/blob/gh-pages/index.yaml">https://github.com/BackAged/tdset-operator/blob/gh-pages/index.yaml</a></p><pre>apiVersion: v1<br>entries:<br>  tdset-controller:<br>  - apiVersion: v2<br>    appVersion: 0.0.5<br>    created: &quot;2023-01-22T19:51:04.627763337Z&quot;<br>    description: A Helm chart for Kubernetes<br>    digest: e952796f92b3a8895f5c7ec3382ba5b13517232e65a1b21b37a76924fed932d2<br>    name: tdset-controller<br>    type: application<br>    urls:<br>    - https://github.com/BackAged/tdset-operator/releases/download/tdset-controller-0.1.0/tdset-controller-0.1.0.tgz<br>    version: 0.1.0<br>generated: &quot;2023-01-22T19:51:04.627776637Z&quot;</pre><p>Now we will be able to add this repository and install the chart using helm from anywhere.</p><pre># add the repository<br>$helm repo add tdset https://backaged.github.io/tdset-operator/<br><br># install with default values<br>$helm install tdset tdset -n tdset</pre><p>Hope you have enjoyed this so far!<br>Happy Helming!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7af6293bcfcf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/helm-your-kubernetes-application-7af6293bcfcf">Helm Your Kubernetes Application</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coming to a Tech Firm in Tokyo as a Fresh Graduate]]></title>
            <link>https://medium.com/zeals-tech-blog/coming-to-a-tech-firm-in-tokyo-as-a-fresh-graduate-46fb45003133?source=rss----5cbecc15c49e---4</link>
            <guid isPermaLink="false">https://medium.com/p/46fb45003133</guid>
            <category><![CDATA[singapore]]></category>
            <category><![CDATA[fresh-graduate]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[tokyo]]></category>
            <category><![CDATA[new-job]]></category>
            <dc:creator><![CDATA[Matthew Woo]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 07:59:59 GMT</pubDate>
            <atom:updated>2023-01-19T07:59:59.647Z</atom:updated>
            <content:encoded><![CDATA[<p>Half a year ago, I never imagined I’d be writing this article in the heart of the Land of the Rising Sun. But here I am, a six-hour flight away from my homeland, writing this article somewhere in a chic cafe sipping on my hot cup of coffee and periodically admiring the view of autumn leaves falling signaling the transition into winter. A while back, I was in the tropics, sweating under the intense heat in a sunny island called Singapore. Since then, I have made my way to Tokyo, Japan to start my career as an Associate Product Manager in a tech venture capital called Zeals upon graduating from my university. In this article, I reflect on what it is like to be in a tech venture capital-backed company as a non-Japanese fresh graduate in Tokyo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bUR83QagDAXvpyDwV3LfNA.jpeg" /><figcaption>Left: Me posing with the famous Merlion in the sunny island of Singapore. Right: Me posing in front of Ginkgo trees in the middle of autumn in Tokyo, Japan.</figcaption></figure><p>Although I am a fresh graduate, I was hired here as an Associate Product Manager. This is an unorthodox position because it is rare to hear venture capitals hire fresh graduates, let alone to have a fresh graduate with no expertise take on the specialized role of an Associate Product Manager. But Zeals set itself different from other tech companies by disregarding the conventions and believes that any fresh graduate can be nurtured into a specialized role.</p><p>My responsibilities can be broadly categorize into two categories: 1) corporate responsibilities as a fresh graduate and 2) developer (dev) responsibilities as an Associate Product Manager. Zeals puts fresh graduates in the forefront by having us take on responsibilities that can directly impact the company. One of which is to routinely run company-wide meetings that are held weekly every Monday morning. The purpose of this meeting is not just information sharing, but to also vitalize the company and start the week properly. It is on us fresh graduates to inject youthful energy into the company and kickstart everyone’s engine on a Monday morning. As such, I often work with the other fresh graduates to run the meeting, and brainstorm different ideas to achieve this. Here, I’ve learn how to use Japanese to effectively communicate with the other Japanese fresh graduates to operate the meetings. I am also required to stand in front of the entire company to make announcements, which is something that I am not good at. However through this activity, I get a chance to improve on my public speaking skills and gradually begin to be more comfortable speaking in front of an audience.</p><p>My main responsibility as an Associate Product Manager is to oversee product development, and help bridge any communication between the Japanese business department and the global tech department. Although I am just a junior product manager, I do not have much say in the product development, but I learn how to operate in an agile scrum team with other developers. I was also introduced toConfluence and Jira, tools that software developers often use. Some of my current task includes translating technical documents made by the developers into simplified release notes for the business department in Japanese. I am also responsible for supporting the Scrum Master in scrum ceremonies.</p><p>On this note, I guess you could divide these two roles by language as well − my corporate responsibilities as a fresh graduate operate in Japanese because Zeals is a Japanese corporate, while my responsibilities as an Associate Product Manager mainly operate in English because the majority of us developers are from overseas. Hence, I often find myself having to switch between these two languages throughout the day as I work, which is an interesting experience by itself. Funnily, some of my Japanese peers are able to speak English and we can choose what languages we speak in with each other or both.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xt2OQNoUtRWbdUW1xyOp9A.jpeg" /><figcaption>Me and my English-speaking Japanese colleagues having our lunch together. They are all new employees like me.</figcaption></figure><p>A day at work could look something like this:</p><p>9:00am: Arrive at the office and start work</p><p>9:00am: My own focus time − I look at my calendar and task managers and run through tickets or tasks I need to work on and the meetings I need to attend.</p><p>11:30pm: Daily meeting with the Tech Lead, Scrum Master and Product Manager to discuss any tickets.</p><p>12:00pm: Lunch</p><p>1:30pm: Daily Scrum with developers.</p><p>2:00pm: Meeting with the Scrum Master and another Product Manager to discuss any blockers faced or get confirmations about tasks.</p><p>2:30pm: Postmortem meeting to dissect and investigate bugs that caused incidents. Here I help the scrum master facilitate the meeting by taking down meeting minutes.</p><p>4:00pm: I work on my own tickets and tasks.</p><p>5:00pm: I report my progress to my supervisor and clarify any questions I have.</p><p>5:30pm: I run through my task manager again and check the done items, and prepare tomorrow’s agenda.</p><p>6:00pm: End work</p><p>Of course, as a fresh graduate I have quite huge shoes to fill for the role of an associate product manager. I have zero experience in product management, and this is my first foray into the working world. It is easy to feel that you are inadequate among the other talented people here in the company and to feel seemingly unable to contribute much to the team due to your lack of experience and expertise. However, that is natural for a fresh graduate. I often remind myself that this is precisely the reason why I as a fresh graduate was selected, because I am a blank state with infinite possibilities. What really matters for now is to always have a growth mindset and take initiatives to do something no matter how trivial the task is. Although I do not have much expertise in product development right now, I can only learn by taking on different tasks and grow myself into the role. Fortunately, Zeals is still essentially a Japanese company at heart. Japanese companies like Zeals believes in nurturing fresh graduates, and honing them with different skills to enable them to deliver someday. This generalist approach allows me to learn on the job and trains me about proper work etiquette, together with the myriad of other skills that will help me in my career on top of my specialization into product management. That is something that you can only experience in a Japanese tech company like Zeals.</p><p>Upon stepping out of the cafe I was just in, I was greeted by a cool air. I wrapped my scarf around my neck to keep myself warm. Do I miss my warm life in the sunny island of Singapore? Certainly. There are days when I wonder, “what if I chose to just remain in Singapore and work? How would my life play out then?” But when presented with such opportunity to come to Japan to work, I just couldn’t say no despite my fears. Being in Japan has surely made my life more vibrant and broadened my perspective. Everyday is filled with new discoveries, be it at work or in my personal life. I am glad to be here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ncTW-_WnIH8GIzs5F03RQw.jpeg" /><figcaption>Me at the top of Roppongi Hills, with Tokyo’s skyline in the backdrop. To my right is the Tokyo Tower that illuminates bright orange during the evening.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46fb45003133" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeals-tech-blog/coming-to-a-tech-firm-in-tokyo-as-a-fresh-graduate-46fb45003133">Coming to a Tech Firm in Tokyo as a Fresh Graduate</a> was originally published in <a href="https://medium.com/zeals-tech-blog">The Zeals Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>