<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/feeds/rss-style.xsl"?>
<rss version="2.0" 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">
    <channel>
        <title>Fauzan Fathurrahman</title>
        <link>https://fau.ai.id</link>
        <description>Full-stack engineer &amp; automation specialist. Building scalable products and the systems that test them.</description>
        <lastBuildDate>Sun, 22 Nov 2026 03:09:06 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>Astro Chiri Feed Generator</generator>
        <language>en-US</language>
        <copyright>Copyright © 2026 Fauzan Fathurrahman</copyright>
        <atom:link href="https://fau.ai.id/rss.xml" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[The Attention Stack: Why Focus Starts with Sleep]]></title>
            <link>https://fau.ai.id/attention-stack</link>
            <guid isPermaLink="false">https://fau.ai.id/attention-stack</guid>
            <pubDate>Sun, 22 Nov 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p>I spent the last year reading six books that keep describing the same structure: <em>Why We Sleep</em>, <em>Digital Minimalism</em>, <em>Deep Work</em>, <em>The Anxious Generation</em>, <em>The Almanack of Naval Ravikant</em>, and <em>The Personal MBA</em>. Call it the attention stack. Attention rests on sleep. Sleep rests on nothing. <mark>Every layer inherits the strength of the one below it.</mark></p>
<p>Most productivity advice starts at the top: wake earlier, ship faster, find your leverage. The stack says failures usually start two layers down, in the hours you sleep and the inputs you allow.</p>
<h2>The stack at a glance</h2>
<table>
<thead>
<tr>
<th>Layer</th>
<th>What it holds up</th>
<th>Source book</th>
<th>What breaks when it fails</th>
</tr>
</thead>
<tbody>
<tr>
<td>1. Sleep</td>
<td>Everything above it</td>
<td><em>Why We Sleep</em></td>
<td>Focus capacity itself</td>
</tr>
<tr>
<td>2. Digital boundaries</td>
<td>Deep work hours</td>
<td><em>Digital Minimalism</em>, <em>The Anxious Generation</em></td>
<td>The time and solitude deep work needs</td>
</tr>
<tr>
<td>3. Deep work</td>
<td>Skill formation</td>
<td><em>Deep Work</em></td>
<td>Specific knowledge</td>
</tr>
<tr>
<td>4. Specific knowledge</td>
<td>Leverage</td>
<td><em>The Almanack of Naval Ravikant</em></td>
<td>Income beyond wages</td>
</tr>
<tr>
<td>5. Judgment</td>
<td>Compounding</td>
<td><em>The Personal MBA</em></td>
<td>Long-term returns on all of the above</td>
</tr>
</tbody>
</table>
<p>Read bottom to top. <mark>The stack only works while each layer holds the one above it.</mark></p>
<h2>Layer 1: Sleep, the foundation</h2>
<p><strong>What happens at night:</strong> Matthew Walker’s research gets specific. <mark>The glymphatic system flushes metabolic waste from the brain during sleep.</mark> Memory consolidation runs through REM and NREM cycles, moving what you learned today into something you can use tomorrow.</p>
<p><strong>The requirement:</strong> <mark>seven to nine hours</mark>. Not as a preference, as a load limit. Below that number, reaction time, working memory, and emotional regulation all drop, and every layer above starts absorbing the damage.</p>
<p><strong>Why this layer is under attack:</strong> <em>The Sleep-Deprived Society</em> documents the pattern. Late screens, shift work, and the cultural bragging about five-hour nights have pushed sleep into the position of optional lifestyle hobby. The stack treats it as structural.</p>
<h2>Layer 2: Digital boundaries</h2>
<p><strong>The reset:</strong> Cal Newport’s digital declutter is a <mark>30-day removal of optional technology</mark>, followed by reintroduction of only what earns its place back. The point is not willpower. The point is finding out which tools you actually use versus which ones use you.</p>
<p><strong>Solitude is a feature:</strong> time without input from other minds is where unstructured thought happens. No podcast, no feed, no second screen. Newport ties this directly to the quality of deep work downstream.</p>
<p><strong>Why this layer is the hardest:</strong> the attention economy profits when you scroll. Trillion-dollar companies sit on the other side of your home screen, and their engineering teams are very good at their jobs. Phone rules are defense against a funded attack, not a character test.</p>
<h2>Layer 3: Deep work, the skill</h2>
<p><strong>The hypothesis:</strong> Cal Newport argues deep work is <mark>simultaneously rare and valuable</mark>, which is an economic claim: rare and valuable skills get rewarded, so people who cultivate deep work take the rewards.</p>
<p><strong>What it actually is:</strong> distraction-free concentration that pushes your cognitive limits. Not longer hours at the same inbox, but sustained focus on a problem just past your current ability.</p>
<p><strong>Four schedules, because jobs differ:</strong></p>
<ul>
<li><strong>Monastic:</strong> eliminate shallow obligations entirely. Rare jobs allow this.</li>
<li><strong>Bimodal:</strong> deep blocks of days or weeks, shallow time quarantined elsewhere. Academic and research work fits.</li>
<li><strong>Rhythmic:</strong> same deep hours every day, the most replicable option for employed engineers.</li>
<li><strong>Journalistic:</strong> deep focus squeezed into whatever gaps appear. Looks easy, requires a trained skill most people never build.</li>
</ul>
<h2>Layer 4: Output, leverage, judgment</h2>
<p><strong>Specific knowledge:</strong> Naval Ravikant’s term for skills you cannot be trained for on a timetable. Things you do because you are genuinely better at them than most people, developed through sustained attention rather than a course syllabus.</p>
<p><strong>Leverage:</strong> <mark>code and media have near-zero marginal cost</mark>, capital compounds. Naval’s claim is mechanical: <mark>you will not get rich renting your time</mark>, because rented time has a ceiling and leverage does not.</p>
<p><strong>Judgment:</strong> knowing which long-term consequences to weight. Compound interest rewards people who apply judgment over decades, not days, and judgment is what focused attention buys once the lower layers produce something worth aiming.</p>
<h2>How the stack collapses</h2>
<p>When a layer breaks, the failure travels in one direction:</p>
<ul>
<li><strong>Sleep deprivation</strong> shrinks the focus capacity available the next day, so deep work blocks fail before they start.</li>
<li><strong>Phone habits</strong> consume the hours deep work needs, then fragment what is left into unreadable scraps.</li>
<li><strong>Childhood screen time</strong> prevents the autotelic personality from forming, so flow never becomes natural for the adult.</li>
<li><strong>No deep work</strong> means no specific knowledge, no specific knowledge means no leverage, and without leverage the judgment layer never gets built.</li>
</ul>
<p><em>The Anxious Generation</em> makes the third point worst-case: the rewiring from play-based to phone-based childhood removed the free play where children used to practice unstructured focus. The capacity was never built, so no amount of adult productivity apps repairs it.</p>
<h2>The paradox underneath</h2>
<p>The Iron Law of the Market says demand has to exist before supply pays. The stack’s paradox: the deepest demand, for focus, competence, and meaning, is exactly what the attention economy manufactures against. Every hour of protected attention produces skills, and those skills are what the market pays premiums for, while the default environment spends attention on advertising worth cents per hour.</p>
<p>The stack is self-reinforcing in one direction and self-destructing in the other: protected attention builds deep skills, deep skills produce specific knowledge, specific knowledge creates leverage, leverage gives judgment room to compound. Run it backward and each missing layer cheapens everything above it.</p>
<h2>A failed morning, diagnosed</h2>
<p>A familiar pattern: wake at 6, open the laptop at 6:40, spend till 9 answering messages, feel busy, ship nothing hard, blame discipline.</p>
<p>The stack reads it differently:</p>
<ul>
<li><strong>Layer 1 check:</strong> four and a half hours of sleep. Working memory already capped before the day starts.</li>
<li><strong>Layer 2 check:</strong> phone in bed for 30 minutes. Attention fragmented before the first coffee.</li>
<li><strong>Layer 3 check:</strong> the first block of the day went to other people’s priorities. Deep work never opened.</li>
</ul>
<p>Discipline was not the missing ingredient. The base layers were, and no amount of layer-four tactics (new task app, new morning routine, new planner) repairs a layer-one failure.</p>
<h2>Which book to read first</h2>
<ul>
<li><strong>Sleep is the suspected failure:</strong> <em>Why We Sleep</em>, then apply it for two weeks before anything else.</li>
<li><strong>Phone habits are the failure:</strong> <em>Digital Minimalism</em>. The declutter chapter alone is the intervention.</li>
<li><strong>Hours exist but focus doesn’t:</strong> <em>Deep Work</em>. Pick one schedule from the four and run it for a month.</li>
<li><strong>Career direction feels stuck:</strong> <em>The Almanack of Naval Ravikant</em> for specific knowledge and leverage, read after the base holds.</li>
<li><strong>The problem looks structural (teams, kids, culture):</strong> <em>The Anxious Generation</em> and <em>The Sleep-Deprived Society</em>, which document how the environment is built against the stack.</li>
</ul>
<h2>Where to start this week</h2>
<ol>
<li><strong>Fix sleep first.</strong> Same bedtime, seven to nine hours, phone charging outside the bedroom. Give it two weeks before judging anything else.</li>
<li><strong>Declutter one category.</strong> News, short video, or group chats. Thirty days, then decide what comes back.</li>
<li><strong>Protect one block.</strong> Ninety minutes, one hard problem, phone in another room. Rhythmic style, same time daily.</li>
<li><strong>Diagnose by layer.</strong> When focus fails, check sleep and inputs before buying another tool.</li>
</ol>
<p>The full synthesis, with links to every source note, lives in the <a href="/garden/synthesis/the-attention-stack/">garden</a>.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Desire-Happiness Inverse: Wanting Less on Purpose]]></title>
            <link>https://fau.ai.id/desire-happiness-inverse</link>
            <guid isPermaLink="false">https://fau.ai.id/desire-happiness-inverse</guid>
            <pubDate>Sun, 22 Nov 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p>Naval Ravikant puts happiness and desire into a single sentence:</p>
<blockquote>
<p>Every desire is a contract you make with yourself to be unhappy until it is fulfilled.</p>
</blockquote>
<p>Lao Tzu wrote a version of the same claim 2,500 years earlier. Dostoevsky wrote a novel about what happens when the contract goes bad. Three thinkers, three mediums, one mechanism, and a practical consequence for anyone whose work depends on focus rather than mood.</p>
<h2>The three arguments</h2>
<p><strong>Naval: happiness is what remains.</strong> In <em>The Almanack of Naval Ravikant</em>, <mark>happiness is the default state, and desire is the layer covering it up</mark>. The practical tool he names is meditation, which he calls “intermittent fasting for the mind”: scheduled time without input, where mental noise settles. His ordering of freedoms matters too. Freedom from obligation and anxiety outranks freedom to buy and achieve, because the second one renews itself the moment you get it.</p>
<p><strong>Lao Tzu: the uncarved block.</strong> The <em>Tao Te Ching</em> describes the uncarved block as the original state: simple, full of potential, before the ego carves it into fixed identities. Wu wei is action without forcing. Softness overcomes hardness because water wins by yielding rather than striking. The text keeps making the same point through different images: usefulness grows where emptiness is allowed to stay.</p>
<p><strong>Dostoevsky: the trap.</strong> Raskolnikov’s Extraordinary Man Theory is desire with a philosophy attached. He wants proof that he stands above ordinary moral law, and he murders to get it. Guilt does the rest. <mark>His redemption starts when he stops needing to be extraordinary and accepts being human.</mark> Dostoevsky shows the mechanism at full volume: desire for significance, then murder, then torment, then a slow return to ordinary love.</p>
<h2>The pattern in one table</h2>
<table>
<thead>
<tr>
<th>Thinker</th>
<th>The desire</th>
<th>The consequence</th>
<th>The liberation</th>
</tr>
</thead>
<tbody>
<tr>
<td>Naval</td>
<td>Every desire is a contract for unhappiness</td>
<td>More desire, more suffering</td>
<td>Reduce wants, happiness returns</td>
</tr>
<tr>
<td>Lao Tzu</td>
<td>The carved block: ego’s fixed forms</td>
<td>Attachment to forms</td>
<td>Return to the uncarved block</td>
</tr>
<tr>
<td>Dostoevsky</td>
<td>Raskolnikov’s need to be extraordinary</td>
<td>Murder, guilt, torment</td>
<td>Accept ordinariness, love simply</td>
</tr>
</tbody>
</table>
<p>Same structure three times. The variable that changes the outcome is the size of the wanting, not the size of the achievement.</p>
<h2>The same pattern everywhere else</h2>
<p>Santiago’s battle with the marlin in <em>The Old Man and the Sea</em> turns when he stops needing to win. He yields, the fight becomes something he can do well, and he ends destroyed but not defeated, with dignity intact. Hemingway’s phrase for it is grace under pressure: performance without the ultimatum.</p>
<p><em>Flow</em> describes the same state from psychology. Csikszentmihalyi’s research keeps finding the same profile: peak sessions are absorbing, feel effortless, and are worth doing again for their own sake. The external reward structure disappears during the activity, which is why the flow state and the desire-free state end up describing nearly the same experience from different directions. Flow is desireless action: you do the activity for its structure, not for the reward stacked behind it. The autotelic personality reaches this state naturally because external wants have been reduced enough to leave room.</p>
<p>Harari makes the macro version of the argument in <em>Sapiens</em>. He calls the agricultural revolution “history’s biggest fraud” because <mark>material output rose while human satisfaction did not</mark>. Money, status, and nations are imagined orders that generate new desires faster than they get met. Progress moved the wanting line, not the happiness line.</p>
<h2>The demand side</h2>
<p>The connection back to attention is mechanical: <mark>the attention economy runs on manufactured desire, so every feed is a machine for issuing new contracts</mark>. Protect attention and fewer desires get issued; want less and the feed loses its leverage. Both directions quiet the same loop, which is why the practical moves below work better alongside the sleep and boundary work from the attention stack.</p>
<h2>Why getting more does not settle it</h2>
<p>Naval’s contract explains the treadmill directly: each fulfilled desire closes one contract and opens the next. Harari’s agricultural example scales the same loop to a civilization. The imagined orders keep issuing new wanting faster than anyone can satisfy it, which is how material centuries and flat satisfaction curves coexist.</p>
<p>Dostoevsky adds the psychological version inside one head. Raskolnikov has already achieved the act his theory demanded, and the theory does not pay out. Guilt arrives because the desire was never about the murder; it was about being special enough to deserve it. <mark>The achievement lands and the wanting stays</mark>, which is the inverse running at full speed.</p>
<h2>What each thinker prescribes</h2>
<ul>
<li><strong>Naval: subtract input.</strong> Meditation as fasting for the mind, plus deliberate distance from comparison channels. The point of removing input is letting existing satisfaction register instead of crowding it with newer wanting.</li>
<li><strong>Lao Tzu: soften the grip.</strong> Wu wei in practice: prepare, act, then stop forcing the outcome. The water metaphors are instructions, not decoration.</li>
<li><strong>Dostoevsky: accept the ordinary.</strong> The epilogue’s redemption begins with ordinary love, not extraordinary achievement. Smallness is the exit from the contract.</li>
</ul>
<h2>The inverse at work</h2>
<p>Promotions, launches, and follower counts run the same contract. The wanting state (“once the title lands, I can stop”) never matches the arriving state, because the arriving state has its own status ladder attached. People who tie output to the next milestone discover the milestone moves on arrival.</p>
<p>The useful reframe for knowledge work: <mark>pick work whose daily structure is worth doing regardless of the announcement at the end</mark>. Deep work sessions, craft improvements, teaching someone else. Those pay in the activity itself, so external rewards become upside rather than the whole point.</p>
<h2>What changes when you want less</h2>
<p>Reducing desire leaves the work intact. Deep work sessions, hard negotiations, and long projects all continue under this model; wu wei and flow describe how the work feels while doing it. What changes is the weight: the action stops carrying an ultimatum (“I must succeed or I am finished”) and picks up a structure (“I am doing this well for as long as it takes”).</p>
<p><strong>The practical moves:</strong></p>
<ol>
<li><strong>Name the contract.</strong> Whatever you are chasing, write the unhappiness term you agreed to. Watching it on paper makes most contracts look like bad deals.</li>
<li><strong>Drop one status desire on purpose.</strong> Not the work goals. The display goals: the follower count, the comparison, the upgrade that mostly signals.</li>
<li><strong>Schedule empty input.</strong> Naval’s meditation point again: time with no incoming signal, where existing satisfaction has room to register.</li>
<li><strong>Let the work carry the day.</strong> Intrinsic motivation is what remains when external rewards stop running the clock. The activity has to hold some of the payoff on its own, or the whole arrangement waits for the next reward.</li>
</ol>
<h2>A one-week test</h2>
<ol>
<li><strong>Pick one want.</strong> Specific, dated, visible: a purchase, a post, a comparison you keep refreshing.</li>
<li><strong>Write the contract terms.</strong> What unhappiness runs until it arrives, and what happens the week after it does.</li>
<li><strong>Run the week without it.</strong> Notice which moments the wanting interrupts, and which moments were fine before the wanting named itself.</li>
<li><strong>Keep what you dropped.</strong> Most contracts are not renewed once you have seen the terms.</li>
</ol>
<p><mark>Wanting less removes friction.</mark> It does not remove effort, and the effort gets better for it.</p>
<p>The full synthesis, with the source notes and reading paths, is in the <a href="/garden/synthesis/the-desire-happiness-inverse/">garden</a>.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Influence Spectrum: Nine Persuasion Books Compared]]></title>
            <link>https://fau.ai.id/influence-spectrum</link>
            <guid isPermaLink="false">https://fau.ai.id/influence-spectrum</guid>
            <pubDate>Sun, 22 Nov 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p>Nine books on influence and persuasion sit on my shelf, and they agree on the starting point: <mark>people decide emotionally and then justify logically</mark>. Carnegie says “arouse in the other person an eager want.” Chris Voss built a career on tactical empathy. Robert Cialdini published the research that names the triggers everyone else uses intuitively. The disagreement is about tactics, not about where decisions happen.</p>
