<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: amarpreetbhatia</title>
    <description>The latest articles on Forem by amarpreetbhatia (@amarpreetbhatia).</description>
    <link>https://forem.com/amarpreetbhatia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F189250%2Fa6af54a7-4c43-4e1c-8ca2-f03c7b09bae0.jpeg</url>
      <title>Forem: amarpreetbhatia</title>
      <link>https://forem.com/amarpreetbhatia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/amarpreetbhatia"/>
    <language>en</language>
    <item>
      <title>Building a Windows Productivity Tool Using GitHub Copilot CLI</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Mon, 09 Feb 2026 08:56:19 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/building-a-windows-productivity-tool-using-github-copilot-cli-52c2</link>
      <guid>https://forem.com/amarpreetbhatia/building-a-windows-productivity-tool-using-github-copilot-cli-52c2</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a small productivity tool called &lt;strong&gt;PowerShell Helper&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;While working on Windows, I often switch between Bash-enabled terminals and PowerShell. I keep missing the common Bash commands that I use daily, and I usually end up either installing Bash, Googling the PowerShell equivalent, or asking an AI tool questions like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How do I curl a URL in PowerShell?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This constant context switching breaks flow.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;PowerShell Helper&lt;/strong&gt; — a lightweight CLI tool that lets me describe what I want in plain English and instantly get the correct PowerShell command along with a simple explanation.&lt;/p&gt;

&lt;p&gt;It’s a small tool, but it solves a real daily pain point for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;GitHub repository:&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/amarpreetbhatia/powershell-helper" rel="noopener noreferrer"&gt;https://github.com/amarpreetbhatia/powershell-helper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tool runs directly from the command prompt or PowerShell.&lt;/p&gt;

&lt;p&gt;Example usage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Convert a natural language task into a PowerShell command&lt;/li&gt;
&lt;li&gt;See a short explanation so you actually learn the command instead of just copying it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01zwh9j8mw7h9hj8fa65.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01zwh9j8mw7h9hj8fa65.png" alt=" " width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;This was the most impressive part of the project.&lt;/p&gt;

&lt;p&gt;I built this entire tool in &lt;strong&gt;about 15 minutes&lt;/strong&gt;, without opening any IDE.&lt;br&gt;&lt;br&gt;
Everything was done using a simple command prompt and &lt;strong&gt;GitHub Copilot CLI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Copilot CLI helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate the initial PowerShell script structure&lt;/li&gt;
&lt;li&gt;Refine the command output to be clear and beginner-friendly&lt;/li&gt;
&lt;li&gt;Add small safety and usability improvements&lt;/li&gt;
&lt;li&gt;Quickly draft documentation without overthinking it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I really liked is how Copilot CLI fits naturally into the terminal workflow. Instead of switching between editor, browser, and AI chat, I stayed in the CLI the whole time.&lt;/p&gt;

&lt;p&gt;This project showed me how Copilot CLI isn’t just for writing code — it’s a powerful way to think, build, and ship small productivity tools very quickly.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>From Vibe Coding to Spec-Driven Development that Slashed Dev Time</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Tue, 02 Dec 2025 11:16:54 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/from-vibe-coding-to-spec-driven-development-that-slashed-dev-time-3f1f</link>
      <guid>https://forem.com/amarpreetbhatia/from-vibe-coding-to-spec-driven-development-that-slashed-dev-time-3f1f</guid>
      <description>&lt;h2&gt;
  
  
  🚀 From 'Vibe' to Victory: How Spec-Driven Development in Kiro IDE Slashed My Dev Time by 44%
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A deep dive into building a full-featured Agile Planning app with zero WebSocket bugs.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;When I first used Kiro a few months ago, I was focused entirely on &lt;strong&gt;vibe coding&lt;/strong&gt;. It was fun, but chaotic. Now, after experimenting with &lt;strong&gt;spec-driven development (SDD)&lt;/strong&gt;, I'm completely blown away! I strongly suspect Kiro pioneered this structured approach, which was then adopted by other coding agents.&lt;/p&gt;

&lt;p&gt;This time, I built a full-featured Agile Planning application with real-time collaboration, GitHub integration, and a collaborative whiteboard. The result?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Complex features like authentication, WebSocket management, and drag-and-drop became &lt;strong&gt;surprisingly straightforward&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's exactly why the structured &lt;strong&gt;"Plan, Review, Execute"&lt;/strong&gt; model beats "vibe coding" every single time, backed by concrete numbers from the project.&lt;/p&gt;




&lt;h3&gt;
  
  
  🤯 The Two Worlds of Coding
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What is "Vibe Coding"?
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;You know the drill:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Open your editor.&lt;/li&gt;
&lt;li&gt; Start typing code.&lt;/li&gt;
&lt;li&gt; "I'll figure it out as I go."&lt;/li&gt;
&lt;li&gt; Realize you forgot crucial edge cases.&lt;/li&gt;
&lt;li&gt; Refactor everything (or leave it messy).&lt;/li&gt;
&lt;li&gt; Repeat.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It &lt;strong&gt;feels&lt;/strong&gt; productive, but it's chaos in disguise. It's building a skyscraper without a blueprint.&lt;/p&gt;

&lt;h4&gt;
  
  
  Enter: Spec-Driven Development (SDD)
&lt;/h4&gt;

&lt;p&gt;SDD follows a rigorous, structured approach built directly into the &lt;strong&gt;Kiro IDE&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Plan:&lt;/strong&gt; Write detailed requirements and acceptance criteria.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Review:&lt;/strong&gt; Create a comprehensive design document (architecture, data models, properties).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Execute:&lt;/strong&gt; Implement with clear tasks and continuous validation against the spec.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I used Kiro IDE, which has built-in support for this workflow, and the difference was &lt;strong&gt;night and day.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🎯 The Project: Agile Planning Tool
&lt;/h3&gt;

&lt;p&gt;I built a real-time collaborative planning poker application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/amarpreetbhatia/agile-planning-tool" rel="noopener noreferrer"&gt;View the Code: Agile Planning Tool on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Core Features Implemented&lt;/th&gt;
&lt;th&gt;Tech Stack&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Real-time&lt;/strong&gt; Planning Poker&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Next.js 14&lt;/strong&gt; (App Router)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;GitHub&lt;/strong&gt; OAuth Authentication&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;TypeScript&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;WebSocket&lt;/strong&gt; Collaboration&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;MongoDB&lt;/strong&gt; + Mongoose&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drag-and-drop Story Management&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Socket.IO&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Collaborative Whiteboard&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Playwright&lt;/strong&gt; (E2E Tests)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;External Tool Embedding (Miro, Figma)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Shadcn UI&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  💡 1. Why Spec-Driven Development Won: Complex Features Became Simple
&lt;/h3&gt;

&lt;p&gt;SDD forces you to think through the entire system &lt;em&gt;before&lt;/em&gt; writing the first line of code.&lt;/p&gt;