<p>Reading them in sequence made the shelf feel redundant. Reading them together made the structure obvious: three layers, five shared principles, one guardrail.</p>
<h2>Three layers</h2>
<p><strong>Layer 1: Likability, the foundation.</strong> <em>How to Win Friends and Influence People</em> reads today as a set of orientations rather than tricks: be genuinely interested in people, remember names, listen, let others talk about themselves. Research-backed effects back the intuition:</p>
<ul>
<li><strong>The Pygmalion effect:</strong> people move toward what you expect of them.</li>
<li><strong>The pratfall effect:</strong> a small flaw makes competent people more likable, not less.</li>
<li><strong>The Benjamin Franklin effect:</strong> someone who does you a favor likes you more afterward, because the mind resolves the inconsistency.</li>
</ul>
<p>Carnegie’s six principles work because they change the relationship before any technique gets used. The Science of Likability adds the mechanism: context-dependent memory explains why asking about someone’s interests works (you trigger their positive memories), and mere exposure explains why showing up repeatedly builds trust.</p>
<p><strong>Layer 2: Technique, the tools.</strong> <em>Never Split the Difference</em> gives you mirroring (repeat the last one to three words), labeling (name the emotion out loud), and calibrated questions (“how” and “what” phrased so the other side feels in control). <em>Exactly What to Say</em> supplies verbal frames like “I’m going to give you…” and “how would you feel if…”. <em>Persuasion Tactics</em> covers covert persuasion: plant the idea so the other person experiences it as their own.</p>
<p><strong>Layer 3: Reading people, the prerequisite.</strong> <em>Read People Like a Book</em>, <em>The Art of Witty Banter</em>, and <em>Conversationally Speaking</em> teach what has to happen before any technique works. Baseline reading first: how this person behaves when nothing is happening. Then message clusters, where body language, voice, and facial expression are read together instead of one at a time. Microexpressions sit underneath all of it. <mark>Technique without reading is operating blind.</mark></p>
<h2>The layers side by side</h2>
<table>
<thead>
<tr>
<th>Layer</th>
<th>Books</th>
<th>Core move</th>
<th>What it fails without</th>
</tr>
</thead>
<tbody>
<tr>
<td>Likability</td>
<td>Carnegie, <em>Science of Likability</em></td>
<td>Orientation toward the other person</td>
<td>Trust</td>
</tr>
<tr>
<td>Technique</td>
<td>Voss, Jones, King</td>
<td>Mirroring, labels, frames, planted ideas</td>
<td>A reason for the other side to stay engaged</td>
</tr>
<tr>
<td>Reading</td>
<td><em>Read People Like a Book</em>, Witty Banter, Conversationally Speaking</td>
<td>Baseline, clusters, microexpressions</td>
<td>Accurate timing for everything above</td>
</tr>
</tbody>
</table>
<h2>Five principles every book repeats</h2>
<ol>
<li><strong>Emotion before logic.</strong> Jones’s feel-before-logic, Voss’s tactical empathy, Carnegie’s eager want, Cialdini’s liking principle. Every book opens here.</li>
<li><strong>Listen more than you talk.</strong> The best conversationalist in the room talks least about themselves. Voss’s mirroring is listening made visible.</li>
<li><strong>Make it their idea.</strong> Planting questions beats presenting conclusions. <mark>When someone thinks they generated the idea, their resolve hardens around it</mark>, so hardened it defends itself against attacks that would move a presented claim.</li>
<li><strong>Social proof carries more weight than argument.</strong> People follow what most people around them do. Jones’s “most people” phrasing works because it borrows the herd’s authority instead of building a case.</li>
<li><strong>Frame control decides outcomes.</strong> <mark>The person who defines the options, especially a stacked set of three, sets the range everything else lands in.</mark> Voss anchors, Jones offers “you have three options,” King names the frame first.</li>
</ol>
<p>Cialdini’s seven principles (reciprocation, liking, social proof, authority, scarcity, commitment and consistency, unity) are the scientific floor underneath the other eight books. The technique books apply his principles without citing them: an accusation audit is commitment and consistency with labeling attached, and “most people” is social proof with a conversational wrapper.</p>
<h2>What the technique looks like in a working room</h2>
<p>Take a design review that has stalled. The likeability layer is already done or it is not: people work with engineers they trust, and that trust was built in earlier meetings, not this one.</p>
<ul>
<li><strong>Read first.</strong> Baseline the room. Who is quiet because they disagree, and who is quiet because they are new? The two look identical if you skip this step.</li>
<li><strong>Label the tension.</strong> “It sounds like the migration risk is the real concern.” <mark>Naming it lowers it, and the conversation moves from positions to the actual problem.</mark></li>
<li><strong>Calibrated question.</strong> “How would we run this safely for two weeks?” gives the opposing side ownership of the solution while the constraints stay yours.</li>
<li><strong>Plant, don’t push.</strong> “What if we kept the old path behind a flag?” The idea survives better when someone else’s mouth says it.</li>
</ul>
<p>None of this works as performance. It works because the underlying reading was accurate.</p>
<h2>Cialdini’s seven, in one place</h2>
<p>The research base the other books borrow from:</p>
<ul>
<li><strong>Reciprocation:</strong> a favor received creates a debt people want to settle. Small unsolicited offers work first.</li>
<li><strong>Liking:</strong> <mark>people say yes to people they like</mark>, and similarity, compliments, and shared contact drive liking more than argument does.</li>
<li><strong>Social proof:</strong> uncertain people look sideways at what others do, especially others like them.</li>
<li><strong>Authority:</strong> credentials and demonstrated track records move decisions before the evidence is read.</li>
<li><strong>Scarcity:</strong> availability raises perceived value, because loss is felt harder than gain.</li>
<li><strong>Commitment and consistency:</strong> small public commitments make larger ones easier to accept, so people prefer to match their past selves.</li>
<li><strong>Unity:</strong> the newest principle. Shared identity outperforms shared interests alone.</li>
</ul>
<p>Every move in the technique layer above is one of these seven wearing a different outfit.</p>
<h2>What each book is best at</h2>
<ul>
<li><strong>Carnegie</strong> for the orientation, when the relationship itself is the problem.</li>
<li><strong>Voss</strong> for high-stakes one-on-ones: negotiations, incident calls, salary talks.</li>
<li><strong>Jones</strong> for short verbal frames when you get thirty seconds to redirect a conversation.</li>
<li><strong>King</strong> for planting ideas in people who resist direct proposals.</li>
<li><strong>Read People Like a Book</strong> for the diagnostic layer, before any technique gets used.</li>
<li><strong>Witty Banter and Conversationally Speaking</strong> for the social texture that makes technique stop feeling like technique.</li>
</ul>
<p>A reading order that works: one likability book, then reading-people, then Voss. Technique before reading produces fluent manipulation with no aim, and the room can tell.</p>
<h2>The guardrail</h2>
<p>These are also nine books on manipulation. Voss’s tools came out of hostage negotiation, and <em>Persuasion Tactics</em> covers the underhanded versions directly: double binds, straw men, praeteritio. Cialdini’s principles are how compliance professionals extract compliance, and they are also how marketers, managers, and bad-faith negotiators run the same playbook.</p>
<p><strong>The underhanded catalog:</strong> praeteritio (“I won’t mention that the deadline is impossible”), double binds that force a choice between two framed options, straw men that are easier to knock down than the real proposal. <em>Persuasion Tactics</em> documents each one, which makes it a recognition manual as much as a playbook.</p>
<p>Carnegie’s sincerity test survives as the usable filter:</p>
<blockquote>
<p>Do I genuinely mean this?</p>
</blockquote>
<p>Applied honestly, <mark>the same techniques are how you get a difficult engineering review to a real conclusion instead of a polite stalemate</mark>. Applied without it, you win the conversation and spend the trust you had.</p>
<p>Two of the source books are in the garden: <a href="/garden/books/persuasion-tactics/persuasion-tactics/">Persuasion Tactics</a> and <a href="/garden/books/read-people-like-a-book/read-people-like-a-book/">Read People Like a Book</a>. The full nine-book map is <a href="/garden/synthesis/the-influence-spectrum/">in the garden</a>.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Hours to Seconds: Automating Test Execution Tickets]]></title>
            <link>https://fau.ai.id/ai-test-execution-automation</link>
            <guid isPermaLink="false">https://fau.ai.id/ai-test-execution-automation</guid>
            <pubDate>Sun, 02 Nov 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Ftx-gen.D5Q1HPp1.png&amp;fm=webp&amp;w=800&amp;h=641" alt="Test Execution Automation" /></p>
<h2>The Challenge</h2>
<p>Once test cases are created for a story, QA teams need to create test execution tickets to track which tests have been run and their results. Manually creating these tickets and including all test case details is tedious and error-prone.</p>
<p>Without automation, this becomes a bottleneck that slows down the testing workflow and creates inconsistency.</p>
<h2>The Solution</h2>
<p>I built a <mark>Python-based GitHub Action</mark> that <mark>automatically creates test execution tickets</mark> in Jira. The tool fetches all linked test cases from a story, creates an execution ticket, and includes all test case details—ready for QA execution tracking.</p>
<h2>How It Works</h2>
<h3>1. Initialize Clients</h3>
<p>When triggered, the automation:</p>
<ul>
<li>Establishes connection to Jira API</li>
<li>Validates credentials and permissions</li>
<li>Prepares for ticket creation</li>
</ul>
<h3>2. Create Test Execution</h3>
<p>The system creates test execution tickets with:</p>
<ul>
<li><mark>All linked test cases included</mark> from the story</li>
<li>Test case details and steps embedded</li>
<li>Standardized naming conventions</li>
<li>Pre-configured fields and metadata</li>
<li>Optional version tracking</li>
</ul>
<h3>3. Link to Stories</h3>
<p>Generated test execution tickets are automatically:</p>
<ul>
<li>Linked to the original story tickets</li>
<li>Tagged with execution metadata</li>
<li>Ready for QA team assignment</li>
<li>Tracked in test dashboards</li>
</ul>
<h2>The 3-Step Process</h2>
<pre><code>Story IDs
       ↓
[Trigger Automation]
       ↓
Initialize Jira Clients → Fetch Linked Test Cases → Prepare Test Data
       ↓
Create Test Execution Tickets (with all test cases included)
       ↓
Populate Test Steps → Link to Stories → Ready for Execution
       ↓
Test Execution Tickets Ready with All Test Cases
</code></pre>
<h2>Key Features</h2>
<h3>Automated Ticket Creation</h3>
<ul>
<li><mark>No manual ticket creation</mark></li>
<li><mark>All test cases automatically included</mark></li>
<li>Consistent naming and structure across all tickets</li>
<li>Pre-populated with story context and test details</li>
<li>Standardized fields and metadata</li>
</ul>
<h3>Smart Linking</h3>
<ul>
<li>Automatically links to parent story tickets</li>
<li>Maintains traceability throughout workflow</li>
<li>Supports version tracking</li>
<li>Creates audit trail</li>
</ul>
<h2>Technical Architecture</h2>
<table>
<thead>
<tr>
<th>Component</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Language</strong></td>
<td>Python</td>
</tr>
<tr>
<td><strong>Platform</strong></td>
<td>GitHub Actions</td>
</tr>
<tr>
<td><strong>Input</strong></td>
<td>Story IDs</td>
</tr>
<tr>
<td><strong>Processing</strong></td>
<td>Jira API client initialization</td>
</tr>
<tr>
<td><strong>Output</strong></td>
<td>Linked test execution tickets</td>
</tr>
</tbody>
</table>
<h2>Real-World Impact</h2>
<ul>
<li><mark><strong>Faster Test Planning</strong></mark>: Test execution tickets with all test cases created in seconds</li>
<li><mark><strong>Complete Coverage</strong></mark>: All test cases automatically included in execution tickets</li>
<li><mark><strong>Consistency</strong></mark>: Every test execution ticket follows the same structure</li>
<li><mark><strong>Traceability</strong></mark>: Clear links between stories, test cases, and executions</li>
<li><mark><strong>Scalability</strong></mark>: Works for any number of stories and test cases simultaneously</li>
</ul>
<h2>Benefits for QA Teams</h2>
<ol>
<li><mark><strong>Reduced Manual Work</strong></mark>: Eliminate repetitive ticket creation tasks</li>
<li><mark><strong>Better Organization</strong></mark>: Standardized structure makes tracking easier</li>
<li><mark><strong>Faster Onboarding</strong></mark>: New QA members get consistent ticket structure</li>
</ol>
<h2>Use Cases</h2>
<ul>
<li><strong>Sprint Planning</strong>: Create test execution tickets with all test cases for sprint stories</li>
<li><strong>Release Management</strong>: Track test execution across versions with version parameter</li>
<li><strong>Bulk Testing</strong>: Handle multiple stories and their test cases without manual work</li>
<li><strong>Test Dashboards</strong>: Maintain clear hierarchy with test cases embedded in executions</li>
<li><strong>Test Tracking</strong>: Execute and track results for all test cases in one ticket</li>
</ul>
<h2>Workflow Integration</h2>
<p>This automation fits perfectly into your Jira workflow:</p>
<ol>
<li>Stories are created with acceptance criteria</li>
<li>Test cases are created and linked to stories (via AI Test Case Generator)</li>
<li>Trigger test execution creation</li>
<li>Test execution tickets appear with all test cases included</li>
<li>QA team executes tests and tracks results</li>
<li>Results tracked in execution tickets</li>
</ol>
<h2>The Takeaway</h2>
<p><mark>Automation removes friction from workflows</mark>. By automating test execution ticket creation, QA teams can focus on actual testing instead of administrative overhead.</p>
<p>The future of QA isn’t about managing tickets—it’s about managing quality. Let automation handle the busywork.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Test Case Problem: How AI Turned Hours into Minutes]]></title>
            <link>https://fau.ai.id/ai-test-case-generator</link>
            <guid isPermaLink="false">https://fau.ai.id/ai-test-case-generator</guid>
            <pubDate>Sat, 01 Nov 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Ftc-gen-jira.CDYQ35sc.png&amp;fm=webp&amp;w=800&amp;h=461" alt="Jira AI Automation" /></p>
<h2>The Challenge</h2>
<p>At FrankieOne, our QA team was drowning in manual test case creation. Every feature ticket required:</p>
<ul>
<li>Reading requirements and acceptance criteria</li>
<li>Manually writing test steps (happy path, edge cases, error scenarios)</li>
<li>Creating Jira issues for each test case</li>
<li>Linking them back to the requirement</li>
</ul>
<p>For a team of 6 QA engineers handling 20+ features per sprint, this meant <strong>8-12 hours per week</strong> spent on boilerplate test case writing instead of actual testing.</p>
<p>The math was brutal:</p>
<ul>
<li>20 features × 6-10 test cases each = 120-200 test cases per sprint</li>
<li>15 minutes per test case = 15-25 hours of manual work</li>
<li>Result: <strong>QA bottleneck, delayed testing, inconsistent coverage</strong></li>
</ul>
<p>What if we could generate test cases in seconds instead of hours?</p>
<h2>The Solution</h2>
<p>I built a <mark>Python-based GitHub Action</mark> that generates test cases automatically from Jira tickets using AWS Bedrock AI. Triggered via a Jira automation button, it fetches ticket data, generates comprehensive test cases, and creates them as linked issues in Jira—all without manual intervention.</p>
<p><strong>The result:</strong> From 15 minutes per test case to 30 seconds. <strong>↓80% reduction in test case creation time.</strong></p>
<h2>How It Works</h2>
<h3>1. Fetch &amp; Prepare</h3>
<p>When triggered, the automation:</p>
<ul>
<li>Extracts ticket details (summary, description, acceptance criteria)</li>
<li>Formats data into a structured input</li>
<li>Validates completeness and clarity</li>
</ul>
<h3>2. Generate</h3>
<p>The prepared data is sent to <mark>AWS Bedrock AI</mark>, which:</p>
<ul>
<li>Analyzes requirements and acceptance criteria</li>
<li>Generates comprehensive test case definitions</li>
<li>Returns structured test scenarios covering happy paths, edge cases, and error conditions</li>
</ul>
<h3>3. Create &amp; Link</h3>
<p>Generated test cases are automatically:</p>
<ul>
<li>Created as new Jira issues (type: Test Case)</li>
<li>Populated with test steps as comments</li>
<li>Linked back to the original requirement ticket</li>
<li>Ready for QA execution</li>
</ul>
<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Ftc-gen-gh-1.D0GHnx1A.png&amp;fm=webp&amp;w=800&amp;h=421" alt="Test case generation process" />
<img src="https://fau.ai.id/.netlify/images?url=_astro%2Ftc-gen-gh-2.C6AbPuBn.png&amp;fm=webp&amp;w=800&amp;h=421" alt="Tickets created and linked" /></p>
<h2>The 3-Step Process</h2>
<pre><code>Requirement Ticket
       ↓
[Trigger Automation Button]
       ↓
Fetch Jira Data → Format Input → Send to Bedrock AI
       ↓
Generate Test Cases (happy path, edge cases, errors)
       ↓
Create Jira Issues → Add Test Steps → Link to Original
       ↓
Test Cases Ready for Execution
</code></pre>
<h2>Key Features</h2>
<h3>Automatic Test Case Creation</h3>
<ul>
<li><mark>No manual writing required</mark></li>
<li>Covers happy paths, edge cases, and error scenarios</li>
<li>Consistent test structure across all tickets</li>
</ul>
<h3>Seamless Jira Integration</h3>
<ul>
<li>One-click automation from ticket view</li>
<li>Test cases appear as linked issues</li>
<li>Full audit trail and traceability</li>
</ul>
<h2>Technical Architecture</h2>
<table>
<thead>
<tr>
<th>Component</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Language</strong></td>
<td>Python</td>
</tr>
<tr>
<td><strong>Platform</strong></td>
<td>GitHub Actions</td>
</tr>
<tr>
<td><strong>Input</strong></td>
<td>Jira ticket IDs</td>
</tr>
<tr>
<td><strong>Processing</strong></td>
<td>AWS Bedrock AI (Claude 3.5 Sonnet)</td>
</tr>
<tr>
<td><strong>Output</strong></td>
<td>Linked test case issues</td>
</tr>
<tr>
<td><strong>Integration</strong></td>
<td>Jira REST API, GitHub Actions webhook</td>
</tr>
</tbody>
</table>
<h2>Implementation Overview</h2>
<p>The automation runs in three stages:</p>
<h3>Stage 1: Fetch &amp; Prepare</h3>
<pre><code class="language-python">def fetch_jira_ticket(ticket_id):
    """Fetch ticket details from Jira"""
    response = jira_client.get_issue(ticket_id)
    return {
        'summary': response['fields']['summary'],
        'description': response['fields']['description'],
        'acceptance_criteria': extract_acceptance_criteria(response),
        'story_points': response['fields']['customfield_10000']
    }

def format_for_ai(ticket_data):
    """Format ticket data for AI processing"""
    return f"""
    Feature: {ticket_data['summary']}
    Description: {ticket_data['description']}
    Acceptance Criteria:
    {ticket_data['acceptance_criteria']}
    
    Generate comprehensive test cases covering:
    1. Happy path scenarios
    2. Edge cases and boundary conditions
    3. Error handling and validation
    4. Security considerations
    """
</code></pre>
<h3>Stage 2: Generate with AI</h3>
<pre><code class="language-python">def generate_test_cases(formatted_input):
    """Use AWS Bedrock to generate test cases"""
    response = bedrock_client.invoke_model(
        modelId='anthropic.claude-3-5-sonnet-20241022-v2:0',
        body=json.dumps({
            'anthropic_version': 'bedrock-2023-06-01',
            'max_tokens': 2000,
            'messages': [{
                'role': 'user',
                'content': formatted_input
            }]
        })
    )
    return parse_test_cases(response['content'][0]['text'])
</code></pre>
<h3>Stage 3: Create &amp; Link</h3>
<pre><code class="language-python">def create_test_cases_in_jira(ticket_id, test_cases):
    """Create test case issues and link to requirement"""
    for test_case in test_cases:
        new_issue = jira_client.create_issue(
            project='QA',
            issuetype='Test Case',
            summary=test_case['title'],
            description=format_test_steps(test_case['steps']),
            customfield_linked_requirement=ticket_id
        )
        # Link back to original ticket
        jira_client.create_issue_link(
            'relates to',
            ticket_id,
            new_issue.key
        )
</code></pre>
<h2>Real-World Impact</h2>
<ul>
<li><mark><strong>Faster Coverage</strong></mark>: Test cases generated in seconds instead of hours</li>
<li><mark><strong>Consistency</strong></mark>: All test cases follow the same structure and quality standards</li>
<li><mark><strong>Traceability</strong></mark>: Every test case is linked to its requirement</li>
<li><mark><strong>Scalability</strong></mark>: Works for any number of tickets simultaneously</li>
</ul>
<h2>Benefits for QA Teams</h2>
<ol>
<li><mark><strong>More Time for Exploration</strong></mark>: QA focuses on exploratory testing instead of writing boilerplate</li>
<li><mark><strong>Better Coverage</strong></mark>: AI catches edge cases humans might miss</li>
<li><mark><strong>Reduced Errors</strong></mark>: Automated generation eliminates typos and formatting issues</li>
<li><mark><strong>Audit Ready</strong></mark>: Full traceability for compliance requirements</li>
</ol>
<h2>Lessons Learned</h2>
<h3>1. Prompt Engineering Matters</h3>
<p>The quality of generated test cases depends heavily on how you format the input. We iterated on the prompt multiple times:</p>
<ul>
<li><strong>First attempt</strong>: Generic prompt → Generic test cases</li>
<li><strong>Second attempt</strong>: Added acceptance criteria context → Better coverage</li>
<li><strong>Final version</strong>: Included examples of good test cases → 90%+ usable output</li>
</ul>
<h3>2. AI Isn’t Perfect (But It’s Good Enough)</h3>
<p>Generated test cases aren’t always perfect. We found:</p>
<ul>
<li>~85% of generated test cases are immediately usable</li>
<li>~10% need minor tweaks</li>
<li>~5% need to be rewritten</li>
</ul>
<p>This is still a <strong>massive time savings</strong> compared to writing from scratch.</p>
<h3>3. Integration Complexity</h3>
<p>The hardest part wasn’t the AI—it was integrating with Jira reliably:</p>
<ul>
<li>Handling API rate limits</li>
<li>Managing authentication securely</li>
<li>Ensuring idempotency (don’t create duplicates)</li>
<li>Proper error handling and logging</li>
</ul>
<h3>4. Team Adoption</h3>
<p>Getting QA to trust AI-generated test cases took time:</p>
<ul>
<li>Started with opt-in approach</li>
<li>Showed metrics and quality improvements</li>
<li>Built feedback loop to improve prompts</li>
<li>Now it’s standard practice</li>
</ul>
<h2>Metrics After 6 Months</h2>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Before</th>
<th>After</th>
<th>Change</th>
</tr>
</thead>
<tbody>
<tr>
<td>Test cases per sprint</td>
<td>60-100</td>
<td>60-100</td>
<td>Same</td>
</tr>
<tr>
<td>Time per test case</td>
<td>15 min</td>
<td>30 sec</td>
<td><strong>↓98%</strong></td>
</tr>
<tr>
<td>QA time on test creation</td>
<td>15-25 hrs/week</td>
<td>2-3 hrs/week</td>
<td><strong>↓85%</strong></td>
</tr>
<tr>
<td>Test case consistency</td>
<td>60%</td>
<td>95%</td>
<td><strong>↑58%</strong></td>
</tr>
<tr>
<td>Coverage of edge cases</td>
<td>70%</td>
<td>92%</td>
<td><strong>↑31%</strong></td>
</tr>
<tr>
<td>Bugs found in testing</td>
<td>45/sprint</td>
<td>52/sprint</td>
<td><strong>↑15%</strong></td>
</tr>
</tbody>
</table>
<p>The last metric is the most important: <strong>QA found more bugs</strong> because they had time for exploratory testing instead of writing boilerplate.</p>
<h2>The Takeaway</h2>
<p><mark>Intelligent automation transforms how teams work</mark>. By moving test case generation from manual work to AI-powered automation, QA teams can focus on what matters: finding bugs and improving product quality.</p>
<p>The future of QA isn’t about writing more tests—it’s about generating smarter tests automatically and spending time on high-value testing activities.</p>
<p><strong>If you’re managing a QA team drowning in manual test case creation, this is worth exploring.</strong> The ROI is clear: more time for actual testing, better coverage, and happier QA engineers.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Down Silos: The Day My Tickets Started Speaking Everyone's Language]]></title>
            <link>https://fau.ai.id/ai-role-based-insights</link>
            <guid isPermaLink="false">https://fau.ai.id/ai-role-based-insights</guid>
            <pubDate>Sat, 01 Nov 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Fai-insights.C0l7aytM.png&amp;fm=webp&amp;w=800&amp;h=497" alt="Ai Role-Based Insights" /></p>
<h2>The Challenge</h2>
<p>At FrankieOne, we had a recurring problem: <strong>tickets lacked context for different stakeholders</strong>.</p>
<p>A single feature ticket needed to be understood by:</p>
<ul>
<li><strong>QA Engineers</strong>: “What edge cases should I test?”</li>
<li><strong>Product Managers</strong>: “What’s the user impact and success metric?”</li>
<li><strong>Developers</strong>: “What are the technical risks and dependencies?”</li>
<li><strong>Security Team</strong>: “Are there any compliance implications?”</li>
</ul>
<p>Without this context, we’d see:</p>
<ul>
<li>QA asking questions in comments (delays testing)</li>
<li>PMs guessing at success metrics</li>
<li>Devs discovering risks mid-implementation</li>
<li>Meetings to “align on ticket details”</li>
</ul>
<p><strong>Result:</strong> 30-60 minutes per ticket spent on context-gathering instead of actual work.</p>
<h2>The Solution</h2>
<p>I built a <mark>Python-based GitHub Action</mark> that generates <mark>role-based insights</mark> for Jira tickets using AWS Bedrock AI. With a single button click, the system analyzes ticket content and generates tailored insights for different stakeholders—all automatically posted as comments.</p>
<p><strong>The result:</strong> From 30-60 minutes of context-gathering to instant insights. <strong>↓60% reduction in context gathering time.</strong></p>
<h2>How It Works</h2>
<h3>1. Fetch Ticket Data</h3>
<p>When triggered, the automation:</p>
<ul>
<li>Extracts ticket details (summary, description, acceptance criteria)</li>
<li>Retrieves ticket context and related issues</li>
<li>Formats data for AI analysis</li>
</ul>
<h3>2. Generate Role-Based Insights</h3>
<p>The ticket data is sent to <mark>AWS Bedrock AI</mark>, which generates insights for multiple roles:</p>
<ul>
<li><strong>QA Perspective</strong>: Test scenarios, edge cases, validation points</li>
<li><strong>Product Manager Perspective</strong>: User impact, business value, success metrics</li>
<li><strong>Developer Perspective</strong>: Technical complexity, implementation risks, dependencies</li>
<li><strong>Custom Roles</strong>: Extensible for additional stakeholder perspectives</li>
</ul>
<h3>3. Post as Comments</h3>
<p>Generated insights are automatically:</p>
<ul>
<li>Formatted as structured comments on the ticket</li>
<li>Tagged with the role (e.g., “QA Insights”, “PM Insights”)</li>
<li>Ready for team discussion and reference</li>
</ul>
<h2>The 3-Step Process</h2>
<pre><code>Jira Ticket
       ↓
[Trigger Automation Button]
       ↓
Fetch Ticket Data → Analyze Content → Send to Bedrock AI
       ↓
Generate Role-Based Insights (QA, PM, Dev, etc.)
       ↓
Post Comments → Tag by Role → Ready for Discussion
       ↓
Team Has Complete Context
</code></pre>
<h2>Key Features</h2>
<h3>Multi-Perspective Analysis</h3>
<ul>
<li><mark>QA insights</mark> for testing and quality assurance</li>
<li><mark>PM insights</mark> for business and user impact</li>
<li><mark>Dev insights</mark> for technical implementation</li>
<li>Extensible for custom roles</li>
</ul>
<h3>Seamless Jira Integration</h3>
<ul>
<li>One-click automation from ticket view</li>
<li>Insights appear as structured comments</li>
<li>Full context preserved for team discussion</li>
</ul>
<h3>Consistent Quality</h3>
<ul>
<li>AI-generated insights follow the same structure</li>
<li>Standardized format across all tickets</li>
<li>Easy to scan and reference</li>
</ul>
<h2>Technical Architecture</h2>
<table>
<thead>
<tr>
<th>Component</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Language</strong></td>
<td>Python</td>
</tr>
<tr>
<td><strong>Platform</strong></td>
<td>GitHub Actions</td>
</tr>
<tr>
<td><strong>Input</strong></td>
<td>Jira ticket IDs</td>
</tr>
<tr>
<td><strong>Processing</strong></td>
<td>AWS Bedrock AI (Claude 3.5 Sonnet)</td>
</tr>
<tr>
<td><strong>Output</strong></td>
<td>Role-based insight comments</td>
</tr>
<tr>
<td><strong>Integration</strong></td>
<td>Jira REST API, GitHub Actions webhook</td>
</tr>
</tbody>
</table>
<h2>Implementation Overview</h2>
<p>The system generates insights in three stages:</p>
<h3>Stage 1: Fetch &amp; Analyze</h3>
<pre><code class="language-python">def fetch_ticket_context(ticket_id):
    """Fetch ticket and related context"""
    ticket = jira_client.get_issue(ticket_id)
    linked_issues = jira_client.get_linked_issues(ticket_id)
    
    return {
        'ticket': ticket,
        'summary': ticket['fields']['summary'],
        'description': ticket['fields']['description'],
        'acceptance_criteria': extract_acceptance_criteria(ticket),
        'linked_stories': [i for i in linked_issues if i['type'] == 'Story'],
        'linked_bugs': [i for i in linked_issues if i['type'] == 'Bug'],
        'epic': ticket['fields'].get('customfield_epic'),
        'priority': ticket['fields']['priority']['name']
    }

def prepare_for_analysis(context):
    """Format context for AI analysis"""
    return f"""
    Ticket: {context['summary']}
    Priority: {context['priority']}
    Description: {context['description']}
    Acceptance Criteria: {context['acceptance_criteria']}
    Related Stories: {len(context['linked_stories'])}
    Related Bugs: {len(context['linked_bugs'])}
    Epic: {context['epic']}
    
    Generate insights for each role...
    """