&lt;h4&gt;
  
  
  A. Authentication (GitHub OAuth)
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Vibe Coding&lt;/th&gt;
&lt;th&gt;Spec-Driven Development&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Approach:&lt;/strong&gt; "I'll just add GitHub login... wait, how do I handle tokens? What about session management? Encryption?"&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Approach:&lt;/strong&gt; The spec demands defining security up front.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Result:&lt;/strong&gt; 2 days of debugging and insecure token handling.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Implementation took &lt;strong&gt;2 hours&lt;/strong&gt; instead of 2 days of debugging.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Key Requirement: Authentication&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Acceptance Criteria:&lt;br&gt;
3. THE System &lt;strong&gt;SHALL&lt;/strong&gt; store &lt;strong&gt;encrypted&lt;/strong&gt; access tokens in the database.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  B. Real-Time Collaboration
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Vibe Coding&lt;/th&gt;
&lt;th&gt;Spec-Driven Development&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Approach:&lt;/strong&gt; "Let's add Socket.IO... oh wait, how do I handle disconnections? What about race conditions?"&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Approach:&lt;/strong&gt; The spec forces planning for high-availability.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Production bugs related to race conditions and dropped connections.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Result:&lt;/strong&gt; &lt;strong&gt;Zero production bugs&lt;/strong&gt; related to WebSocket management.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Key Requirement: Real-Time Updates&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Acceptance Criteria:&lt;br&gt;
3. WHEN connection drops, THE System &lt;strong&gt;SHALL&lt;/strong&gt; attempt reconnection with &lt;strong&gt;exponential backoff&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  C. Drag-and-Drop Story Management
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Vibe Coding&lt;/th&gt;
&lt;th&gt;Spec-Driven Development&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Approach:&lt;/strong&gt; "I'll use a library... which one? How do I persist order? What about conflicts?"&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Approach:&lt;/strong&gt; The spec explicitly defines conflict resolution.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Janky UX and data integrity issues upon concurrent edits.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Smooth drag-and-drop with &lt;strong&gt;zero conflicts&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Key Requirement: Story Backlog&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Acceptance Criteria:&lt;br&gt;
4. THE System &lt;strong&gt;SHALL&lt;/strong&gt; handle concurrent reordering conflicts gracefully.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  📊 2. The Numbers: A Quantitative Victory
&lt;/h3&gt;

&lt;p&gt;The biggest win was the dramatic reduction in debugging and refactoring time. &lt;strong&gt;Upfront planning saves time, period.&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Development Time Comparison
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Planning&lt;/th&gt;
&lt;th&gt;Coding&lt;/th&gt;
&lt;th&gt;Debugging&lt;/th&gt;
&lt;th&gt;Refactoring&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vibe Coding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0h&lt;/td&gt;
&lt;td&gt;40h&lt;/td&gt;
&lt;td&gt;30h&lt;/td&gt;
&lt;td&gt;20h&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;90h&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Spec-Driven&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;7h&lt;/td&gt;
&lt;td&gt;35h&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5h&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3h&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;50h&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time Saved&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;40 hours (44%)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Code Quality Metrics
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Vibe Coding (Hypothetical)&lt;/th&gt;
&lt;th&gt;Spec-Driven (Actual Project)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Production Bugs&lt;/td&gt;
&lt;td&gt;15+&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Major Refactors Needed&lt;/td&gt;
&lt;td&gt;5 major&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0 major&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test Coverage&lt;/td&gt;
&lt;td&gt;40%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;85%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Documentation&lt;/td&gt;
&lt;td&gt;Sparse and outdated&lt;/td&gt;
&lt;td&gt;Comprehensive (The Spec IS the documentation)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  ✍️ 3. Testing Became Natural
&lt;/h3&gt;

&lt;p&gt;Because every major feature had pre-written &lt;strong&gt;Acceptance Criteria&lt;/strong&gt; (AC), writing E2E tests was a mere translation process.&lt;/p&gt;

&lt;p&gt;An AC like: &lt;em&gt;“WHEN GitHub OAuth succeeds, THE System SHALL create a user session with GitHub profile data.”&lt;/em&gt; directly translates into a test block.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should complete full estimation workflow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Requirement 2.1: Create session&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;button:has-text("New Session")&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Requirement 6.3: Cast vote&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[data-testid="poker-card-5"]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Verify: Average calculated correctly&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[data-testid="average"]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toContainText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; 20+ E2E tests written with Playwright, providing high confidence and 100% passing smoke tests before deployment.&lt;/p&gt;




&lt;h3&gt;
  
  
  🛠️ Tools That Made It Possible
&lt;/h3&gt;

&lt;p&gt;The built-in SDD support in &lt;strong&gt;Kiro IDE&lt;/strong&gt; was the catalyst:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured Spec Creation:&lt;/strong&gt; Used pre-built templates for requirements and design documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Requirement Linking:&lt;/strong&gt; Ability to link code commits and tasks directly back to the specific requirement they fulfill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Integration:&lt;/strong&gt; Running tests directly from the spec view to validate acceptance criteria.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🛑 Common Objections Answered
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Objection&lt;/th&gt;
&lt;th&gt;Reality&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;"Specs take too long to write."&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;False:&lt;/strong&gt; 7 hours of planning saved 40+ hours of debugging and rework. That's a huge ROI.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;"Requirements change anyway."&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;False:&lt;/strong&gt; Specs make changes &lt;em&gt;easier&lt;/em&gt;. You know exactly which linked components need updating.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;"This only works for big projects."&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;False:&lt;/strong&gt; Even a quick, 30-minute spec for a small feature saves hours of rework and edge-case fixing.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  ✅ Final Thoughts
&lt;/h3&gt;

&lt;p&gt;After building this project, I can't imagine going back to "vibe coding" for anything serious. The structure, clarity, and confidence that spec-driven development provides is invaluable.&lt;/p&gt;

&lt;p&gt;Vibe coding &lt;strong&gt;feels fast&lt;/strong&gt; but is ultimately &lt;strong&gt;slow&lt;/strong&gt;.&lt;br&gt;
Spec-driven development &lt;strong&gt;feels slow&lt;/strong&gt; but is ultimately &lt;strong&gt;fast&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Bottom Line:&lt;/strong&gt; Give the "Plan, Review, Execute" model a try on your next project. Your future self will thank you for the robust architecture, reduced bug count, and the sheer predictability of development.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's your experience with structured development approaches? Have you tried spec-driven development? Let me know in the comments!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;#agile #typescript #testing #productivity #webdev #nextjs #react #mongodb #playwright #softwaredevelopment&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kiro</category>
      <category>refinehackathon</category>
      <category>vibecoding</category>
    </item>
    <item>
      <title>From Idea to Production: Building a Secure Image Crawler with Kiro's AI-Powered Development</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Fri, 29 Aug 2025 14:54:19 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/from-idea-to-production-building-a-secure-image-crawler-with-kiros-ai-powered-development-12lc</link>
      <guid>https://forem.com/amarpreetbhatia/from-idea-to-production-building-a-secure-image-crawler-with-kiros-ai-powered-development-12lc</guid>
      <description>&lt;p&gt;In Post, I like to share, &lt;br&gt;