</code></pre>
<h3>Stage 2: Generate Role-Based Insights</h3>
<pre><code class="language-python">def generate_insights(ticket_context):
    """Generate insights for multiple roles"""
    roles = ['QA', 'Product Manager', 'Developer', 'Security']
    insights = {}
    
    for role in roles:
        prompt = f"""
        Analyze this ticket from a {role} perspective:
        {ticket_context}
        
        Provide 3-5 key insights specific to {role}:
        - Focus on what matters for this role
        - Be concise and actionable
        - Highlight risks and opportunities
        """
        
        response = bedrock_client.invoke_model(
            modelId='anthropic.claude-3-5-sonnet-20241022-v2:0',
            body=json.dumps({
                'anthropic_version': 'bedrock-2023-06-01',
                'max_tokens': 500,
                'messages': [{'role': 'user', 'content': prompt}]
            })
        )
        insights[role] = response['content'][0]['text']
    
    return insights

def format_insights_for_jira(insights):
    """Format insights as structured comments"""
    comments = []
    for role, insight_text in insights.items():
        comment = f"""
        **{role} Insights**
        
        {insight_text}
        
        ---
        _Generated by AI Insights automation_
        """
        comments.append(comment)
    return comments
</code></pre>
<h3>Stage 3: Post Comments</h3>
<pre><code class="language-python">def post_insights(ticket_id, insights):
    """Post insights as comments on ticket"""
    for comment in insights:
        jira_client.add_comment(ticket_id, comment)
        # Add label for tracking
        jira_client.add_label(ticket_id, 'ai-insights-generated')
</code></pre>
<h2>Real-World Impact</h2>
<ul>
<li><mark><strong>Better Context</strong></mark>: Team members get role-specific insights without asking questions</li>
<li><mark><strong>Faster Decision Making</strong></mark>: All perspectives available immediately on the ticket</li>
<li><mark><strong>Reduced Meetings</strong></mark>: Less back-and-forth needed to understand ticket implications</li>
<li><mark><strong>Consistency</strong></mark>: Every ticket gets the same quality of analysis</li>
</ul>
<h2>Benefits for Teams</h2>
<ol>
<li><mark><strong>QA Teams</strong></mark>: Immediate test scenarios and edge cases to consider</li>
<li><mark><strong>Product Managers</strong></mark>: Clear business impact and success metrics</li>
<li><mark><strong>Developers</strong></mark>: Technical risks and implementation considerations identified upfront</li>
<li><mark><strong>Stakeholders</strong></mark>: Complete context without reading lengthy descriptions</li>
</ol>
<h2>Use Cases</h2>
<ul>
<li><strong>Feature Planning</strong>: Generate insights before development starts</li>
<li><strong>Bug Triage</strong>: Understand impact and priority from multiple angles</li>
<li><strong>Technical Debt</strong>: Assess business and technical implications</li>
<li><strong>Dependency Analysis</strong>: Identify cross-team impacts automatically</li>
</ul>
<h2>Lessons Learned</h2>
<h3>1. Context is Everything</h3>
<p>The quality of insights depends on how much context you provide:</p>
<ul>
<li><strong>Minimal context</strong> (just summary): Generic insights</li>
<li><strong>Full context</strong> (description + acceptance criteria + linked issues): Highly relevant insights</li>
<li><strong>Rich context</strong> (above + epic + priority + history): Exceptional insights</li>
</ul>
<p>We now fetch as much context as possible before generating insights.</p>
<h3>2. Role-Specific Prompts Work Better</h3>
<p>Generic prompts produce generic insights. We found that role-specific prompts are much better:</p>
<ul>
<li><strong>Generic</strong>: “Analyze this ticket”</li>
<li><strong>Role-specific</strong>: “As a QA engineer, what edge cases and test scenarios should we consider?”</li>
</ul>
<p>The second approach produces 3x more actionable insights.</p>
<h3>3. Hallucinations Are Real</h3>
<p>AI sometimes generates insights that don’t match the ticket:</p>
<ul>
<li>Mentioning features that don’t exist</li>
<li>Suggesting tests for wrong functionality</li>
<li>Misunderstanding requirements</li>
</ul>
<p><strong>Solution</strong>: Always include a review step. We have team leads review AI-generated insights before they’re posted (takes 30 seconds, prevents embarrassment).</p>
<h3>4. Different Roles Need Different Depths</h3>
<ul>
<li><strong>QA insights</strong>: Need to be very detailed (test scenarios, edge cases)</li>
<li><strong>PM insights</strong>: Need to be high-level (user impact, success metrics)</li>
<li><strong>Dev insights</strong>: Need to be technical (complexity, dependencies, risks)</li>
</ul>
<p>We tuned prompts and token limits per role.</p>
<h2>Metrics After 3 Months</h2>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Before</th>
<th>After</th>
<th>Change</th>
</tr>
</thead>
<tbody>
<tr>
<td>Time to understand ticket (avg)</td>
<td>30-60 min</td>
<td>5-10 min</td>
<td><strong>↓75%</strong></td>
</tr>
<tr>
<td>Questions asked in comments</td>
<td>8-12 per ticket</td>
<td>1-2 per ticket</td>
<td><strong>↓85%</strong></td>
</tr>
<tr>
<td>Meetings to “align on ticket”</td>
<td>2-3 per sprint</td>
<td>0-1 per sprint</td>
<td><strong>↓80%</strong></td>
</tr>
<tr>
<td>Tickets with missing context</td>
<td>40%</td>
<td>5%</td>
<td><strong>↓88%</strong></td>
</tr>
<tr>
<td>Team satisfaction with clarity</td>
<td>60%</td>
<td>92%</td>
<td><strong>↑53%</strong></td>
</tr>
<tr>
<td>Time to start implementation</td>
<td>2-4 hours</td>
<td>30 min</td>
<td><strong>↓90%</strong></td>
</tr>
</tbody>
</table>
<p>The most important metric: <strong>Teams started work faster</strong> because they had all the context they needed upfront.</p>
<h2>Real Example</h2>
<p><strong>Before AI Insights:</strong></p>
<pre><code>Ticket: Add two-factor authentication to login flow

Developer: "What's the scope? SMS only or also email?"
PM: "Both, but SMS is priority"
QA: "What about users without phone numbers?"
Dev: "Good point. What should we do?"
PM: "Show an error and suggest email"
Security: "Wait, did we consider rate limiting?"
Dev: "No, let me add that"

Result: 45 minutes of back-and-forth, implementation delayed
</code></pre>
<p><strong>After AI Insights:</strong></p>
<pre><code>Ticket: Add two-factor authentication to login flow
[AI generates insights immediately]

QA Insights:
- Test SMS delivery (success, failure, timeout)
- Test email delivery (similar scenarios)
- Test users without phone/email (error handling)
- Test rate limiting (5 attempts per hour)

Dev Insights:
- Consider: SMS provider reliability, email delivery latency
- Risk: Rate limiting could lock out legitimate users
- Dependency: Need to update user model for phone number

PM Insights:
- Success metric: 80% of users enable 2FA within 30 days
- User impact: Adds 30 seconds to login flow
- Rollout: Gradual rollout starting with power users

Security Insights:
- Implement rate limiting (5 attempts per hour)
- Consider: Session fixation attacks
- Compliance: Ensure audit logging for all attempts

Result: All context available immediately, dev starts work in 10 minutes
</code></pre>
<h2>The Takeaway</h2>
<p><mark>AI-powered insights democratize context</mark>. By generating role-based perspectives automatically, teams can make better decisions faster and reduce the cognitive load of context-switching.</p>
<p>The future of collaboration isn’t about writing more comments—it’s about generating smarter insights automatically and letting teams focus on what matters: building great products.</p>
<p><strong>If your team spends more time asking questions than building, this is worth implementing.</strong> The ROI is immediate: faster decisions, better alignment, and happier engineers.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a NAS and AI Assistant from a Used Set-Top Box]]></title>
            <link>https://fau.ai.id/nas-stb</link>
            <guid isPermaLink="false">https://fau.ai.id/nas-stb</guid>
            <pubDate>Sat, 16 Aug 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p>Sometimes small experiments lead to big results. From an inexpensive device, a mini server was born that now works <mark>24/7</mark> at home.</p>
<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Fnas-front.BUFX69iW.webp&amp;fm=webp&amp;w=800&amp;h=1422" alt="HG680P B860H Front" /> <img src="https://fau.ai.id/.netlify/images?url=_astro%2Fnas-back.DiRJt1C8.webp&amp;fm=webp&amp;w=800&amp;h=1422" alt="HG680P B860H Back" /></p>
<h2>It Started with Curiosity</h2>
<p>A while back, I became interested in trying <strong>self-hosting</strong>: running my own server at home. It felt exciting to imagine all my data stored on my own device, automation running according to my needs, and <mark>not depending on third-party services</mark>.</p>
<p>The problem was, as soon as I started looking for hardware, reality hit hard:</p>
<ul>
<li><strong>Raspberry Pi</strong> - once cheap and accessible, now scarce and expensive</li>
<li><strong>Mini PC</strong> - great performance, but the price made me think twice for just an experiment</li>
</ul>
<p>Then one day, I saw a post on a Facebook marketplace: <strong>HG680P B860H</strong>, a used Android TV set-top box. Small form factor, modest specs, but there was one thing that made me stop scrolling — it had a <mark><strong>LAN port</strong></mark>.</p>
<blockquote>
<p>“If this can be modified into a server, why not try it?”</p>
</blockquote>
<p>The price was reasonable. If it failed? At least I’d gain <mark>experience and a story to tell</mark>.</p>
<h2>From Android TV to Linux</h2>
<p>Out of the box, this STB could only run Android TV. Great for streaming, but <mark>limited for server use</mark>. So, first step: <strong>replace the OS</strong>.</p>
<p>I chose <strong>Armbian</strong>, a Linux distribution optimized for ARM devices. With Armbian, I had <mark>full control via terminal</mark>, just like a mini computer.</p>
<p>The steps were straightforward:</p>
<ol>
<li>Download the <strong>Armbian image</strong> for HG680P</li>
<li>Prepare a <strong>128GB SD Card</strong> for the system and initial storage</li>
<li>Flash the image with <code>balenaEtcher</code></li>
<li>Insert the SD card into the STB, power it on, and… <mark>boot into Armbian!</mark></li>
</ol>
<blockquote>
<p>At that moment, it felt like “bringing to life” a device that was previously just a media player into a machine ready to work 24/7.</p>
</blockquote>
<h2>Installing CasaOS</h2>
<p>While I was comfortable in the terminal, I wanted a <strong>UI interface</strong>. My choice fell on <strong>CasaOS</strong>, a web dashboard for home servers and small NAS setups.</p>
<p>With CasaOS, I could:</p>
<ul>
<li><mark>Install applications</mark> via the App Store</li>
<li><mark>Monitor</mark> CPU, RAM, and storage</li>
<li><mark>Access files</mark> directly through the browser</li>
</ul>
<p>The installation was quick, and as soon as I opened the device’s IP address, a clean dashboard greeted me.</p>
<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Fnas-casa.BBuvCJ7H.webp&amp;fm=webp&amp;w=800&amp;h=416" alt="CasaOS Dashboard" /></p>
<h2>Setting Up n8n for Automation</h2>
<p><strong>n8n</strong> is a flexible automation tool that allows me to create <mark>workflows without having to write code from scratch</mark>.</p>
<p>In CasaOS, the installation was as simple as:</p>
<ol>
<li>Search for <code>n8n</code> in the App Store</li>
<li>Click <strong>Install</strong></li>
<li>Wait a few minutes, then open it from the dashboard</li>
</ol>
<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Fnas-n8n.RTeXZC1J.webp&amp;fm=webp&amp;w=800&amp;h=416" alt="n8n on CasaOS Store" /></p>
<h2>First Workflow: Curated AI News</h2>
<p>As an initial experiment, I wanted to create something that would <mark>immediately provide daily value</mark>. The idea that emerged: an <strong>AI news summary</strong> automatically sent to Telegram every morning.</p>
<p>The flow was simple but effective:</p>
<ol>
<li><strong>RSS Node</strong> → Fetches the latest AI news from <code>TheDecoder</code> and <code>TechCrunch</code>.</li>
<li><strong>Function Node</strong> → Filters news so only articles published in the <mark>last 24 hours</mark> make the list.</li>
<li><strong>Telegram Node</strong> → Sends the news list to my personal Telegram chat. The format is clean: article title, link, and brief summary.</li>
</ol>
<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Fnas-workflow.COFeV3km.webp&amp;fm=webp&amp;w=800&amp;h=415" alt="n8n Workflow" /></p>
<p>The result? Every morning I get a notification containing a collection of the latest AI news. <mark>No more habit of opening multiple tabs</mark> just to find the latest updates — just open one chat, everything is already curated.</p>
<p>This workflow is simple, but it immediately <mark>saves time</mark> and ensures I don’t miss important information in the field I’m interested in.</p>
<p><img src="https://fau.ai.id/.netlify/images?url=_astro%2Fnas-telegram.Da8S4Lux.webp&amp;fm=webp&amp;w=800&amp;h=1778" alt="Telegram Notification" /></p>
<h2>New Possibilities Unlocked</h2>
<p>After the first workflow succeeded, it felt like <mark>opening a door to a room full of new tools</mark>. Suddenly, other ideas began to emerge, and I realized this small device could do <mark>far more than I initially planned</mark>.</p>
<p>Some ideas I started thinking about:</p>
<ul>
<li>
<p>Automatic Work File Backup - Set <code>n8n</code> to monitor certain folders on my main NAS, then periodically make copies to <strong>Google Drive</strong>.</p>
</li>
<li>
<p>Public Data Scraper - <code>n8n</code> pulls data from specific sites — for example, product prices on marketplaces, event schedules, or specific news — then saves it in <strong>spreadsheet or database format</strong>. From there, I can create <mark>automatic analysis or reports</mark>.</p>
</li>
<li>
<p>Smart Home Control Dashboard - Connect this STB to smart home devices via <strong>API</strong> or <strong>MQTT broker</strong>, then create a simple UI interface to monitor room temperature, turn on lights, or control other devices.</p>
</li>
<li>
<p>Automatic Reminders - For example, pulling <strong>calendar data</strong>, combining it with <strong>weather data</strong>, then sending morning notifications with a schedule summary and weather forecast.</p>
</li>
</ul>
<h2>Lessons from This Experiment</h2>
<p>From this process, I gained several important notes — some technical, some related to device usage management:</p>
<ul>
<li>
<p>SD Card Works for Starting, but External HDD/SSD is Far More Durable</p>
<p>The <strong>128GB SD card</strong> I used was sufficient for installation and initial experiments. But for <mark>long-term use</mark>, especially if workflows start storing large data or making routine backups, an <strong>external SSD/HDD</strong> will be much safer from damage risk and have <mark>stable read-write speeds</mark>.</p>
</li>
<li>
<p>2GB RAM is Enough for Light Applications</p>
<p>With this much RAM, the STB can run <code>n8n</code>, file manager, and several background processes without problems. However, running <mark>heavy applications or multiple containers</mark> simultaneously will clearly cause performance degradation. This means I must <mark>selectively choose</mark> which applications to run and optimize workflows to avoid burdening RAM.</p>
</li>
<li>
<p>Monitor Performance to Keep the Server Running Smoothly</p>
<p>Regularly checking <strong>CPU</strong>, <strong>RAM</strong>, and <strong>storage</strong> usage is important. In CasaOS, this information can be seen from the dashboard. For more detail, I usually enter the terminal and use <code>htop</code> or <code>iotop</code> to see active processes.</p>
</li>
<li>
<p>Backup n8n Workflows Regularly</p>
<p><code>n8n</code> workflows are stored in a specific data folder. I created a <mark>weekly backup schedule</mark> for this folder to my main NAS. That way, if the SD card fails or the system needs to be reinstalled, I can <mark>restore all workflows</mark> without having to create them from scratch.</p>
</li>
</ul>
<hr />
<p>From a simple experiment, I now have a small digital assistant that’s always on standby. The <strong>HG680P B860H</strong> that was once just an STB now works tirelessly. Who knows, maybe old devices in your home can also have a new story.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From 0 to 180+ Mentees: Building a Mentorship Program That Actually Works]]></title>
            <link>https://fau.ai.id/mentoring-180-engineers</link>
            <guid isPermaLink="false">https://fau.ai.id/mentoring-180-engineers</guid>
            <pubDate>Sat, 15 Mar 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<h2>The Journey</h2>
<p>When I started my career, I had a mentor who changed my life. They didn’t just teach me code—they taught me how to think, how to grow, and how to help others.</p>
<p>Years later, I wanted to pay it forward. But I didn’t want to just mentor one person. I wanted to build something that could scale and help as many engineers as possible.</p>
<p><strong>The result:</strong> A mentorship program that has helped 180+ engineers get jobs, grow their careers, and become better engineers.</p>
<p><strong>88% job placement rate.</strong> 26k+ LinkedIn followers. AWS Community Builder.</p>
<p>Here’s how I built it and what I learned.</p>
<h2>The Problem I Solved</h2>
<p>When I was starting out, mentorship was hard to find:</p>
<ul>
<li>Senior engineers were busy</li>
<li>Mentorship was informal and inconsistent</li>
<li>No structure, no accountability</li>
<li>You had to know someone to get help</li>
</ul>
<p>I wanted to create something different: <strong>accessible, structured, scalable mentorship</strong>.</p>
<h2>The Program Structure</h2>
<h3>Phase 1: Intake &amp; Assessment (Week 1)</h3>
<p>Every mentee starts with a structured intake:</p>
<pre><code>1. Background Assessment
   - Current role/experience level
   - Goals (promotion? new job? skill building?)
   - Challenges they're facing
   - Learning style preferences

2. Goal Setting
   - 3-month goal (specific, measurable)
   - 6-month goal
   - 12-month goal

3. Baseline Assessment
   - Technical skills (1-10 scale)
   - Soft skills (communication, leadership)
   - Areas of strength
   - Areas for improvement

4. Mentorship Plan
   - Weekly meeting schedule
   - Focus areas
   - Success metrics
</code></pre>
<p>This takes 1 hour but saves months of wasted time.</p>
<h3>Phase 2: Weekly Mentoring (Weeks 2-12)</h3>
<p><strong>Weekly 1-on-1 meetings (30-60 minutes)</strong></p>
<p>Structure:</p>
<pre><code>1. Check-in (5 min)
   - How's work going?
   - Any blockers?

2. Progress Review (10 min)
   - Review goals from last week
   - Celebrate wins
   - Discuss challenges

3. Deep Dive (30 min)
   - Focus on one topic
   - Could be: code review, system design, career advice, etc.

4. Action Items (10 min)
   - What will you do this week?
   - How can I help?
   - Next week's topic
</code></pre>
<p><strong>Topics I cover:</strong></p>
<ul>
<li><strong>Technical:</strong> System design, code quality, testing, performance</li>
<li><strong>Career:</strong> Negotiation, promotions, job hunting, side projects</li>
<li><strong>Soft Skills:</strong> Communication, leadership, conflict resolution</li>
<li><strong>Mindset:</strong> Imposter syndrome, burnout, work-life balance</li>
</ul>
<h3>Phase 3: Accountability &amp; Tracking</h3>
<p>I use a simple tracking system:</p>
<pre><code>Mentee: [Name]
Goal: [3-month goal]
Status: [On track / At risk / Off track]

Week 1: [Progress]
Week 2: [Progress]
...

Metrics:
- Skills improved: [List]
- Confidence level: [1-10]
- Job applications sent: [Number]
- Interviews scheduled: [Number]
- Offers received: [Number]
</code></pre>
<p>This creates accountability and makes progress visible.</p>
<h2>What Actually Works</h2>
<h3>1. Specificity Beats Generality</h3>
<p><strong>Bad mentorship:</strong> “You should learn system design”
<strong>Good mentorship:</strong> “Let’s design a URL shortener. Here’s what I’d consider…”</p>
<p>Specific problems with real solutions stick. Generic advice is forgotten.</p>
<h3>2. Mentees Need to Do the Work</h3>
<p>I learned this the hard way. I can’t make someone successful—I can only guide them.</p>
<p><strong>My role:</strong></p>
<ul>
<li>Provide direction</li>
<li>Share experience</li>
<li>Hold them accountable</li>
<li>Celebrate wins</li>
</ul>
<p><strong>Their role:</strong></p>
<ul>
<li>Do the work</li>
<li>Ask questions</li>
<li>Apply learnings</li>
<li>Track progress</li>
</ul>
<p>The mentees who succeed are the ones who take ownership.</p>
<h3>3. Different Mentees Need Different Approaches</h3>
<p><strong>Junior engineers (0-2 years):</strong></p>
<ul>
<li>Need fundamentals (design patterns, testing, debugging)</li>
<li>Need confidence building</li>
<li>Need career guidance</li>
</ul>
<p><strong>Mid-level engineers (2-5 years):</strong></p>
<ul>
<li>Need system design skills</li>
<li>Need leadership preparation</li>
<li>Need negotiation skills</li>
</ul>
<p><strong>Senior engineers (5+ years):</strong></p>
<ul>
<li>Need strategic thinking</li>
<li>Need executive presence</li>
<li>Need mentorship skills (meta!)</li>
</ul>
<p>I tailor my approach to each person.</p>
<h3>4. Job Search is a Skill</h3>
<p>Many engineers are great at their jobs but terrible at job searching. I teach:</p>
<p><strong>Resume optimization:</strong></p>
<ul>
<li>Quantify impact (not just responsibilities)</li>
<li>Use keywords from job descriptions</li>
<li>Lead with achievements</li>
</ul>
<p><strong>Interview preparation:</strong></p>
<ul>
<li>System design practice</li>
<li>Behavioral interview coaching</li>
<li>Salary negotiation</li>
</ul>
<p><strong>Job search strategy:</strong></p>
<ul>
<li>Target companies (not spray and pray)</li>
<li>Leverage network</li>
<li>Follow up consistently</li>
</ul>
<p>This alone has helped 50+ mentees get jobs.</p>
<h3>5. Soft Skills Matter More Than You Think</h3>
<p>The best engineers I know aren’t always the smartest. They’re the ones who:</p>
<ul>
<li>Communicate clearly</li>
<li>Listen well</li>
<li>Build relationships</li>
<li>Handle conflict gracefully</li>
<li>Lead without authority</li>
</ul>
<p>I spend 30% of mentoring time on soft skills.</p>
<h2>Lessons Learned</h2>
<h3>1. Mentorship Doesn’t Scale Linearly</h3>
<p>I started mentoring 1-on-1. Then 5. Then 20. Then 50.</p>
<p>At 50 mentees, I hit a wall. I couldn’t give everyone enough attention.</p>
<p><strong>Solution:</strong> I created leverage:</p>
<ul>
<li><strong>Group sessions</strong> (office hours, workshops)</li>
<li><strong>Written content</strong> (guides, templates, frameworks)</li>
<li><strong>Peer mentoring</strong> (senior mentees mentor junior ones)</li>
<li><strong>Community</strong> (mentees help each other)</li>
</ul>
<p>Now I can support 180+ mentees with 10 hours/week of my time.</p>
<h3>2. Not Everyone Wants to Be Mentored</h3>
<p>Some people are resistant:</p>
<ul>
<li>“I don’t need help”</li>
<li>“I’ll figure it out myself”</li>
<li>“I don’t have time for meetings”</li>
</ul>
<p>I learned to recognize this early and not force it. Mentorship only works if both people are committed.</p>
<h3>3. Mentors Need Mentors Too</h3>
<p>I still have mentors. I still learn. I still get stuck.</p>
<p>Staying humble and continuing to learn is essential. My mentees can tell when I’m genuinely trying to help vs. just dispensing advice.</p>
<h3>4. Celebrate Wins (Even Small Ones)</h3>
<p>When a mentee gets a job, I celebrate with them. When they solve a hard problem, I acknowledge it.</p>
<p>This builds momentum and keeps them motivated.</p>
<h3>5. Track Everything</h3>
<p>I keep detailed notes on every mentee:</p>
<ul>
<li>Their goals</li>
<li>Their progress</li>
<li>Challenges they’ve overcome</li>
<li>Wins they’ve achieved</li>
</ul>
<p>This helps me:</p>
<ul>
<li>Remember context between meetings</li>
<li>Spot patterns</li>
<li>Measure impact</li>
<li>Improve the program</li>
</ul>
<h2>The Program Today</h2>
<p><strong>180+ mentees mentored</strong></p>
<ul>
<li>88% job placement rate</li>
<li>50+ promotions</li>
<li>30+ career transitions</li>
<li>100+ skill improvements</li>
</ul>
<p><strong>How it works:</strong></p>
<ul>
<li><strong>1-on-1 mentoring</strong> (30-40 active mentees)</li>
<li><strong>Group office hours</strong> (weekly, 20-30 people)</li>
<li><strong>Workshops</strong> (monthly, 50+ people)</li>
<li><strong>Peer mentoring</strong> (senior mentees help junior ones)</li>
<li><strong>Content library</strong> (guides, templates, frameworks)</li>
</ul>
<p><strong>Time investment:</strong> ~10 hours/week</p>
<p><strong>Impact:</strong> Helping engineers change their careers, get better jobs, and grow as people.</p>
<h2>How to Build Your Own Mentorship Program</h2>
<p>If you want to start mentoring:</p>
<h3>Start Small</h3>
<ul>
<li>Pick 1-2 people</li>
<li>Be consistent</li>
<li>Build trust</li>
<li>Then expand</li>
</ul>
<h3>Be Specific</h3>
<ul>
<li>Set clear goals</li>
<li>Track progress</li>
<li>Measure impact</li>
<li>Adjust as needed</li>
</ul>
<h3>Create Leverage</h3>
<ul>
<li>Document what you teach</li>
<li>Create group sessions</li>
<li>Build community</li>
<li>Enable peer mentoring</li>
</ul>
<h3>Stay Humble</h3>
<ul>
<li>You don’t have all the answers</li>
<li>Learn from your mentees</li>
<li>Admit mistakes</li>
<li>Keep growing</li>
</ul>
<h3>Measure Impact</h3>
<ul>
<li>Track job placements</li>
<li>Measure skill growth</li>
<li>Celebrate wins</li>
<li>Share stories</li>
</ul>
<h2>Real Stories</h2>
<p><strong>Mentee 1: Junior to Mid-Level</strong></p>
<ul>
<li>Started: Junior developer, imposter syndrome, stuck in first job</li>
<li>6 months: Learned system design, built confidence, got promoted</li>
<li>12 months: Senior developer, mentoring others</li>
</ul>
<p><strong>Mentee 2: Career Transition</strong></p>
<ul>
<li>Started: QA engineer, wanted to become a developer</li>
<li>6 months: Learned programming, built portfolio</li>
<li>12 months: Software engineer at FAANG company, 40% salary increase</li>
</ul>
<p><strong>Mentee 3: Leadership Journey</strong></p>
<ul>
<li>Started: Senior engineer, wanted to lead</li>
<li>6 months: Learned leadership skills, led a small project</li>
<li>12 months: Engineering manager, managing a team of 5</li>
</ul>
<p>These aren’t exceptions. They’re the norm in my program.</p>
<h2>The Takeaway</h2>
<p><mark>Mentorship is one of the highest-leverage activities you can do as an engineer.</mark></p>
<p>You can:</p>
<ul>
<li>Help someone change their career</li>
<li>Accelerate their growth by years</li>
<li>Build a community</li>
<li>Make a real impact</li>
</ul>
<p>And the best part? You learn as much from mentoring as your mentees do.</p>
<p><strong>If you’re a senior engineer, consider starting a mentorship program.</strong> It doesn’t have to be formal. It doesn’t have to be big. Start with one person. Be consistent. Track impact.</p>
<p>The world needs more great mentors. Be one.</p>
<hr />
<h2>Resources I Use</h2>
<ul>
<li><strong>Tracking:</strong> Notion (simple spreadsheet works too)</li>
<li><strong>Meetings:</strong> Google Meet / Zoom</li>
<li><strong>Content:</strong> Google Docs (shared templates)</li>
<li><strong>Community:</strong> Slack or Discord</li>
<li><strong>Learning:</strong> Books, courses, podcasts (I share recommendations)</li>
</ul>
<p><strong>Books I recommend to mentees:</strong></p>
<ul>
<li>“The Effective Engineer” by Edmond Lau</li>
<li>“Cracking the Coding Interview” by Gayle Laakmann McDowell</li>
<li>“Crucial Conversations” by Kerry Patterson</li>
<li>“The Manager’s Path” by Camille Fournier</li>
<li>“Radical Candor” by Kim Scott</li>
</ul>
<p><strong>If you want to start mentoring, these resources will help you get started.</strong></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Test Automation Framework That Scales: Lessons from 10,000+ Tests]]></title>
            <link>https://fau.ai.id/test-automation-at-scale</link>
            <guid isPermaLink="false">https://fau.ai.id/test-automation-at-scale</guid>
            <pubDate>Mon, 10 Mar 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<h2>The Challenge</h2>
<p>At TipTip, we were a fast-growing startup ($13M Series A) shipping features weekly. But as we scaled, our manual testing became a bottleneck:</p>
<ul>
<li><strong>300+ test cases</strong> per sprint, growing monthly</li>
<li><strong>3 QA engineers</strong> couldn’t keep up with feature velocity</li>
<li><strong>Regression testing</strong> took 2-3 days per release</li>
<li><strong>Bug escapes</strong> were increasing (things breaking in production)</li>
</ul>
<p>We needed test automation, but not just any automation. We needed something that could:</p>
<ol>
<li>Scale to thousands of tests</li>
<li>Run in parallel without flaking</li>
<li>Catch real bugs (not just false positives)</li>
<li>Be maintainable by a small team</li>
</ol>
<h2>The Solution: TipTip Automation Framework</h2>
<p>I built an enterprise-grade test automation framework using <strong>Ruby, Selenium, Cucumber, and Jenkins</strong>. The framework handled:</p>
<ul>
<li><strong>Web testing</strong> (desktop and mobile browsers)</li>
<li><strong>Mobile app testing</strong> (iOS and Android)</li>
<li><strong>API testing</strong> (REST and GraphQL)</li>
<li><strong>Visual regression testing</strong> (pixel-perfect comparisons)</li>
<li><strong>Parallel execution</strong> (100+ tests simultaneously)</li>
</ul>
<p><strong>The result:</strong> ↑90% automation coverage, ↓85% regression effort, ↓90% bug escapes.</p>
<h2>Architecture Overview</h2>
<h3>Core Components</h3>
<pre><code>┌─────────────────────────────────────────────────────┐
│         Cucumber Feature Files (BDD)                │
│  (Written in plain English, not code)               │
└────────────────┬────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────┐
│      Cucumber Step Definitions (Ruby)               │
│  (Maps English to actual test code)                 │
└────────────────┬────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────┐
│    Page Object Model (Selenium WebDriver)           │
│  (Encapsulates UI interactions)                     │
└────────────────┬────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────┐
│         Jenkins CI/CD Pipeline                      │
│  (Runs tests in parallel, generates reports)        │
└─────────────────────────────────────────────────────┘
</code></pre>
<h3>Key Design Patterns</h3>
<p><strong>1. Page Object Model</strong></p>
<p>Instead of scattered selectors throughout tests, we centralized all UI interactions:</p>
<pre><code class="language-ruby"># pages/login_page.rb
class LoginPage
  def initialize(driver)
    @driver = driver
  end

  def enter_email(email)
    @driver.find_element(:id, 'email').send_keys(email)
  end

  def enter_password(password)
    @driver.find_element(:id, 'password').send_keys(password)
  end

  def click_login
    @driver.find_element(:xpath, '//button[text()="Login"]').click
  end

  def is_logged_in?
    @driver.find_element(:id, 'user-menu').displayed?
  end
end

# features/login.feature
Feature: User Login
  Scenario: Successful login
    Given I am on the login page
    When I enter email "user@example.com"
    And I enter password "secure123"
    And I click login
    Then I should be logged in
</code></pre>
<p><strong>Benefits:</strong></p>
<ul>
<li>Selectors in one place (easy to update when UI changes)</li>
<li>Tests read like documentation</li>
<li>Reusable across multiple tests</li>
<li>Non-technical people can write tests</li>
</ul>
<p><strong>2. Parallel Execution</strong></p>
<p>Running 300 tests sequentially took 8 hours. Running them in parallel took 30 minutes.</p>
<pre><code class="language-ruby"># config/parallel.yml
parallel:
  workers: 10
  timeout: 300
  retry_count: 2
  