How I leveraged Kiro's spec-driven approach, agent hooks, and intelligent steering to build a full-stack web crawler in record time&lt;/p&gt;

&lt;p&gt;Demo Link: &lt;a href="https://www.youtube.com/watch?v=LMU6n6xW2IQ" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=LMU6n6xW2IQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🎯 The Challenge: Building Beyond "Vibe Coding"&lt;br&gt;
We've all been there – starting a project with a vague idea, jumping straight into coding, and ending up with a tangled mess of half-implemented features. When I decided to build Image Collector, a secure web crawler for discovering and downloading website images, I knew I needed a different approach.&lt;/p&gt;

&lt;p&gt;Enter Kiro – an agentic AI IDE that transforms how we build software from prototype to production. Instead of "vibe coding" my way through another project, I embraced Kiro's structured, spec-driven development approach.&lt;/p&gt;

&lt;p&gt;🏗️ The Project: Image Collector&lt;br&gt;
Before diving into my Kiro experience, let me introduce what we built:&lt;/p&gt;

&lt;p&gt;Image Collector is a full-stack React application that ethically crawls websites to discover and display images in an interactive gallery. Think of it as a polite, intelligent web scraper that respects robots.txt, implements proper rate limiting, and provides secure bulk downloads.&lt;/p&gt;

&lt;p&gt;Key Features:&lt;br&gt;
🤖 Ethical Crawling: Respects robots.txt and nofollow directives&lt;br&gt;
🎨 Interactive Gallery: Responsive carousel and grid views with full-screen preview&lt;br&gt;
🔒 Secure Downloads: Background service worker with comprehensive security validation&lt;br&gt;
📱 Modern UI: Material-UI dark theme with responsive design&lt;br&gt;
⚡ Smart Discovery: Crawls main page plus one level of internal links (same domain only)&lt;br&gt;
Source Code: &lt;a href="https://github.com/amarpreetbhatia/imgcollector" rel="noopener noreferrer"&gt;https://github.com/amarpreetbhatia/imgcollector&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🎪 My Favorite Kiro Features: The Game Changers&lt;/p&gt;

&lt;p&gt;🎯 1. Steering - Project-Wide Intelligence&lt;br&gt;
Kiro's steering files set standards for code generation including technology stack, project structure, and naming conventions. Here's how I used it:&lt;/p&gt;

&lt;p&gt;Technology Stack Enforcement: Automatically ensured all components used TypeScript + Material-UI&lt;br&gt;
Security Standards: Embedded security-first principles into every code generation&lt;br&gt;
Architectural Consistency: Maintained clean separation between frontend/backend concerns&lt;/p&gt;

&lt;p&gt;🪝 2. Agent Hooks - Automation That Actually Works&lt;br&gt;
Hooks are user prompts triggered by file changes, enabling consistency and quality across development. My automated workflows:&lt;/p&gt;

&lt;p&gt;Test Generation: Auto-created comprehensive test suites when saving React components&lt;br&gt;
Documentation Updates: Automatically updated README and inline docs on architecture changes&lt;br&gt;
Security Audits: Triggered security validation checks on service worker modifications&lt;/p&gt;

&lt;p&gt;📋 3. Specs - From Chaos to Clarity&lt;br&gt;
Kiro's structured specifications break down complex features into detailed implementation plans. This transformed my development:&lt;/p&gt;

&lt;p&gt;Feature Breakdown: Complex crawling logic became manageable, tracked tasks&lt;br&gt;
Progress Tracking: Real-time visibility into implementation progress&lt;br&gt;
Quality Assurance: Built-in validation and testing requirements for each component&lt;br&gt;
💬 Structuring Conversations with Kiro: The Art of AI Collaboration&lt;br&gt;
The Initial Architecture Discussion&lt;br&gt;
Instead of diving straight into code, I started with high-level architectural conversations:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Me: "I want to build a web crawler that can extract images from websites. &lt;br&gt;
It needs to be ethical, secure, and have a modern UI. Can you help me &lt;br&gt;
structure this as a full-stack application?"&lt;br&gt;
Kiro: &lt;em&gt;Generated comprehensive spec covering&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client-server architecture to bypass CORS&lt;/li&gt;
&lt;li&gt;Security considerations for web crawling&lt;/li&gt;
&lt;li&gt;Progressive web app structure&lt;/li&gt;
&lt;li&gt;Service worker architecture for downloads&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Most Impressive Code Generation&lt;br&gt;
The Service Worker Security System was where Kiro truly shined. I described my security requirements in natural language:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Me: "I need a download system that can handle multiple images securely, &lt;br&gt;
with file size limits, MIME type validation, and progress tracking. &lt;br&gt;
It should work in the background without blocking the UI."&lt;br&gt;
Kiro: &lt;em&gt;Generated a complete 300+ line service worker with&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Semaphore-based concurrency control&lt;/li&gt;
&lt;li&gt;Multi-layer security validation &lt;/li&gt;
&lt;li&gt;Progress callback system&lt;/li&gt;
&lt;li&gt;Automatic resource cleanup&lt;/li&gt;
&lt;li&gt;Error handling and recovery&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;The generated code included sophisticated patterns I hadn't even thought of, like the semaphore implementation for download concurrency:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;javascript
class Semaphore {
  constructor(maxConcurrency) {
    this.maxConcurrency = maxConcurrency;
    this.currentConcurrency = 0;
    this.queue = [];
  }