# Jenkins pipeline
stage('Test') {
  parallel {
    stage('Smoke Tests') {
      steps { sh 'bundle exec cucumber features/smoke/' }
    }
    stage('Regression Tests') {
      steps { sh 'bundle exec cucumber features/regression/' }
    }
    stage('API Tests') {
      steps { sh 'bundle exec cucumber features/api/' }
    }
    stage('Visual Tests') {
      steps { sh 'bundle exec cucumber features/visual/' }
    }
  }
}
</code></pre>
<p><strong>Key insight:</strong> Parallel execution is only useful if tests are independent. We had to refactor tests to:</p>
<ul>
<li>Use isolated test data</li>
<li>Clean up after each test</li>
<li>Avoid shared state</li>
</ul>
<p><strong>3. Visual Regression Testing</strong></p>
<p>Catching UI bugs automatically:</p>
<pre><code class="language-ruby"># features/step_definitions/visual_steps.rb
When('I take a screenshot of the dashboard') do
  @driver.save_screenshot('dashboard.png')
end

Then('the dashboard should match the baseline') do
  baseline = 'baselines/dashboard.png'
  current = 'screenshots/dashboard.png'
  
  diff = ImageCompare.compare(baseline, current)
  expect(diff.pixels_changed).to be &lt; 10  # Allow 10 pixel differences
end
</code></pre>
<p>This caught subtle CSS bugs that manual testing missed.</p>
<h2>Lessons Learned</h2>
<h3>1. Flaky Tests Are Worse Than No Tests</h3>
<p>We started with 500 tests, but 30% were flaky (failed randomly). This destroyed team trust:</p>
<ul>
<li>“Is it a real bug or just a flaky test?”</li>
<li>“Let’s just re-run it”</li>
<li>“I’ll ignore this failure”</li>
</ul>
<p><strong>Solution:</strong> We implemented:</p>
<ul>
<li>Explicit waits instead of sleep()</li>
<li>Retry logic for network failures</li>
<li>Detailed logging for debugging</li>
<li>Quarantine for flaky tests</li>
</ul>
<p>After 3 months, flakiness dropped to &lt;2%.</p>
<h3>2. Test Data Management Is Hard</h3>
<p>Tests need data to work with. We tried three approaches:</p>
<p><strong>Approach 1: Shared test database</strong></p>
<ul>
<li>❌ Tests interfere with each other</li>
<li>❌ Hard to debug</li>
<li>❌ Slow to set up</li>
</ul>
<p><strong>Approach 2: Fresh database per test</strong></p>
<ul>
<li>✅ Tests are isolated</li>
<li>❌ Slow (database setup takes time)</li>
<li>❌ Doesn’t catch data migration bugs</li>
</ul>
<p><strong>Approach 3: Hybrid (what we settled on)</strong></p>
<ul>
<li>✅ Fresh database per test suite</li>
<li>✅ Shared data within suite (faster)</li>
<li>✅ Clean up after suite completes</li>
</ul>
<pre><code class="language-ruby"># features/support/hooks.rb
Before(:suite) do
  DatabaseCleaner.strategy = :transaction
  DatabaseCleaner.clean_with(:truncation)
  create_test_data
end

After(:scenario) do
  DatabaseCleaner.clean
end
</code></pre>
<h3>3. Maintenance Is the Real Cost</h3>
<p>Writing tests is easy. Maintaining them is hard.</p>
<p><strong>Problem:</strong> Every time the UI changed, 50+ tests broke.</p>
<p><strong>Solution:</strong> We invested in:</p>
<ul>
<li>Strong Page Object Model (centralized selectors)</li>
<li>Regular refactoring (removing duplication)</li>
<li>Test documentation (why each test exists)</li>
<li>Owner assignment (each test has a maintainer)</li>
</ul>
<p>This reduced maintenance time from 4 hours/week to 1 hour/week.</p>
<h3>4. Not Everything Should Be Automated</h3>
<p>We tried to automate everything. Mistake.</p>
<p>Some tests are better manual:</p>
<ul>
<li><strong>Complex user journeys</strong> (too many edge cases)</li>
<li><strong>Exploratory testing</strong> (finding unexpected bugs)</li>
<li><strong>Usability testing</strong> (does it feel good?)</li>
</ul>
<p>We settled on:</p>
<ul>
<li><strong>Automate:</strong> Happy paths, edge cases, regressions</li>
<li><strong>Manual:</strong> Exploratory, usability, complex scenarios</li>
</ul>
<p>This gave us 90% coverage with 50% less maintenance burden.</p>
<h2>Metrics After 12 Months</h2>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Before</th>
<th>After</th>
<th>Change</th>
</tr>
</thead>
<tbody>
<tr>
<td>Test automation coverage</td>
<td>10%</td>
<td>90%</td>
<td><strong>↑800%</strong></td>
</tr>
<tr>
<td>Regression testing time</td>
<td>2-3 days</td>
<td>30 min</td>
<td><strong>↓85%</strong></td>
</tr>
<tr>
<td>Bug escapes to production</td>
<td>8-12/sprint</td>
<td>1-2/sprint</td>
<td><strong>↓85%</strong></td>
</tr>
<tr>
<td>QA team size</td>
<td>3 engineers</td>
<td>3 engineers</td>
<td>Same</td>
</tr>
<tr>
<td>Features shipped/sprint</td>
<td>8-10</td>
<td>15-20</td>
<td><strong>↑75%</strong></td>
</tr>
<tr>
<td>Test maintenance time</td>
<td>4 hrs/week</td>
<td>1 hr/week</td>
<td><strong>↓75%</strong></td>
</tr>
<tr>
<td>Test flakiness</td>
<td>30%</td>
<td>&lt;2%</td>
<td><strong>↓93%</strong></td>
</tr>
</tbody>
</table>
<p><strong>Most important:</strong> With the same team size, we shipped 2x more features with better quality.</p>
<h2>Real Impact</h2>
<p><strong>Before automation:</strong></p>
<ul>
<li>Sprint: 10 features planned</li>
<li>QA spends 3 days on regression testing</li>
<li>2 bugs escape to production</li>
<li>Team ships 8-10 features</li>
</ul>
<p><strong>After automation:</strong></p>
<ul>
<li>Sprint: 20 features planned</li>
<li>QA spends 30 minutes on regression testing</li>
<li>1 bug escapes to production</li>
<li>Team ships 15-20 features</li>
<li>QA has time for exploratory testing</li>
</ul>
<h2>Key Takeaways</h2>
<ol>
<li>
<p><strong>Automation is a multiplier, not a replacement</strong></p>
<ul>
<li>It doesn’t replace good QA thinking</li>
<li>It frees QA to do higher-value work</li>
</ul>
</li>
<li>
<p><strong>Start with the right architecture</strong></p>
<ul>
<li>Page Object Model saves months of refactoring</li>
<li>Parallel execution requires independent tests</li>
<li>Test data management is critical</li>
</ul>
</li>
<li>
<p><strong>Flaky tests destroy trust</strong></p>
<ul>
<li>Better to have 100 reliable tests than 500 flaky ones</li>
<li>Invest in stability from day one</li>
</ul>
</li>
<li>
<p><strong>Maintenance is the real cost</strong></p>
<ul>
<li>Plan for it from the start</li>
<li>Invest in good architecture</li>
<li>Assign owners to tests</li>
</ul>
</li>
<li>
<p><strong>Not everything should be automated</strong></p>
<ul>
<li>Automate what’s repetitive</li>
<li>Keep humans for exploratory work</li>
<li>Balance is key</li>
</ul>
</li>
</ol>
<h2>The Takeaway</h2>
<p><mark>Test automation at scale isn’t about writing more tests—it’s about building a sustainable system that catches bugs, enables faster shipping, and keeps your team sane.</mark></p>
<p>If you’re managing a QA team and struggling with regression testing, this framework approach is worth exploring. The ROI is massive: better quality, faster shipping, and happier engineers.</p>
<p><strong>Want to build something similar?</strong> Start with Page Object Model, add parallel execution, then layer in visual testing. Don’t try to do everything at once.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating Biometric Tests with Mocked Webcam Using Playwright]]></title>
            <link>https://fau.ai.id/playwright-biometric-testing</link>
            <guid isPermaLink="false">https://fau.ai.id/playwright-biometric-testing</guid>
            <pubDate>Thu, 19 Sep 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<h2>The Problem</h2>
<p>Testing biometric features—facial recognition, liveness detection, document verification—requires real webcam input. But in automated testing environments, you can’t rely on:</p>
<ul>
<li>Physical webcams in CI/CD pipelines</li>
<li>Consistent video input across test runs</li>
<li>Reproducible liveness scenarios (head turns, blinks, specific angles)</li>
</ul>
<p>This creates a testing gap: <mark>biometric features often go untested in automation</mark>, forcing teams to rely on manual testing or skip coverage entirely.</p>
<p>What if you could simulate webcam input with predefined video files and automate biometric tests end-to-end?</p>
<h2>The Solution</h2>
<p>Using <mark>Playwright’s media stream mocking capabilities</mark>, you can inject predefined video files (in y4m format) as fake webcam input. Combined with Chromium’s media device simulation flags, this enables fully automated biometric testing without physical hardware.</p>
<p><strong>The result:</strong> Reproducible, deterministic biometric tests that run in CI/CD pipelines.</p>
<h2>How It Works</h2>
<p>The approach uses three key components:</p>
<ol>
<li><strong>FFmpeg</strong>: Convert media files to y4m format (YUV4MPEG)</li>
<li><strong>Chromium Flags</strong>: Enable fake media stream and device simulation</li>
<li><strong>Playwright</strong>: Orchestrate the test and interact with the application</li>
</ol>
<pre><code>Video File (MP4, MOV, etc.)
       ↓
[FFmpeg Conversion]
       ↓
y4m Format (YUV4MPEG)
       ↓
[Chromium Fake Device]
       ↓
Playwright Test → Application receives mocked webcam
       ↓
Biometric Test Completes
</code></pre>
<h2>Step-by-Step Implementation</h2>
<h3>1. Install Dependencies</h3>
<pre><code class="language-bash">npm init -y
npm install @playwright/test
</code></pre>
<p>Install FFmpeg for media conversion:</p>
<p><strong>macOS:</strong></p>
<pre><code class="language-bash">brew install ffmpeg
</code></pre>
<p><strong>Linux (Ubuntu):</strong></p>
<pre><code class="language-bash">sudo apt update
sudo apt install ffmpeg
</code></pre>
<p><strong>Windows:</strong> Download from <a href="https://ffmpeg.org/download.html">ffmpeg.org</a></p>
<h3>2. Convert Media to y4m Format</h3>
<p><mark>Playwright requires video in y4m (YUV4MPEG) format</mark> for webcam simulation. Convert your media files using FFmpeg:</p>
<pre><code class="language-bash">ffmpeg -i liveness.mp4 -pix_fmt yuv420p -f yuv4mpegpipe liveness.y4m
</code></pre>
<p><strong>Flag breakdown:</strong></p>
<ul>
<li><code>-i liveness.mp4</code>: Input video file</li>
<li><code>-pix_fmt yuv420p</code>: Convert to YUV 4:2:0 pixel format (required by Playwright)</li>
<li><code>-f yuv4mpegpipe</code>: Output as YUV4MPEG format</li>
</ul>
<p><strong>Example scenarios you might convert:</strong></p>
<ul>
<li><code>liveness-head-turn.mp4</code> → <code>liveness-head-turn.y4m</code> (head movement detection)</li>
<li><code>passport-photo.mp4</code> → <code>passport-photo.y4m</code> (document verification)</li>
<li><code>blink-sequence.mp4</code> → <code>blink-sequence.y4m</code> (blink detection)</li>
</ul>
<h3>3. Create the Test Script</h3>
<p>Create <code>biometric-test.spec.js</code>:</p>
<pre><code class="language-javascript">const { test, chromium } = require('@playwright/test');
const path = require('path');

test('should simulate liveness detection with mocked webcam', async () =&gt; {
  // Path to converted y4m video file
  const fakeVideoPath = path.resolve(__dirname, 'liveness-head-turn.y4m');

  // Launch browser with media stream mocking
  const browser = await chromium.launch({
    headless: false,
    args: [
      // Automatically grant webcam/microphone permissions
      '--use-fake-ui-for-media-stream',
      
      // Enable fake media device simulation
      '--use-fake-device-for-media-stream',
      
      // Use predefined video file as webcam source
      `--use-file-for-fake-video-capture=${fakeVideoPath}`,
    ],
  });

  const page = await browser.newPage();
  
  // Navigate to your biometric test application
  await page.goto('https://your-biometric-app.com/liveness-check');
  
  // Interact with the application
  await page.locator('button:has-text("Start Liveness Check")').click();
  
  // Wait for biometric processing (adjust timing as needed)
  await page.waitForTimeout(6000);
  
  // Verify success state
  const successMessage = await page.locator('text=Liveness verified').isVisible();
  if (successMessage) {
    console.log('✓ Liveness detection passed');
  }
  
  await browser.close();
});
</code></pre>
<h3>4. Understanding the Chromium Flags</h3>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--use-fake-ui-for-media-stream</code></td>
<td>Automatically grants webcam/microphone permissions without user interaction</td>
</tr>
<tr>
<td><code>--use-fake-device-for-media-stream</code></td>
<td>Enables fake media device simulation instead of using real hardware</td>
</tr>
<tr>
<td><code>--use-file-for-fake-video-capture=&lt;path&gt;</code></td>
<td>Specifies the y4m video file to use as fake webcam input</td>
</tr>
</tbody>
</table>
<p>These flags work together to create a <mark>fully simulated media environment</mark> where the browser believes it’s accessing a real webcam, but is actually playing back your predefined video.</p>
<h3>5. Run the Test</h3>
<pre><code class="language-bash">npx playwright test biometric-test.spec.js
</code></pre>
<p>Or with specific configuration:</p>
<pre><code class="language-bash">npx playwright test biometric-test.spec.js --headed --project=chromium
</code></pre>
<h2>Advanced Scenarios</h2>
<h3>Multiple Liveness Checks</h3>
<p>Test different liveness scenarios in sequence:</p>
<pre><code class="language-javascript">const scenarios = [
  { name: 'head-turn', file: 'liveness-head-turn.y4m' },
  { name: 'blink', file: 'liveness-blink.y4m' },
  { name: 'smile', file: 'liveness-smile.y4m' },
];

for (const scenario of scenarios) {
  const fakeVideoPath = path.resolve(__dirname, scenario.file);
  
  const browser = await chromium.launch({
    args: [
      '--use-fake-ui-for-media-stream',
      '--use-fake-device-for-media-stream',
      `--use-file-for-fake-video-capture=${fakeVideoPath}`,
    ],
  });
  
  // Run test with this scenario
  // ...
  
  await browser.close();
}
</code></pre>
<h3>Document Verification Testing</h3>
<p>Test passport/ID verification with static images converted to video:</p>
<pre><code class="language-bash"># Convert image sequence to video
ffmpeg -framerate 1 -i document_%03d.jpg -c:v libx264 -pix_fmt yuv420p document.mp4