  async acquire(task) {
    // Intelligent queuing and execution logic
    // Auto-releases on completion
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conversational Debugging Sessions&lt;br&gt;
When I encountered CORS issues during development, our conversation looked like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Me: "The frontend can't directly access external websites due to CORS. &lt;br&gt;
How should I restructure this?"&lt;br&gt;
Kiro: &lt;em&gt;Immediately suggested&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Move crawling logic to Express backend&lt;/li&gt;
&lt;li&gt;Use Cheerio for HTML parsing&lt;/li&gt;
&lt;li&gt;Implement proper error boundaries&lt;/li&gt;
&lt;li&gt;Add request timeout and retry logic&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;🪝 Agent Hooks: Automating My Development Workflow&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Automated Test Generation Hook
Created a hook that triggers whenever I save a React component:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;yaml&lt;/p&gt;

&lt;h2&gt;
  
  
  .kiro/hooks/test-generator.md
&lt;/h2&gt;

&lt;p&gt;trigger: file_change&lt;br&gt;
pattern: "src/components/*.tsx"&lt;br&gt;
prompt: |&lt;br&gt;
  Generate comprehensive tests for this component including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unit tests for all props and states&lt;/li&gt;
&lt;li&gt;Integration tests for user interactions
&lt;/li&gt;
&lt;li&gt;Error boundary testing&lt;/li&gt;
&lt;li&gt;Accessibility testing with React Testing Library
Impact: Went from manually writing tests (often skipping them under time pressure) to having comprehensive test coverage automatically generated. My test coverage jumped from ~30% to 85%+.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Security Audit Hook
Triggers on changes to security-critical files:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;yaml&lt;/p&gt;

&lt;h2&gt;
  
  
  .kiro/hooks/security-audit.md
&lt;/h2&gt;

&lt;p&gt;trigger: file_change&lt;br&gt;&lt;br&gt;
pattern: "public/download-worker.js|src/utils/securityConfig.ts"&lt;br&gt;
prompt: |&lt;br&gt;
  Review this file for security vulnerabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input validation gaps&lt;/li&gt;
&lt;li&gt;Injection attack vectors&lt;/li&gt;
&lt;li&gt;Resource exhaustion risks&lt;/li&gt;
&lt;li&gt;Data sanitization issues
Create issues for any problems found.
Impact: Caught potential security issues before they made it to production. Identified and fixed a resource exhaustion vulnerability in the download system.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Documentation Sync Hook
Keeps documentation fresh with code changes:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;yaml&lt;/p&gt;

&lt;h2&gt;
  
  
  .kiro/hooks/doc-sync.md
&lt;/h2&gt;

&lt;p&gt;trigger: file_change&lt;br&gt;
pattern: "src/&lt;strong&gt;/*.ts|src/&lt;/strong&gt;/&lt;em&gt;.tsx|server/&lt;/em&gt;&lt;em&gt;/&lt;/em&gt;.js"&lt;br&gt;&lt;br&gt;
prompt: |&lt;br&gt;
  Update relevant documentation for these code changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update README if architecture changed&lt;/li&gt;
&lt;li&gt;Update inline comments for complex functions&lt;/li&gt;
&lt;li&gt;Update type definitions documentation
Maintain consistent markdown formatting.
Impact: Documentation stayed synchronized without manual effort. The comprehensive README you see was largely maintained through this hook.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📋 Spec-Driven Development: My Secret Weapon&lt;br&gt;
Structuring the Master Spec&lt;br&gt;
Instead of building features ad-hoc, I created a comprehensive spec that became my north star:&lt;/p&gt;

&lt;p&gt;🚀 Development Workflow: The Kiro Advantage&lt;br&gt;
Traditional Development vs. Kiro-Powered Development&lt;br&gt;
Traditional Workflow:&lt;/p&gt;

&lt;p&gt;Idea → Code → Debug → Refactor → Test → Deploy&lt;br&gt;
Kiro-Powered Workflow:&lt;/p&gt;

&lt;p&gt;Idea → Spec → Generate → Validate → Hook-Automation → Deploy&lt;br&gt;
The Numbers Don't Lie&lt;/p&gt;

&lt;p&gt;Application uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;E-commerce Crawlers: Product image collection and analysis&lt;/li&gt;
&lt;li&gt;Content Management: Automated image optimization and metadata extraction&lt;/li&gt;
&lt;li&gt;SEO Analysis: Website visual content auditing&lt;/li&gt;
&lt;li&gt;Design Research: Competitor visual analysis tools&lt;/li&gt;
&lt;li&gt;AI Agent: Can connect the images to AI workflow to generate something new.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out the project: GitHub - Image Collector &lt;br&gt;
&lt;a href="https://github.com/amarpreetbhatia/imgcollector" rel="noopener noreferrer"&gt;https://github.com/amarpreetbhatia/imgcollector&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built with ❤️ using @kirodotdev spec-driven development. All code is open source and production-ready.&lt;/p&gt;

&lt;p&gt;Tags: #AI #WebDevelopment #React #NodeJS #Security #Automation #Kiro #FullStack #WebCrawling #hookedonkiro&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kiro</category>
      <category>vibecoding</category>
      <category>actionshackathon</category>
    </item>
    <item>
      <title>Built a Sudoku Game Using Amazon Q CLI on WSL Ubuntu – Try It Out!</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Fri, 30 May 2025 15:10:10 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/built-a-sudoku-game-using-amazon-q-cli-on-wsl-ubuntu-try-it-out-1hph</link>
      <guid>https://forem.com/amarpreetbhatia/built-a-sudoku-game-using-amazon-q-cli-on-wsl-ubuntu-try-it-out-1hph</guid>
      <description>&lt;p&gt;I'm thrilled to share my experience building a browser-based &lt;strong&gt;Sudoku puzzle game&lt;/strong&gt; using the new &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/codeq/latest/cli/what-is-q-cli.html" rel="noopener noreferrer"&gt;Amazon Q CLI&lt;/a&gt;&lt;/strong&gt; – a powerful generative AI toolchain for developers. And yes, I did this using &lt;strong&gt;Windows WSL -d Ubuntu&lt;/strong&gt; – making the process not only seamless but fun.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4hjly82y8sfg2cdr3y9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4hjly82y8sfg2cdr3y9.png" alt="Image description" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy15ahz0efyy12x6szas2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy15ahz0efyy12x6szas2.png" alt="Image description" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out the live game here:&lt;br&gt;&lt;br&gt;
🎮 &lt;a href="https://amarpreetbhatia.github.io/sudoku-q/" rel="noopener noreferrer"&gt;&lt;strong&gt;Play Sudoku-Q now&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub Repo:&lt;br&gt;&lt;br&gt;
🔗 &lt;a href="https://github.com/amarpreetbhatia/sudoku-q" rel="noopener noreferrer"&gt;https://github.com/amarpreetbhatia/sudoku-q&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Why Amazon Q CLI Blew My Mind (5 Cool Features)
&lt;/h2&gt;

&lt;p&gt;As a seasoned developer, I’ve used many AI tools, but &lt;strong&gt;Amazon Q CLI&lt;/strong&gt; truly stands out. Here are my top 5 features that made development a joy:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. 🔄 Natural Language to Code Conversion
&lt;/h3&gt;

&lt;p&gt;Just describe what you need and Q translates it into production-ready code. This enabled me to scaffold game logic, UI components, and helper functions effortlessly.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. 📂 Project-Aware Suggestions
&lt;/h3&gt;

&lt;p&gt;Q understands your entire project context. Whether I was building a new React component or updating game state logic, it gave context-relevant suggestions that actually made sense.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. ⚙️ Quick Iteration with Commands Like &lt;code&gt;q dev&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;q dev&lt;/code&gt; mode let me experiment, iterate, and refine features quickly. The feedback loop was insanely fast — write prompt, review code, test in browser, repeat.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. 🧪 Testing Integration Made Easy
&lt;/h3&gt;

&lt;p&gt;Even test generation was simplified. Q CLI helped me generate logic tests for validating Sudoku rules with just a couple of lines in my prompt.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. 📝 Prompt Management = Superpower
&lt;/h3&gt;

&lt;p&gt;You can save, reuse, and version your prompts! Check out the actual prompts I used here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/amarpreetbhatia/sudoku-q/tree/master/prompts" rel="noopener noreferrer"&gt;View Prompts Folder&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🕹️ About Sudoku-Q – The Game I Built
&lt;/h2&gt;

&lt;p&gt;Sudoku-Q is a simple browser-based Sudoku game built using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React&lt;/strong&gt; + &lt;strong&gt;TailwindCSS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Light sound effects for engagement&lt;/li&gt;
&lt;li&gt;JSON-based puzzle generation&lt;/li&gt;
&lt;li&gt;Deployed via &lt;strong&gt;GitHub Pages&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I focused on making the game accessible and responsive for players aged 7 and up.&lt;/p&gt;

&lt;p&gt;Want to give it a try?&lt;br&gt;&lt;br&gt;
✅ &lt;a href="https://amarpreetbhatia.github.io/sudoku-q/" rel="noopener noreferrer"&gt;&lt;strong&gt;Play it now!&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤖 Prompts That Powered the Game
&lt;/h2&gt;

&lt;p&gt;I designed the game iteratively using prompts like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;"Create a 9x9 Sudoku board component in React"&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;"Add validation logic to check for correct Sudoku rows and columns"&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;"Style the board using TailwindCSS with hover effects"&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;"Add sound on cell entry"&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of them are available for review and inspiration here:&lt;br&gt;&lt;br&gt;
📁 &lt;a href="https://github.com/amarpreetbhatia/sudoku-q/tree/master/prompts" rel="noopener noreferrer"&gt;Prompts Folder on GitHub&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔚 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Using &lt;strong&gt;Amazon Q CLI&lt;/strong&gt; was like pair programming with an expert who never gets tired. Whether you're building games, apps, or utilities — this tool can seriously boost your productivity and creativity.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Try my game&lt;/strong&gt;: &lt;a href="https://amarpreetbhatia.github.io/sudoku-q/" rel="noopener noreferrer"&gt;https://amarpreetbhatia.github.io/sudoku-q/&lt;/a&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;Explore the code&lt;/strong&gt;: &lt;a href="https://github.com/amarpreetbhatia/sudoku-q" rel="noopener noreferrer"&gt;https://github.com/amarpreetbhatia/sudoku-q&lt;/a&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;Join the contest&lt;/strong&gt;: &lt;a href="https://community.aws/content/2xIoduO0xhkhUApQpVUIqBFGmAc/build-games-with-amazon-q-cli-and-score-a-t-shirt?lang=en" rel="noopener noreferrer"&gt;#BuildWithAmazonQ&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  AmazonQCLI
&lt;/h1&gt;

</description>
      <category>buildwithamazonq</category>
      <category>promptengineering</category>
      <category>amazonqcli</category>
      <category>aws</category>
    </item>
    <item>
      <title>Exploring the Boundless Possibilities of AWS PartyRock: A Journey into Generative AI</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Mon, 11 Mar 2024 10:05:26 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/exploring-the-boundless-possibilities-of-aws-partyrock-a-journey-into-generative-ai-3bkb</link>
      <guid>https://forem.com/amarpreetbhatia/exploring-the-boundless-possibilities-of-aws-partyrock-a-journey-into-generative-ai-3bkb</guid>
      <description>&lt;p&gt;Are you ready to dive into the exhilarating realm of generative AI without the hassle of complex coding? &lt;br&gt;
Look no further than AWS PartyRock – the ultimate playground for AI enthusiasts and budding developers alike. &lt;br&gt;
In this blog post, I'm thrilled to share my firsthand experience with platform that uses AWS Bedrock service and how it's revolutionizing the way we approach AI experimentation.&lt;/p&gt;

&lt;p&gt;Check the running demo&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/watch?si=xj3RnYpCV8Aw3vPE&amp;amp;v=-EBIVaOYhcs&amp;amp;feature=youtu.be" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--nlh00A5X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.ytimg.com/vi/-EBIVaOYhcs/maxresdefault.jpg" height="450" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/watch?si=xj3RnYpCV8Aw3vPE&amp;amp;v=-EBIVaOYhcs&amp;amp;feature=youtu.be" rel="noopener noreferrer" class="c-link"&gt;
          AI Email Replies by Empathy Engine - YouTube
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          "The Empathy Engine" can understand Email Intent &amp;amp; Craft Perfect RepliesWrite Right: AI-Powered Email Response GeneratorNever Say the Wrong Thing Again: Smar...
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--zXCfGI7T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.youtube.com/s/desktop/29d8088d/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;And try your self at:&lt;br&gt;
&lt;a href="https://partyrock.aws/u/musiclistener/au7BqKR_B/The-Empathy-Engine"&gt;The Empathy Engine&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unleashing Creativity with AWS PartyRock&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS PartyRock provides an intuitive interface that empowers users to unleash their creativity and bring their boldest AI ideas to life and discovering the &lt;strong&gt;Magic of Prompt Engineering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the core of PartyRock's brilliance lies the concept of prompt engineering – a technique that allows users to craft clear and concise instructions to guide AI models towards desired outcomes. With just a few clicks, users can harness the full potential of generative AI, exploring its capabilities and pushing the boundaries of what's possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Journey with AWS PartyRock&lt;/strong&gt;: A Testimonial&lt;/p&gt;

&lt;p&gt;As someone with a passion for AI and a desire to learn, my journey of playing with Foundational Models available in Bedrock has been nothing short of extraordinary. From experimenting with various prompts to witnessing the remarkable transformations brought to life by the AI models, every moment has been an adventure filled with discovery and excitement.&lt;/p&gt;

&lt;p&gt;This cutting-edge technology provides users with a solid foundation to build upon, enabling them to create innovative and experimental AI applications with ease. Whether you're a seasoned developer or a curious newcomer, AWS Partyrock's simplifies the learning process and empowers you to unleash your creativity without constraints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embark on Your AI Journey Today&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ready to embark on your own AI journey? Visit &lt;a href="https://partyrock.aws/"&gt;https://partyrock.aws/&lt;/a&gt; to dive into the world of AWS PartyRock and discover the endless possibilities that await. With its user-friendly interface, powerful Bedrock integration, and thriving community, PartyRock is the perfect platform to unleash your creativity and explore the cutting-edge frontier of generative AI. Let's rock the party and redefine the future of AI together!&lt;/p&gt;

</description>
      <category>partyrockhackathon</category>
      <category>awsbedrock</category>
      <category>aws</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Step-by-Step Guide to Migrating from Java 8 to Java 17 (or Later): Tips, Checklist and Best Practices</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Thu, 12 Jan 2023 04:55:16 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/step-by-step-guide-to-migrating-from-java-8-to-java-17-or-later-tips-checklist-and-best-practices-4g9m</link>
      <guid>https://forem.com/amarpreetbhatia/step-by-step-guide-to-migrating-from-java-8-to-java-17-or-later-tips-checklist-and-best-practices-4g9m</guid>
      <description>&lt;p&gt;This blog post topic would be of interest to software developers, system administrators, and technical managers who work with Java-based applications and need to migrate to a later version of the language.&lt;/p&gt;

&lt;p&gt;A detailed migration plan will depend on the specific circumstances of your application and the scale of the migration. However, here's a general outline of the steps that a detailed migration plan might include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preparation&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify the current Java version and the target version.&lt;/li&gt;
&lt;li&gt;Review the changes and new features in the target version of Java.&lt;/li&gt;
&lt;li&gt;Assess the impact on the application and identify any potential issues.&lt;/li&gt;
&lt;li&gt;Identify any third-party libraries or frameworks used by the application and check for compatibility with the target Java version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code changes&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make any necessary code changes to ensure compatibility with the target Java version.&lt;/li&gt;
&lt;li&gt;Remove deprecated or removed features.&lt;/li&gt;
&lt;li&gt;Implement new features in the target version.&lt;/li&gt;
&lt;li&gt;Refactor or rewrite the code to improve performance and maintainability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a test plan for the migration.&lt;/li&gt;
&lt;li&gt;Write automated tests for the application.&lt;/li&gt;
&lt;li&gt;Test the application thoroughly to ensure that it continues to function correctly after the migration.&lt;/li&gt;
&lt;li&gt;Run automated and manual tests to check for compatibility and functionality.&lt;/li&gt;
&lt;li&gt;Conduct load testing to ensure that the application can handle the expected workload.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Deployment&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update build and deployment scripts to use the target Java version.&lt;/li&gt;
&lt;li&gt;Update documentation to reflect the new Java version.&lt;/li&gt;
&lt;li&gt;Update any configuration files to reflect the new Java version.&lt;/li&gt;
&lt;li&gt;Create a backup of the application and its data before deploying the updated version.&lt;/li&gt;
&lt;li&gt;Deploy the updated application to a test environment and verify the behavior of the application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Production deployment&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Perform the migration in a production environment.&lt;/li&gt;
&lt;li&gt;Monitor the application for any issues and troubleshoot if necessary.&lt;/li&gt;
&lt;li&gt;Roll back to the previous version if there are any major issues in the migration.&lt;/li&gt;
&lt;li&gt;Test the application in production environment&lt;/li&gt;
&lt;li&gt;Test the application for performance and scalability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Post Migration&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retire any old version and related resources&lt;/li&gt;
&lt;li&gt;Re-evaluate the impact and adjust your plan accordingly&lt;/li&gt;
&lt;li&gt;Document all changes and new features&lt;/li&gt;
&lt;li&gt;Keep monitoring the system for few days/week&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: This list is very high level thoughts, and additional steps may be required depending on the specific circumstances of the migration. It is a good practice to have a detailed plan, testing and back-up before migrating in production environment.&lt;/p&gt;

&lt;p&gt;Additionally, Would be glad to hear from you can also, how your organization did the migration, what challenges faced and how it was solved.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Using Kubernetes ConfigMaps with Java: Best Practices and Examples</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Wed, 11 Jan 2023 08:44:55 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/using-kubernetes-configmaps-with-java-best-practices-and-examples-3831</link>
      <guid>https://forem.com/amarpreetbhatia/using-kubernetes-configmaps-with-java-best-practices-and-examples-3831</guid>
      <description>&lt;p&gt;In Kubernetes, a &lt;code&gt;configMap&lt;/code&gt; is a way to store configuration data as key-value pairs. The data stored in a &lt;code&gt;configMap&lt;/code&gt; can be used to configure pods and other objects in a Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;A configMap can be created and managed using the Kubernetes API, &lt;code&gt;kubectl&lt;/code&gt; command-line tool, or declaratively in a yaml file. Once a &lt;code&gt;configMap&lt;/code&gt; is created, it can be referenced by pods and other objects in a Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;Some common use cases for configMap are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storing configuration files, such as application properties files, that need to be shared across multiple pods or containers.&lt;/li&gt;
&lt;li&gt;Storing environment variables that need to be passed to a container running in a pod.&lt;/li&gt;
&lt;li&gt;Storing initialization scripts or command-line arguments that need to be passed to a container at runtime.&lt;/li&gt;
&lt;li&gt;In addition to being referenced by pods, configMap can also be consumed by other resources such as &lt;code&gt;Deployment&lt;/code&gt;, &lt;code&gt;StatefulSet&lt;/code&gt; using the &lt;code&gt;envFrom&lt;/code&gt; field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is worth noting that configMap is great for storing non-sensitive data like configuration properties, environment variables, and other metadata. When dealing with sensitive data like passwords and secret keys, it's recommended to use Secret instead.&lt;/p&gt;

&lt;p&gt;In this article will try to consume &lt;code&gt;configMap&lt;/code&gt; by Java code. This solution assumes the &lt;code&gt;configMap&lt;/code&gt; is present and valid in the system and our code will use the Kubernetes Java client library.&lt;/p&gt;

&lt;p&gt;To set up the Kubernetes Java client library in your Java project, you can use a build tool such as Maven or Gradle.&lt;/p&gt;

&lt;p&gt;Here's an example of how to set it up with Maven:&lt;/p&gt;

&lt;p&gt;Add the following dependency to your pom.xml file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;io.kubernetes&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;client-java&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;12.2.2&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will include the Kubernetes Java client library and its dependencies in your project.&lt;/p&gt;

&lt;p&gt;Below sample Java program to read a configMap from a Kubernetes cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class ConfigMapReader {
    public static void main(String[] args) {
        try {
            // Set up the Kubernetes API client
            ApiClient client = Configuration.getDefaultApiClient();
            // Configure the client to use the Kubernetes service account
            client.setAuth("BearerToken", "YOUR_BEARER_TOKEN");
            // Create a CoreV1Api object
            CoreV1Api api = new CoreV1Api(client);
            // Specify the name of the configMap and namespace
            String configMapName = "example-configmap";
            String namespace = "default";
            // Read the configMap from the Kubernetes API
            V1ConfigMap configMap = api.readNamespacedConfigMap(configMapName, namespace, null, null, null);
            // Print the configMap data
            System.out.println(configMap.getData());
        } catch (ApiException e) {
            System.err.println("ApiException: " + e.getResponseBody());
        } catch (Exception e) {
            System.err.println("Exception: " + e.getMessage());
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example uses the Kubernetes Java client library to interact with the Kubernetes API. It requires to set up the Kubernetes API client, and configure the client to use a bearer token. It then creates a &lt;code&gt;CoreV1Api&lt;/code&gt; object and uses it to read a &lt;code&gt;configMap&lt;/code&gt;. The &lt;code&gt;readNamespacedConfigMap&lt;/code&gt; method takes several arguments, including the name of the &lt;code&gt;configMap&lt;/code&gt; and the &lt;code&gt;namespace&lt;/code&gt; it belongs to, and returns a &lt;code&gt;V1ConfigMap&lt;/code&gt; object, containing the data of the &lt;code&gt;configMap&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is a simple example that only demonstrate the basic mechanism to read a &lt;code&gt;configmap&lt;/code&gt;. In a real-world application, you will probably want to handle potential exceptions, make sure that the client is configured correctly, and handle cases where the &lt;code&gt;configMap&lt;/code&gt; is not found or the API call fails.&lt;/p&gt;

&lt;p&gt;Additionally, to read the values from the &lt;code&gt;configMap&lt;/code&gt;, you can use &lt;code&gt;configMap.getData().get("KEY_NAME")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It is also good to note that you should follow the best practices for handling authentication and authorization for your use-case.&lt;/p&gt;

&lt;p&gt;More details of Kubernetes Client library can be found:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/reference/using-api/client-libraries/" rel="noopener noreferrer"&gt;client-libraries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kubernetes-client/java" rel="noopener noreferrer"&gt;Java-Kubernetes-client&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any further questions or thoughts on this topic, please don't hesitate to reach out in the comments section.&lt;br&gt;
Thank you for reading!&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Getting Started with the AWS SDK for Java and Lambda</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Mon, 09 Jan 2023 03:37:18 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/getting-started-with-the-aws-sdk-for-java-and-lambda-40on</link>
      <guid>https://forem.com/amarpreetbhatia/getting-started-with-the-aws-sdk-for-java-and-lambda-40on</guid>
      <description>&lt;p&gt;Are you a Java developer looking to use AWS Lambda in your projects? While JavaScript is the most common language used for writing Lambda functions, it is also possible to use Java to create and invoke these serverless functions. In this article, I will provide a step-by-step guide for setting up Java and Maven to use the AWS SDK for Lambda. By the end of this tutorial, you will have a solid understanding of how to use Java to work with AWS Lambda and incorporate serverless computing into your Java-based projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To set up Java and Maven to use the AWS SDK for Lambda, you will need to&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the Java Development Kit (JDK) if you do not already have it installed. You can download the JDK from the Oracle website: &lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;JAVA SDK&lt;/a&gt;
Try to use LTS version i.e. JDK 17 in latest, but ideally any JAVA SDK after 1.8+ is ok to run this sample.&lt;/li&gt;
&lt;li&gt;Install Maven if you do not already have it installed. You can find instructions for installing Maven on the Apache Maven website: &lt;a href="https://maven.apache.org/install.html" rel="noopener noreferrer"&gt;Maven&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Once you have installed JDK and Maven, create a new Maven project in your preferred development environment.
Add the AWS SDK for Java as a dependency in your Maven project by including the following code in your pom.xml file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.amazonaws&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;aws-java-sdk&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.11.871&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is an example of a simple Java program that you can run on AWS Lambda&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;

public class HelloWorld implements RequestHandler&amp;lt;Object, String&amp;gt; {
    public String handleRequest(Object input, Context context) {
        return "Hello, World!";
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This program implements the RequestHandler interface, which is the main interface that you need to implement to create a function that can be invoked by AWS Lambda. The handleRequest method is the function handler, which takes an input object and a context object as arguments and returns a string.&lt;/p&gt;

&lt;p&gt;To run this program on AWS Lambda, you would need to package it into a .zip file along with any dependencies and upload it to AWS Lambda using the steps described in my previous message. The fully qualified name of the class containing the function handler method would be HelloWorld.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To set up a Java program for AWS Lambda, follow these steps&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new AWS Lambda function in the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Choose "Java" as the runtime for your function.&lt;/li&gt;
&lt;li&gt;Under "Function code," choose "Upload a .zip file" as the code entry type and upload your .zip file containing your Java code and any dependencies.&lt;/li&gt;
&lt;li&gt;In the "Handler" field, specify the fully qualified name of the class that contains the function handler method. The function handler is the method that will be invoked when your Lambda function is called.&lt;/li&gt;
&lt;li&gt;Configure the function's execution role and any other desired settings, such as the function's memory and timeout settings.&lt;/li&gt;
&lt;li&gt;Save your function and test it using the "Test" button in the AWS Management Console.
That's it! Your Java program should now be set up and ready to run on AWS Lambda. You can invoke your function using the AWS Management Console, the AWS CLI, or by making an API call.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, Here is a sample Java program that demonstrates to invoke an AWS Lambda function:&lt;br&gt;
But, first we need to &lt;strong&gt;&lt;em&gt;get an access Token&lt;/em&gt;&lt;/strong&gt;, To set the access token in your Java code when invoking an AWS Lambda function, you will need to do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Obtain an access token from AWS Identity and Access Management (IAM). You can use the GetAccessToken API to request an access token for a specific IAM user or role.&lt;/li&gt;
&lt;li&gt;Set the access token in your Java code by including it in the InvokeRequest object that you use to invoke your Lambda function. You can set the access token by calling the withAccessToken method of the InvokeRequest object and passing in the access token as a string.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import com.amazonaws.services.lambda.AWSLambda;
import com.amazonaws.services.lambda.AWSLambdaClientBuilder;
import com.amazonaws.services.lambda.model.InvokeRequest;
import com.amazonaws.services.lambda.model.InvokeResult;

public class LambdaInvoker {
    public static void main(String[] args) {
        // Create a client for interacting with AWS Lambda
        AWSLambda lambdaClient = AWSLambdaClientBuilder.defaultClient();

        // Set the name of the Lambda function to invoke
        String functionName = "myFunction";

        // Set the input for the Lambda function
        String input = "{\"key\":\"value\"}";

        // Set the access token for the InvokeRequest
        String accessToken = "ACCESS_TOKEN_HERE";

        // Create an InvokeRequest object
        InvokeRequest invokeRequest = new InvokeRequest()
                .withFunctionName(functionName)
                .withPayload(input)
                .withAccessToken(accessToken);

        // Invoke the Lambda function and get the response
        InvokeResult invokeResult = lambdaClient.invoke(invokeRequest);

        // Print the response
        System.out.println(new String(invokeResult.getPayload().array()));
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This program will invoke the AWS Lambda function named myFunction, passing it the JSON input {"key":"value"}. It will then print the response returned by the function.&lt;/p&gt;

&lt;p&gt;In the End one can say, why not to use AWS API Gateway for Integrating to call the Lambda function, which is very valid and depends on the use case of the project you are working on.&lt;/p&gt;

&lt;p&gt;There are &lt;strong&gt;&lt;em&gt;broadly three invocation models&lt;/em&gt;&lt;/strong&gt; and the example above comes under "Synchronous invocation", other two are Asynchronous invocation and Polling invocation. More details can be read from &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html" rel="noopener noreferrer"&gt;Lambda invocation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this helps! If you have any thoughts or questions about using Java with AWS Services, please don't hesitate to reach out in the comments below. I would love to hear from like minded people and gain more knowledge.&lt;/p&gt;

</description>
      <category>community</category>
      <category>gratitude</category>
      <category>foremfest</category>
    </item>
    <item>
      <title>AWS Lambda Cost Optimization: Tips and Tricks for Reducing Your Serverless Costs</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Sun, 08 Jan 2023 11:55:08 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/aws-lambda-cost-optimization-tips-and-tricks-for-reducing-your-serverless-costs-133a</link>
      <guid>https://forem.com/amarpreetbhatia/aws-lambda-cost-optimization-tips-and-tricks-for-reducing-your-serverless-costs-133a</guid>
      <description>&lt;p&gt;There are several ways to optimise costs with AWS Lambda:&lt;/p&gt;

&lt;p&gt;Use the AWS Lambda pricing calculator to estimate the cost of your function. This can help you understand the cost implications of your configuration choices.&lt;br&gt;
AWS estimation calculator is a great tool for &lt;a href="https://calculator.aws/" rel="noopener noreferrer"&gt;calculator.aws&lt;/a&gt; for cost projections&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Choose the right balance of memory and CPU capacity for your functions. AWS Lambda charges you for the number of requests and the duration of each request. By increasing the amount of memory you allocate to your function, you can increase its CPU capacity and possibly reduce the duration of each request. This can result in lower costs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To increase the memory allocated to your AWS Lambda function, follow these steps&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign in to the AWS Management Console and navigate to the AWS Lambda page.&lt;/li&gt;
&lt;li&gt;Find the function you want to modify, and click on its name to go to the function’s configuration page.&lt;/li&gt;
&lt;li&gt;On the configuration page, click the “Configuration” tab.&lt;/li&gt;
&lt;li&gt;Scroll down to the “Memory (MB)” field and use the slider or enter a value to increase the amount of memory allocated to your function.&lt;/li&gt;
&lt;li&gt;Click the “Save” button at the top of the page to save your changes&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Use AWS Lambda reserved capacity. You can purchase a reservation for a specific number of capacity units for a 1 or 3 year term, which can significantly reduce your Lambda costs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To reserve capacity for your AWS Lambda functions, follow these steps&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign in to the AWS Management Console and navigate to the AWS Lambda page.&lt;/li&gt;
&lt;li&gt;Click the “Reserved capacity” tab.&lt;/li&gt;
&lt;li&gt;Click the “Purchase reserved capacity” button.&lt;/li&gt;
&lt;li&gt;Select the number of capacity units you want to purchase and the term (1 or 3 years) for your reservation.&lt;/li&gt;
&lt;li&gt;Select the functions you want to apply the reserved capacity to, or create a new function.&lt;/li&gt;
&lt;li&gt;Review your reservation details and click “Continue to review.”&lt;/li&gt;
&lt;li&gt;Review the reservation details and click “Create reservation.”&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Use versioning and aliases to ensure that you have control over which version of your function is being used. This allows you to test new versions of your function before routing all traffic to it, which can help you avoid unexpected increases in cost.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use AWS CloudWatch to monitor the performance of your functions and identify any cost drivers. This can help you identify opportunities to optimise your functions and reduce your costs.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To view AWS CloudWatch logs for your AWS Lambda functions, follow these steps&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign in to the AWS Management Console and navigate to the AWS CloudWatch page.&lt;/li&gt;
&lt;li&gt;In the left-hand navigation menu, click “Logs.”&lt;/li&gt;
&lt;li&gt;In the “Log Groups” section, click the log group for your Lambda function. The log group will have the same name as your function.&lt;/li&gt;
&lt;li&gt;Select the time range you want to view logs for, and click the “Go” button.&lt;/li&gt;
&lt;li&gt;You will see a list of all log streams for your function, grouped by function version or alias. Click on a log stream to view its logs.&lt;/li&gt;
&lt;li&gt;You can use the search box and filter options to find specific log events within the log stream.&lt;/li&gt;
&lt;li&gt;You can also use CloudWatch to set up alarms and notifications based on specific log events, or to visualise your logs data using CloudWatch dashboards.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Consider using other, more cost-effective services in combination with AWS Lambda. For example, you might use Amazon S3 for long-term storage or Amazon EC2 for workloads that are better suited to a traditional server architecture.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you have a large number of functions that are not used frequently, consider using the AWS Lambda function auto-scaling feature to scale your functions in and out based on actual usage. This can help you save money by only paying for the capacity you need.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I hope these tips help!&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>programming</category>
      <category>hardware</category>
    </item>
    <item>
      <title>Kubernetes for Java Developers: A Step-by-Step Guide to Containerizing Your Applications</title>
      <dc:creator>amarpreetbhatia</dc:creator>
      <pubDate>Fri, 06 Jan 2023 10:36:28 +0000</pubDate>
      <link>https://forem.com/amarpreetbhatia/kubernetes-for-java-developers-a-step-by-step-guide-to-containerizing-your-applications-2hko</link>
      <guid>https://forem.com/amarpreetbhatia/kubernetes-for-java-developers-a-step-by-step-guide-to-containerizing-your-applications-2hko</guid>
      <description>&lt;p&gt;Kubernetes is an open-source container orchestration system that can be used to automate the deployment, scaling, and management of containerized applications. There are several benefits that a Java developer might realise by using Kubernetes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Improved resource utilisation&lt;/strong&gt;: As mentioned previously, Kubernetes can improve resource utilisation by allowing you to more efficiently pack containers onto hosts. This can lead to cost savings and improved performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Greater flexibility&lt;/strong&gt;: Kubernetes allows you to easily deploy and manage Java applications across a cluster of hosts, which can be more flexible than managing a fleet of virtual machines.
Better scalability: Kubernetes makes it easy to scale Java applications up or down by adding or removing containers from the cluster. This can be more efficient and faster than scaling virtual machines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced reliability&lt;/strong&gt;: Kubernetes can automatically detect and replace failed containers, and it can also perform rolling updates to ensure that applications remain available during updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified management&lt;/strong&gt;: Kubernetes provides a unified interface for managing containerized applications, which can simplify the process of deploying and managing Java applications at scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamlined development process&lt;/strong&gt;: Kubernetes can make it easier for Java developers to build and test applications by providing a consistent environment for development, staging, and production.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Overall, Kubernetes can help Java developers build and manage highly scalable and reliable applications more efficiently.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let’s put below Hello World Sample to Kubernetes&lt;/em&gt;,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class ClassA {

public static void main(String[] args) {

System.out.println(“Hello World”);

}

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To containerize a Java program for Kubernetes, you will need to follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a Dockerfile for your Java program. A Dockerfile is a text file that contains instructions for building a Docker image. Your Dockerfile should include instructions for installing any dependencies your Java program requires, as well as instructions for copying your Java code into the image and setting the command to run your program. Here is an example of a simple Dockerfile for a Java program:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM openjdk:8-jre-alpine
ADD my-java-program.jar /app/my-java-program.jar
CMD [“java”, “-jar”, “/app/my-java-program.jar”]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Build the Docker image using the Dockerfile. You can do this using the docker build command. For example:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t my-java-program .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Test the Docker image by running a container using the docker run command. For example:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -it my-java-program
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Push the Docker image to a Docker registry. A Docker registry is a repository for storing and distributing Docker images. You can use a public registry such as Docker Hub, or you can set up your own private registry.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a Kubernetes deployment to manage the containers running your Java program. A deployment is a higher-level object that manages a group of replicas of your application. You can create a deployment using a YAML file that specifies the details of your deployment, including the number of replicas you want to run and the Docker image to use. Here is an example YAML file for a deployment:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-java-program
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-java-program
  template:
    metadata:
      labels:
        app: my-java-program
    spec:
      containers:
      - name: my-java-program
        image: my-java-program
        ports:
        - containerPort: 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the deployment to your Kubernetes cluster using the kubectl command. For example:&lt;br&gt;
That’s it! Your Java program should now be running in a container on your Kubernetes cluster. You can use the kubectl command to view the status of your deployment and make any necessary adjustments.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>containerapps</category>
      <category>java</category>
      <category>cloudnative</category>
    </item>
  </channel>
</rss>