# Convert to y4m
ffmpeg -i document.mp4 -pix_fmt yuv420p -f yuv4mpegpipe document.y4m
</code></pre>
<h3>Parallel Testing</h3>
<p>Run multiple biometric tests in parallel:</p>
<pre><code class="language-javascript">test.describe.parallel('Biometric Tests', () =&gt; {
  test('liveness detection', async () =&gt; { /* ... */ });
  test('document verification', async () =&gt; { /* ... */ });
  test('facial recognition', async () =&gt; { /* ... */ });
});
</code></pre>
<h2>Real-World Use Cases</h2>
<ul>
<li><strong>Liveness Detection</strong>: Verify head movement, blinks, or facial expressions</li>
<li><strong>Document Verification</strong>: Test ID/passport scanning workflows</li>
<li><strong>Facial Recognition</strong>: Validate face matching algorithms</li>
<li><strong>KYC/AML Compliance</strong>: Automate identity verification testing</li>
<li><strong>Multi-factor Authentication</strong>: Test biometric MFA flows</li>
<li><strong>Mobile App Testing</strong>: Simulate webcam on mobile browsers</li>
</ul>
<h2>Troubleshooting</h2>
<h3>Video Not Playing</h3>
<p><strong>Issue:</strong> Chromium doesn’t recognize the y4m file</p>
<p><strong>Solution:</strong> Verify conversion with FFmpeg:</p>
<pre><code class="language-bash">ffmpeg -i liveness.y4m -f null -
</code></pre>
<h3>Permission Errors</h3>
<p><strong>Issue:</strong> Browser still prompts for permissions</p>
<p><strong>Solution:</strong> Ensure <code>--use-fake-ui-for-media-stream</code> is included in launch args</p>
<h3>Timing Issues</h3>
<p><strong>Issue:</strong> Test completes before biometric processing finishes</p>
<p><strong>Solution:</strong> Adjust wait time or use explicit waits:</p>
<pre><code class="language-javascript">// Wait for specific element instead of fixed time
await page.waitForSelector('[data-testid="verification-complete"]', { timeout: 10000 });
</code></pre>
<h3>CI/CD Pipeline Issues</h3>
<p><strong>Issue:</strong> Tests fail in headless mode</p>
<p><strong>Solution:</strong> Add <code>headless: false</code> or use <code>xvfb-run</code> on Linux:</p>
<pre><code class="language-bash">xvfb-run -a npx playwright test
</code></pre>
<h2>Performance Considerations</h2>
<ul>
<li><strong>Video File Size</strong>: Keep y4m files under 100MB for CI/CD efficiency</li>
<li><strong>Test Duration</strong>: Biometric processing typically takes 3-10 seconds</li>
<li><strong>Parallel Execution</strong>: Each test needs its own browser instance (memory intensive)</li>
<li><strong>Caching</strong>: Store converted y4m files in version control or cache layer</li>
</ul>
<h2>Limitations &amp; Workarounds</h2>
<table>
<thead>
<tr>
<th>Limitation</th>
<th>Workaround</th>
</tr>
</thead>
<tbody>
<tr>
<td>Only works with Chromium</td>
<td>Use Chromium for biometric tests, other browsers for general testing</td>
</tr>
<tr>
<td>Requires y4m format</td>
<td>Always convert media files with FFmpeg first</td>
</tr>
<tr>
<td>No audio simulation</td>
<td>Use <code>--use-fake-device-for-media-stream</code> for audio mocking if needed</td>
</tr>
<tr>
<td>Deterministic only</td>
<td>Video plays the same way every time (good for testing, not for randomness)</td>
</tr>
</tbody>
</table>
<h2>Best Practices</h2>
<ol>
<li><strong>Version Control Media Files</strong>: Store y4m files in a dedicated <code>/fixtures</code> directory</li>
<li><strong>Document Scenarios</strong>: Clearly label what each video file represents</li>
<li><strong>Modularize Tests</strong>: Create reusable test functions for common biometric flows</li>
<li><strong>Monitor Performance</strong>: Track test duration to catch regressions</li>
<li><strong>Combine with Visual Testing</strong>: Use Playwright’s screenshot/video recording for debugging</li>
<li><strong>Test Failure Paths</strong>: Create videos that simulate failed biometric checks too</li>
</ol>
<h2>Example: Complete Test Suite</h2>
<pre><code class="language-javascript">const { test, expect, chromium } = require('@playwright/test');
const path = require('path');

const getVideoPath = (scenario) =&gt; 
  path.resolve(__dirname, `fixtures/${scenario}.y4m`);

const launchWithVideo = async (videoPath) =&gt; {
  return chromium.launch({
    headless: false,
    args: [
      '--use-fake-ui-for-media-stream',
      '--use-fake-device-for-media-stream',
      `--use-file-for-fake-video-capture=${videoPath}`,
    ],
  });
};

test.describe('Biometric Verification', () =&gt; {
  test('should pass liveness check with head turn', async () =&gt; {
    const browser = await launchWithVideo(getVideoPath('liveness-head-turn'));
    const page = await browser.newPage();
    
    await page.goto('https://your-app.com/verify');
    await page.click('button:has-text("Start")');
    
    await expect(page.locator('text=Verified')).toBeVisible({ timeout: 10000 });
    
    await browser.close();
  });

  test('should verify document with passport image', async () =&gt; {
    const browser = await launchWithVideo(getVideoPath('passport-scan'));
    const page = await browser.newPage();
    
    await page.goto('https://your-app.com/document-verify');
    await page.click('button:has-text("Scan Document")');
    
    await expect(page.locator('[data-testid="document-verified"]')).toBeVisible();
    
    await browser.close();
  });
});
</code></pre>
<h2>The Takeaway</h2>
<p><mark>Mocking webcam input with Playwright transforms biometric testing</mark> from a manual, environment-dependent process into a reliable, automated workflow. By converting media files to y4m format and leveraging Chromium’s media simulation, you can:</p>
<ul>
<li><strong>Automate biometric verification</strong> in CI/CD pipelines</li>
<li><strong>Ensure reproducibility</strong> with predefined video scenarios</li>
<li><strong>Reduce manual testing</strong> burden on QA teams</li>
<li><strong>Catch regressions</strong> early in the development cycle</li>
</ul>
<p>This approach is particularly valuable for fintech, identity verification, and healthcare applications where biometric testing is critical but traditionally difficult to automate.</p>
<p><strong>Start with a simple liveness test, then expand to cover your full biometric workflow.</strong></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Guide to WebAssembly & Emscripten]]></title>
            <link>https://fau.ai.id/emscripten</link>
            <guid isPermaLink="false">https://fau.ai.id/emscripten</guid>
            <pubDate>Sun, 17 Mar 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><mark>WebAssembly (Wasm)</mark> has emerged as a powerful tool for bringing high-performance, low-level code to the web. With its ability to <mark>run at near-native speed</mark> in web browsers, WebAssembly opens up exciting possibilities for web development. In this tutorial, we’ll explore how to leverage <mark>Emscripten</mark>, a popular toolchain for compiling C/C++ code to WebAssembly.</p>
<h3>What is WebAssembly?</h3>
<blockquote>
<p>WebAssembly is a <mark>binary instruction format</mark> that serves as a compilation target for programming languages. It allows developers to run code written in languages like C, C++, and Rust on the web with <mark>near-native performance</mark>.</p>
</blockquote>
<p><strong>Key characteristics:</strong></p>
<ul>
<li>Unlike JavaScript, WebAssembly is <strong>not human-readable</strong></li>
<li>Designed to be <strong>compact and efficient</strong> for transmission over the network</li>
</ul>
<h3>What is Emscripten?</h3>
<blockquote>
<p>Emscripten is an <mark>open-source toolchain</mark> for compiling C and C++ code into WebAssembly, along with accompanying JavaScript glue code to integrate with web applications.</p>
</blockquote>
<p>It provides a <strong>bridge</strong> between these low-level languages and the web platform, enabling developers to:</p>
<ul>
<li>Port existing codebases to the web</li>
<li>Write new high-performance code for web deployment</li>
</ul>
<h3>Getting Started:</h3>
<p><strong>1. Install Emscripten</strong></p>
<p>The first step is to install Emscripten on your development machine. You can follow the installation instructions provided in the official Emscripten documentation (<a href="https://emscripten.org/docs/getting_started/index.html">https://emscripten.org/docs/getting_started/index.html</a>).</p>
<p><strong>2. Write Your C/C++ Code</strong></p>
<p>Once Emscripten is installed, you can start writing your C or C++ code. For demonstration purposes, let’s create a simple “Hello, World!” program in C.</p>
<pre><code class="language-c">#include &lt;stdio.h&gt;
int main() {
    printf("Hello, WebAssembly!\n");
    return 0;
}
</code></pre>
<p><strong>3. Compile to WebAssembly</strong></p>
<p>Use the Emscripten compiler (<mark><code>emcc</code></mark>) to compile your C/C++ code to WebAssembly. Navigate to the directory containing your source code and run the following command:</p>
<pre><code class="language-bash">emcc hello.c -o hello.html
</code></pre>
<blockquote>
<p>This command will generate three files: <code>hello.html</code>, <code>hello.js</code>, and <code>hello.wasm</code></p>
</blockquote>
<p><strong>4. Test Your Application with <code>emrun</code></strong></p>
<p>Instead of manually opening the HTML file in a browser, you can use <mark><code>emrun</code></mark> to simplify the testing process. First, navigate to the directory containing your <code>hello.html</code> file, then run:</p>
<pre><code class="language-bash">emrun --no_browser --port 8080 .
</code></pre>
<p>This command will start a local web server. You can then open your browser and go to <code>http://localhost:8080/hello.html</code> to see <strong>“Hello, WebAssembly!”</strong> printed!</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*d0GOnxm7YOgRNnmiOLfpOA.png" alt="Hello WebAssembly printed" /></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling Amazon S3 CORS Errors: A Simple Guide]]></title>
            <link>https://fau.ai.id/s3-cors-error</link>
            <guid isPermaLink="false">https://fau.ai.id/s3-cors-error</guid>
            <pubDate>Sun, 03 Mar 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*bWfUIwXAwTPSMRwCYCE1vg.png" alt="S3 CORS Error" /></p>
<p>Did you encounter a CORS error while trying to download files from your Amazon S3 bucket? Don’t worry, I’ve got your back. Here’s how to understand and fix S3 CORS errors step by step:</p>
<h3>Understanding CORS:</h3>
<p>Cross-Origin Resource Sharing (CORS) is a browser security feature that prevents scripts from one domain from accessing resources on another domain. <mark>It’s a vital security measure</mark>, btw.</p>
<h3>The Problem:</h3>
<p>You’ll run into CORS errors when <mark>your S3 bucket’s CORS configuration isn’t set up properly</mark>. These errors pop up when you’re trying to access resources from a different origin or domain (see the above screenshot).</p>
<h3>Fixing CORS Errors in Amazon S3:</h3>
<p>Here’s how to solve those CORS errors step by step:</p>
<ul>
<li>
<p>Head to the AWS Management Console: Log in to your AWS Management Console and find your way to the S3 dashboard.</p>
</li>
<li>
<p>Pick Your Bucket: Select the S3 bucket that’s giving you trouble with CORS.</p>
</li>
<li>
<p>Adjust the CORS Settings: In your bucket’s properties or permissions section, go to the CORS configuration settings.</p>
</li>
</ul>
<p><img src="https://miro.medium.com/v2/format:webp/1*z_j72UlBBtzlfRSjVKrRxw.png" alt="captionless image" /></p>
<ul>
<li>Add CORS Rules: <mark>Add rules that specify which domains can access your bucket’s resources</mark>, along with the allowed HTTP methods and headers. Here’s a sample CORS setup:</li>
</ul>
<pre><code class="language-json">[
    {
        "AllowedHeaders": ["*"],
        "AllowedMethods": ["PUT", "POST", "DELETE"],
        "AllowedOrigins": ["http://www.your-domain-1.com"],
        "ExposeHeaders": []
    },
    {
        "AllowedHeaders": ["*"],
        "AllowedMethods": ["PUT", "POST", "DELETE"],
        "AllowedOrigins": ["http://www.your-domain-2.com"],
        "ExposeHeaders": []
    },
    {
        "AllowedHeaders": [],
        "AllowedMethods": ["GET"],
        "AllowedOrigins": ["*"],
        "ExposeHeaders": []
    }
]
</code></pre>
<ul>
<li><strong>AllowedOrigins</strong>: <mark>Specify the domains allowed to make requests</mark>.</li>
<li><strong>AllowedMethods</strong>: <mark>Define the permitted HTTP methods</mark>.</li>
<li><strong>AllowedHeaders</strong>: <mark>Specify the allowed headers</mark>.</li>
</ul>
<ul>
<li>Save Your Changes: Once you’ve added your CORS rules, save and you’re good to go!</li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate Code Review dengan Amazon CodeGuru]]></title>
            <link>https://fau.ai.id/codeguru</link>
            <guid isPermaLink="false">https://fau.ai.id/codeguru</guid>
            <pubDate>Sat, 12 Nov 2022 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/0*dYLMVPBTxZ84okmD.png" alt="https://aws.amazon.com/" /></p>
<p>Amazon CodeGuru adalah sebuah <mark><em>code review automation service</em> dari AWS</mark> yang bisa membantu mengevaluasi <em>code</em> kita, dan <mark>merekomendasikan <em>code</em> terkait <em>performance</em> aplikasi</mark> kita. Amazon CodeGuru ini <mark>menggunakan machine-learning untuk mendeteksi <em>defect</em></mark> pada code. Untuk saat ini, <mark>hanya bahasa pemrograman Java saja yang di-support</mark>. Di tulisan ini kita akan mencoba mengasosiasikan AWS CodeCommit dengan Amazon CodeGuru.</p>
<p>Prerequisites: <mark>Silahkan buat code repository terlebih dahulu di Amazon CodeCommit</mark>.</p>
<p>Setelah code repository terbuat, <mark>buka halaman Amazon CodeGuru</mark>, dan buka sub-menu Repositories. Lalu klik <mark>Associate repository and run analysis</mark>.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*8kBylENPDr_dA11pKKHHtQ.png" alt="" /></p>
<p><mark>Pilih AWS CodeCommit sebagai source provider</mark>, dan pilih juga repository locationnya.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*YqBt4azEAx309cdR0UE7Jw.png" alt="" /></p>
<p>Lalu <mark>pilih branch yang nantinya akan di-scan</mark> oleh Amazon CodeGuru, lalu Asosiasikan.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*eDRFolMfboHkYcmvWITZmw.png" alt="" /></p>
<p>Sekarang, <mark>coba commit dan push code</mark> tersebut ke repo Amazon CodeCommit. Jika sudah, <mark>buat pull request</mark>.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*sszpfJMyuC6mFfYloqp3iw.png" alt="" /></p>
<p><img src="https://miro.medium.com/v2/resize:fit:2000/format:webp/1*bvWjT2RXD8e5Z3gKnOr7uQ.png" alt="" /></p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*GE8n9zk6cWUy1FPhLa7Z0g.png" alt="" /></p>
<p><img src="https://miro.medium.com/v2/resize:fit:2000/format:webp/1*36IgA0DYyGAmj5g6PVeyqw.png" alt="" /></p>
<p>Di tab <em>Changes</em>, Amazon CodeGuru akan <mark>memberi komen jika ada code yang bisa di-<em>fix</em> atau di-<em>improve</em></mark>.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*aCcWSfqpIhmCyHkJZznCiw.png" alt="" /></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serve Files Lebih Cepat dengan CloudFront CDN]]></title>
            <link>https://fau.ai.id/cloudfront</link>
            <guid isPermaLink="false">https://fau.ai.id/cloudfront</guid>
            <pubDate>Mon, 17 Oct 2022 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://miro.medium.com/v2/resize:fit:1196/format:webp/0*szZE95ecnMgR17Rb.png" alt="docs.aws.amazon.com" /></p>
<p>Amazon CloudFront adalah sebuah layanan <mark>content delivery network (CDN)</mark>. Kita dapat mempercepat pengiriman file statis melalui protokol HTTP/HTTPS karena <mark>CloudFront secara otomatis memilih edge location terdekat</mark>. Layanan ini tersebar di seluruh dunia—2 di Australia, 2 di Amerika Selatan, 13 di Asia, 16 di Eropa, dan 20 di Amerika Serikat—serta dapat dipantau performanya melalui <mark>Amazon CloudWatch</mark>.</p>
<p>Di tulisan ini, kita akan:</p>
<ul>
<li>Membuat CloudFront distribution</li>
<li>Mengarahkan request pengguna ke domain distribution (bukan domain S3) agar <mark>CDN memilih edge location terdekat</mark></li>
</ul>
<h2>Prerequisites:</h2>
<ul>
<li>Siapkan file statis pada Amazon S3 bucket yang sudah <mark>ACLs enabled dan publicly accessible</mark>.</li>
</ul>
<ul>
<li>Pergi ke menu CloudFront, lalu klik <strong>Create distribution</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:994/format:webp/1*8NGUK9v4NvMWCJ13n8lS_w.png" alt="" /><img src="https://miro.medium.com/v2/resize:fit:1008/format:webp/1*FMmyCphn5OY9voWpZFR7bQ.png" alt="" /></p>
<ul>
<li>Pada dropdown <strong>Origin domain</strong>, pilih S3 bucket yang sudah disiapkan, lalu klik <strong>Create control setting</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*uPZcf-6juChe8VQITZqjfw.png" alt="" /></p>
<ul>
<li>Masukkan nama bucket, pastikan opsi <strong>Signing behavior</strong> diset ke <mark>Sign requests</mark>, lalu klik <strong>Create</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*h-OUppbrTeB69tSxdMucuQ.png" alt="" /></p>
<ul>
<li>Di bagian <strong>Settings</strong>, pilih price class. Contohnya, gunakan <mark>“Use all edge locations (best performance)”</mark> untuk jangkauan maksimum. Jika ingin hemat biaya, pilih price class yang lebih terbatas.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*Y8Hqvasmv81a6caM_CS9QQ.png" alt="" /></p>
<ul>
<li>Biarkan pengaturan lainnya default, kemudian klik <strong>Create distribution</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*bgmETgbbxw9BvV3UspRk0Q.png" alt="" /></p>
<ul>
<li>Setelah distribution aktif, bandingkan kecepatan akses file langsung dari S3 dengan domain CloudFront. <mark>Gunakan domain distribution</mark> saat pengguna mengunduh file, dan amati perbedaannya—biasanya CloudFront memuat lebih cepat dibanding akses langsung ke S3.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:2000/format:webp/1*dwtDAutJe2_ry93oBQBwdg.png" alt="" /></p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*PgPxnqpcuzrC097xNatqDg.png" alt="" /></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transform Data dengan Amazon S3 Object Lambda]]></title>
            <link>https://fau.ai.id/s3-object-lambda</link>
            <guid isPermaLink="false">https://fau.ai.id/s3-object-lambda</guid>
            <pubDate>Sun, 02 Oct 2022 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/0*cqwnaAoALQMoKjKL.png" alt="aws.amazon.com" /></p>
<p>Amazon S3 digunakan untuk menyimpan data yang dapat dibagikan ke berbagai aplikasi. Namun, sebagian aplikasi membutuhkan <mark>format data yang spesifik</mark>. Kita bisa menyimpan data dalam banyak format, tetapi pendekatan tersebut tidak efisien. Alternatifnya, transform data sebelum dikonsumsi aplikasi.</p>
<p>Dengan <mark>Amazon S3 Object Lambda</mark>, kita dapat menjalankan Lambda function setiap kali aplikasi mengambil data. Fungsi tersebut dapat mengubah data ke format yang dibutuhkan, sehingga <mark>tak perlu menyimpan banyak versi data</mark> di S3.</p>
<p>Contoh penggunaan: aplikasi membutuhkan data JSON, sementara file di S3 masih berupa CSV.</p>
<h2>Prerequisite:</h2>
<ul>
<li>Buat Lambda function untuk convert CSV ke JSON. Contoh kodenya tersedia di repo ini: <mark><a href="https://github.com/fauzanjantung/lambda-csv-to-json/blob/main/index.py">lambda-csv-to-json/index.py</a></mark></li>
</ul>
<p>Untuk memulai, buka S3 terlebih dahulu.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*3OC2mbuEGoFy6H8b1qbxqw.png" alt="" /></p>
<p>Lalu buat bucket yang publicly accessible, dan upload data ke bucket tersebut. Contoh dataset CSV yang akan digunakan:</p>
<p>Username,Login email,Identifier,First name,Last name
<a href="mailto:booker12,rachel@example.com">booker12,rachel@example.com</a>,9012,Rachel,Booker
<a href="mailto:grey07,laura@example.com">grey07,laura@example.com</a>,2070,Laura,Grey
<a href="mailto:johnson81,craig@example.com">johnson81,craig@example.com</a>,4081,Craig,Johnson
<a href="mailto:jenkins46,mary@example.com">jenkins46,mary@example.com</a>,9346,Mary,Jenkins
<a href="mailto:smith79,jamie@example.com">smith79,jamie@example.com</a>,5079,Jamie,Smith</p>
<p>Berikut langkah membuat pipeline transformasi dengan Object Lambda:</p>
<ul>
<li>Buka tab <strong>Access Points</strong>, kemudian klik <strong>Create access point</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*h5HK9SIhgQoSQ82qWWllTg.png" alt="" /></p>
<ul>
<li>Isi nama access point, pilih <strong>Network Origin</strong>. Di contoh ini gunakan Internet Network Origin dan hilangkan centang “Block all public access” agar bisa diakses publik. Setelah selesai, klik <strong>Create access point</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*kYz-k8L0uBIJ-d2D8gD7Ng.png" alt="" /><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*ISszmpj0YMBDfvNHwsKhvA.png" alt="" /></p>
<ul>
<li>Buka menu <strong>Object Lambda Access Points</strong> di sidebar, lalu pilih <strong>Create Object Lambda Access Point</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:366/format:webp/1*mQP41q9R_eccmHTOcC3lKA.png" alt="" /><img src="https://miro.medium.com/v2/resize:fit:1636/format:webp/1*no26TBxxb4Rse7v1MiIHpQ.png" alt="" /></p>
<ul>
<li>Isi nama Object Lambda Access Point, pilih region, kemudian pilih Access Point yang baru dibuat melalui <strong>Browse S3</strong>. Selanjutnya, pilih Lambda function <mark>CsvToJsonConverter</mark> yang sudah disiapkan.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1152/format:webp/1*L6pfXpCXojxeJjXpE6OLeQ.png" alt="" /><img src="https://miro.medium.com/v2/resize:fit:850/format:webp/1*kSXQ0OX66i8vJCPh_SSsNg.png" alt="" /></p>
<ul>
<li>Klik <strong>Create Object Lambda Access Point</strong>.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*SwZ38I115R7rQV6CQgwYxQ.png" alt="" /></p>
<ul>
<li>Buka detail Object Lambda Access Point dan salin ARN-nya.</li>
</ul>
<p><img src="https://miro.medium.com/v2/resize:fit:1188/format:webp/1*dd2ShDYs7lkZR8XI26MRew.png" alt="" /><img src="https://miro.medium.com/v2/resize:fit:814/format:webp/1*srIbkO0hDE43WwgeOUH_DQ.png" alt="" /></p>
<ul>
<li>Terakhir, buat satu Lambda function lagi untuk mengambil data yang sudah dikonversi. Contoh kode:</li>
</ul>
<pre><code class="language-python">import boto3
s3 = boto3.client('s3')

def lambda_handler(event, context):
    response = s3.get_object(
        Bucket='{OBJECT-LAMBDA-ACCESS-POINT}',
        Key='dev-team.csv')
    
    return response['Body'].read()
</code></pre>
<p>Ganti <code>{OBJECT-LAMBDA-ACCESS-POINT}</code> dengan ARN yang telah disalin. Setelah membuat fungsi, konfigurasi test event, lalu jalankan pengujian. Lambda tersebut akan mengembalikan respons JSON—hasil konversi file CSV di bucket S3—sedangkan file asli tetap utuh.
Key= ‘dev-team.csv’</p>
<blockquote>
<p>return response[‘Body’].read()</p>
</blockquote>
<p>Ganti <code>{OBJECT-LAMBDA-ACCESS-POINT}</code> dengan ARN yang telah disalin. Setelah membuat fungsi, konfigurasi test event, lalu jalankan pengujian. Lambda tersebut akan mengembalikan respons JSON—hasil konversi file CSV di bucket S3—sedangkan file asli tetap utuh.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1276/format:webp/1*v7Lv3E58gaUcQLxFOun_kA.png" alt="" /><img src="https://miro.medium.com/v2/resize:fit:726/format:webp/1*JhOQeEymKH1hlzuYJ7kd_w.png" alt="" /></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tentang AWS Elastic Beanstalk]]></title>
            <link>https://fau.ai.id/beanstalk</link>
            <guid isPermaLink="false">https://fau.ai.id/beanstalk</guid>
            <pubDate>Sun, 17 Jul 2022 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*_UfUT1FVrqIgXolwIZ_DLw.png" alt="Generated by AI" /></p>
<p>AWS Elastic Beanstalk adalah sebuah service yang memungkinkan kita untuk <mark>mengupload code web app beserta konfigurasi environment</mark>. Elastic Beanstalk kemudian akan secara otomatis menyediakan resources yang diperlukan—seperti EC2, Elastic Load Balancing, automatic scaling, dan lain-lain—untuk menjalankan aplikasi tersebut.</p>
<p>Service ini memudahkan developer yang belum familiar dengan AWS untuk <mark>deploy, scale, dan memonitor web app</mark>. Elastic Beanstalk sangat fleksibel karena mendukung berbagai platform dan bahasa pemrograman seperti Ruby, PHP, Node.js, Python, .NET (Windows), Go, Java, Docker, dan lainnya.</p>
<p>Di AWS Elastic Beanstalk ada 2 environment tier:</p>
<h3>Web server environment</h3>
<p>Environment ini biasanya digunakan untuk aplikasi web pada umumnya yang berjalan di HTTP port 80. Tier ini menyediakan beberapa resources penting:</p>
<ul>
<li><mark>Amazon Route 53</mark>: URL yang dibuat Route 53 akan diasosiasikan dengan Elastic Load Balancer.</li>
<li><mark>Elastic Load Balancer</mark>: Terintegrasi dengan auto-scaling group untuk menyesuaikan kapasitas aplikasi sesuai traffic.</li>
<li><mark>EC2 Instances</mark>: Elastic Beanstalk minimal menyediakan satu instance untuk menjalankan aplikasi.</li>
</ul>
<h3>Worker environment</h3>
<p>Environment ini cocok untuk aplikasi dengan backend processing task yang berinteraksi dengan AWS SQS. Di tier ini akan terpasang daemon pada setiap EC2 instance untuk <mark>menarik request dari SQS queue</mark>.</p>
<h2>Deployment Options</h2>
<p>Elastic Beanstalk menyediakan beberapa deployment option untuk memudahkan pengelolaan infrastruktur: <mark>All at once</mark>, <mark>Rolling</mark>, <mark>Rolling with additional batch</mark>, dan <mark>Immutable</mark>.</p>
<h3>All at once</h3>
<p>Ini adalah deployment option default. Opsi ini akan merilis aplikasi ke semua resources secara bersamaan sehingga <mark>berpotensi menimbulkan downtime</mark> bagi user.</p>
<p>Ada jawaban bagus dan mudah dimengerti di stackoverflow tentang opsi deployment EB, bisa dilihat disini <a href="https://stackoverflow.com/questions/38656595/difference-between-rolling-rolling-with-additional-batch-and-immutable-deployme">https://stackoverflow.com/questions/38656595/difference-between-rolling-rolling-with-additional-batch-and-immutable-deployme</a>.</p>
<blockquote>
<p>All at once: Replace all <code>v1</code> with <code>v2</code> at the same time. Failure not handled.</p>
</blockquote>
<h3>Rolling</h3>
<p>Rolling dapat meminimalkan disruption dibanding all at once. Elastic Beanstalk akan melakukan deployment dalam beberapa batch, mengupdate sebagian resources setiap kali sehingga kita mungkin memiliki dua versi aplikasi dalam waktu singkat. <mark>Aplikasi tetap bisa melayani request</mark> selama proses berlangsung.</p>
<blockquote>
<p>Rolling: Replace <code>v1</code> instances with <code>v2</code> instances one at a time. Watch for failures.</p>
</blockquote>
<h3>Rolling with additional batch</h3>
<p>Prinsipnya mirip rolling, tetapi opsi ini menambahkan batch ekstra sehingga <mark>kapasitas tersedia tetap stabil selama update</mark> berlangsung.</p>
<blockquote>
<p>Rolling with batch: Create some new <code>v2</code> instances. If successful, roll out on <code>v1</code> instances. When all are <code>v2</code> instances, scale back to original size.</p>
</blockquote>
<h3>Immutable</h3>
<p>Opsi ini membuat instance baru sebanyak resource yang ada sehingga ukuran environment sementara menjadi dua kali lipat. Setelah instance baru lolos health check, environment lama akan dihapus untuk <mark>deployment yang aman dan tanpa downtime</mark>.</p>
<blockquote>
<p>Immutable: Don’t change <code>v1</code> instances. Create same number of <code>v2</code> instances. Wait for success, then stop <code>v1</code> instances.</p>
</blockquote>
<h3>Demonstrasi</h3>
<p>Untuk pergi ke halaman AWS Elastic Beanstalk, kita bisa search Elastic Beanstalk di kolom pencarian di AWS Console lalu klik menu Elastic Beanstalk. Untuk deploy di Elastic Beanstalk, kita bisa mulai dengan klik button Create Application.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*0wMg-OfS_YJSX1qCIKmqcg.png" alt="captionless image" /></p>
<p>Kita bisa memberi nama aplikasi serta menambahkan tag, misalnya key “env” dengan value “test” untuk <mark>membantu pengelompokan resource</mark>.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*i_j1U-rS8ve6wj00x42aHg.png" alt="captionless image" /></p>
<p>Pilih platform aplikasi—contoh demo ini menggunakan PHP di Amazon Linux 2. Untuk application code, kita bisa upload dari lokal ataupun S3; pada demo ini digunakan <mark>sample application bawaan</mark>.</p>
<p>Kita bisa langsung buat aplikasi dengan default setting, tapi aku akan coba menjelaskan custom configuration. Klik configure more options untuk pergi ke menu configurations.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*zH9Qa88q1swLDkPdrQhXMg.png" alt="captionless image" /></p>
<p>Di Presets tersedia opsi Low cost, High availability, dan Custom. Low cost akan menggunakan resource minimal, sementara High availability menerapkan deployment ke beberapa Availability Zone dengan <mark>auto-scaling dan load balancing aktif</mark>.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*Tdj1btF78b_uSP29MqTV1w.png" alt="captionless image" /></p>
<p>Kita juga bisa mengatur instance agar meng-upload rotated logs ke S3. Di bagian ini kita dapat mengaktifkan log rotation dan mengatur <mark>lama retensi log</mark>, misalnya hingga 10 tahun.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*I-vFkm1Mo0QgNjf6Ljjm8A.png" alt="captionless image" /></p>
<p>Untuk instances, t2.micro akan menjadi instance default kita, yang mana cukup oke. Kita juga bisa atur konfigurasi root volume instance ini.</p>
<p>Pada auto-scaling, tentukan jumlah minimum dan maksimum instance, pilih Availability Zone, serta atur trigger. Misalnya, set upper threshold CPU utilization 75% dan lower threshold 30%. Jika CPU melampaui 75% selama lima menit, <mark>auto-scaling akan otomatis menambah instance</mark>.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*7q3ncOvr83EystlBwkJYug.png" alt="captionless image" /><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*r3SuLCgeXbfYHR_XAnTzYg.png" alt="captionless image" /></p>
<p>Lalu ada notifikasi, kita bisa input email kita untuk mendapatkan updates terkait event yang terjadi di environment kita. Kita bisa menggunakan SNS. SNS ini akan mengirim email ke kita tiap ada event penting.</p>
<p>Kita juga bisa menambahkan database ke EB kita dengan cara restore existing snapshot atau setup database baru.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*8d-r4nA_cZ57LGloCSeYJw.png" alt="captionless image" /></p>
<p>Kalau kita klik save, Elastic Beanstalk akan membuat environment kita sesuai dengan konfigurasi kita. Ini akan memakan waktu selama beberapa menit untuk menyiapkan dan memproses semua resources yang dibutu</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*kHmhzh1Vtihby3YrEcBKmQ.png" alt="captionless image" /></p>
<p>Berhasil! Kita telah berhasil deploy aplikasi php ke Elastic Beanstalk. Kita bisa langsung membuka web app tersebut dengan klik link yang tersedia di detail environments.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*PV-FkhPHn2qL6EKQnt8FQw.png" alt="captionless image" /></p>
<p>AWS EB juga menyediakan logs, kita bisa mendownload logs dari EC2 Instance di menu logs. Kita juga bisa melihat total requests, CPU Utilization di menu Monitoring, juga kita bisa melihat semua event yang terjadi di menu Events.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*pogsEGrsmn8GhpQQfLBlJA.png" alt="captionless image" /><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*pt5gRlVWEKmYirKE5qTWiQ.png" alt="captionless image" /><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*nM9hClEVOdtyYU2VvPmnyA.png" alt="captionless image" /><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*pwTdFmj80KsJzYeYNP56ew.png" alt="captionless image" /></p>
<p>Semuanya sangat simpel dan memudahkan ya. Gimana? Tertarik untuk coba AWS Elastic Beanstalk untuk web app kamu yang selanjutnya?</p>
]]></content:encoded>
        </item>
    </channel>
</rss>