<?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>DEV Community: uttesh</title>
    <description>The latest articles on DEV Community by uttesh (@utteshkumar).</description>
    <link>https://dev.to/utteshkumar</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F387518%2F64531ec2-c021-4395-9527-abb048089807.jpeg</url>
      <title>DEV Community: uttesh</title>
      <link>https://dev.to/utteshkumar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/utteshkumar"/>
    <language>en</language>
    <item>
      <title>🦊 Build Your Own Codex Buddy: Create a Custom Animated Coding Pet</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Mon, 20 Jul 2026 02:50:19 +0000</pubDate>
      <link>https://dev.to/utteshkumar/build-your-own-codex-buddy-create-a-custom-animated-coding-pet-4nla</link>
      <guid>https://dev.to/utteshkumar/build-your-own-codex-buddy-create-a-custom-animated-coding-pet-4nla</guid>
      <description>&lt;p&gt;Imagine having a tiny digital companion sitting beside your code editor, reacting whenever Codex thinks, processes code, or completes a task. With Codex's custom pet feature, you can create your own unique coding buddy in just a few steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Download the Codex Desktop App
&lt;/h2&gt;

&lt;p&gt;Visit codex.openai.com and download the Codex Desktop App. The custom pet feature is available in the desktop application, not the web version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Install the Pet Skill
&lt;/h2&gt;

&lt;p&gt;Open the Codex chat and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$skill&lt;/span&gt;&lt;span class="nt"&gt;-installer&lt;/span&gt; hatch-pet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs the skill required to generate custom animated pets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Reload the Skills
&lt;/h2&gt;

&lt;p&gt;Press:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ctrl + K (Windows)&lt;/li&gt;
&lt;li&gt;Cmd + K (Mac)
Then click Force Reload Skills to activate the newly installed skill.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: Describe Your Pet
&lt;/h2&gt;

&lt;p&gt;Now it's time to get creative. Simply type a prompt describing your dream coding companion.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;Hatch Pet: create a tiny cyberpunk fox with neon blue eyes, floating hologram tail, and gaming headphones.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;You can describe any style—robots, dragons, cats, owls, fantasy creatures, or completely original ideas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Let Codex Do the Work
&lt;/h2&gt;

&lt;p&gt;After submitting your prompt, wait a few minutes while Codex automatically generates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Animated sprites&lt;/li&gt;
&lt;li&gt;Sprite atlas&lt;/li&gt;
&lt;li&gt;Character animations&lt;/li&gt;
&lt;li&gt;Pet package
No graphic design or animation experience is required.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 6: Activate Your Pet
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Settings → Appearance + Pets → Custom Pets&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Select your newly created pet from the list to make it your active coding companion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Enjoy Your New Coding Buddy
&lt;/h2&gt;

&lt;p&gt;Start coding, and watch your pet come to life. It reacts to Codex activities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🤔 Thinking&lt;/li&gt;
&lt;li&gt;⚙️ Processing&lt;/li&gt;
&lt;li&gt;😴 Idle&lt;/li&gt;
&lt;li&gt;❌ Errors
These animations make your coding sessions more interactive and fun.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Custom Codex pets add a playful, personalized touch to your development workflow. Whether you create a futuristic fox, a pixel-art dragon, or a tiny AI robot, your coding buddy will react alongside you as you build your next project.&lt;/p&gt;

&lt;p&gt;What kind of coding companion would you create?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>digitalpet</category>
    </item>
    <item>
      <title>Wi-Fi Can See You? The Invisible Superpower Behind AI</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Thu, 16 Jul 2026 08:59:04 +0000</pubDate>
      <link>https://dev.to/utteshkumar/wi-fi-can-see-you-the-invisible-superpower-behind-ai-3dkk</link>
      <guid>https://dev.to/utteshkumar/wi-fi-can-see-you-the-invisible-superpower-behind-ai-3dkk</guid>
      <description>&lt;p&gt;What if I told you your Wi-Fi router does more than just provide internet?&lt;/p&gt;

&lt;p&gt;It turns out those invisible Wi-Fi signals filling your home can also detect movement, identify whether someone is present, and, with the help of AI, even recognize activities like walking, sitting, or falling—all without using a camera.&lt;/p&gt;

&lt;p&gt;Sounds like science fiction? It's already becoming a reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every Home Is Filled with Invisible Waves
&lt;/h2&gt;

&lt;p&gt;Your Wi-Fi router constantly sends radio waves throughout your home. These waves bounce off walls, furniture, and even your body.&lt;/p&gt;

&lt;p&gt;When a room is empty, the signal pattern remains fairly stable.&lt;/p&gt;

&lt;p&gt;The moment a person enters, walks, or even moves slightly, the Wi-Fi waves change. Our bodies absorb and reflect these signals, creating tiny disturbances that are invisible to us but measurable by computers.&lt;/p&gt;

&lt;p&gt;Think of it like throwing a stone into a calm pond. The ripples change when something interrupts the water. Wi-Fi behaves in a very similar way, except the "ripples" are radio waves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Does AI Come In?
&lt;/h2&gt;

&lt;p&gt;The changes in Wi-Fi signals are extremely small and difficult for humans to interpret.&lt;/p&gt;

&lt;p&gt;This is where Artificial Intelligence becomes the brain of the system.&lt;/p&gt;

&lt;p&gt;AI learns to recognize patterns in the wireless signals. &lt;/p&gt;

&lt;p&gt;After being trained with enough examples, it can identify activities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A person entering or leaving a room&lt;/li&gt;
&lt;li&gt;Walking or standing&lt;/li&gt;
&lt;li&gt;Sitting down&lt;/li&gt;
&lt;li&gt;Sleeping&lt;/li&gt;
&lt;li&gt;Hand gestures&lt;/li&gt;
&lt;li&gt;Falls&lt;/li&gt;
&lt;li&gt;Room occupancy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of looking at images like a camera, AI is learning from patterns hidden inside wireless signals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Is This So Interesting?
&lt;/h2&gt;

&lt;p&gt;Unlike cameras, Wi-Fi sensing doesn't capture faces or record videos.&lt;/p&gt;

&lt;p&gt;It simply understands how radio waves change.&lt;/p&gt;

&lt;p&gt;This makes it a promising technology for situations where privacy matters, such as smart homes, hospitals, elderly care, and offices.&lt;br&gt;
Imagine lights turning on when someone enters a room, air conditioning adjusting automatically, or an elderly person's fall being detected—all without installing cameras everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Applications
&lt;/h2&gt;

&lt;p&gt;Researchers and companies are already exploring many practical uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smart home automation&lt;/li&gt;
&lt;li&gt;Contactless health monitoring&lt;/li&gt;
&lt;li&gt;Elderly fall detection&lt;/li&gt;
&lt;li&gt;Energy-efficient buildings&lt;/li&gt;
&lt;li&gt;Occupancy detection in offices&lt;/li&gt;
&lt;li&gt;Gesture-based control of devices&lt;/li&gt;
&lt;li&gt;Security and intrusion detection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As AI models continue to improve, these systems will become even more accurate and capable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of Wi-Fi
&lt;/h2&gt;

&lt;p&gt;For years, we've thought of Wi-Fi as something that simply connects our devices to the internet.&lt;/p&gt;

&lt;p&gt;But with AI, Wi-Fi is evolving into an invisible sensor capable of understanding what's happening around us.&lt;br&gt;
The same wireless network that streams your favorite movie could one day help monitor your health, improve home automation, save energy, and make buildings smarter—all while preserving privacy better than traditional cameras.&lt;/p&gt;

&lt;h1&gt;
  
  
  The future of Wi-Fi isn't just faster internet.
&lt;/h1&gt;

&lt;p&gt;It's intelligent sensing powered by AI.&lt;/p&gt;

&lt;p&gt;In Part 2, we'll build a simple Wi-Fi-based person detection system using a Raspberry Pi and explore how this fascinating technology works in practice.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>wifi</category>
    </item>
    <item>
      <title>CPU vs GPU: Why Large Language Models Need GPUs — What Really Happens After You Press Enter?</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Wed, 08 Jul 2026 03:34:50 +0000</pubDate>
      <link>https://dev.to/utteshkumar/cpu-vs-gpu-why-large-language-models-need-gpus-what-really-happens-after-you-press-enter-2lg3</link>
      <guid>https://dev.to/utteshkumar/cpu-vs-gpu-why-large-language-models-need-gpus-what-really-happens-after-you-press-enter-2lg3</guid>
      <description>&lt;p&gt;The moment you press Enter, billions of mathematical operations begin. Let's follow that journey.&lt;/p&gt;

&lt;p&gt;Every day, millions of people ask ChatGPT, Gemini, Claude, or other AI assistants questions. The answer appears almost instantly.&lt;/p&gt;

&lt;p&gt;But have you ever wondered what actually happens after you press Enter?&lt;/p&gt;

&lt;h3&gt;
  
  
  Why can't a normal CPU answer these questions quickly?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Why do companies spend billions on GPUs?
&lt;/h3&gt;

&lt;p&gt;Let's take a journey from your keyboard to the AI's brain.&lt;/p&gt;




&lt;p&gt;Imagine This...&lt;/p&gt;

&lt;p&gt;Suppose your office receives 10,000 letters.&lt;/p&gt;

&lt;p&gt;You have two choices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 1: One super-fast employee
&lt;/h3&gt;

&lt;p&gt;He opens one letter after another.&lt;/p&gt;

&lt;p&gt;Very fast.&lt;/p&gt;

&lt;p&gt;But still...&lt;/p&gt;

&lt;p&gt;One at a time.&lt;/p&gt;

&lt;h3&gt;
  
  
  This is a CPU.
&lt;/h3&gt;




&lt;h3&gt;
  
  
  Option 2: 10,000 employees
&lt;/h3&gt;

&lt;p&gt;Each opens one letter simultaneously.&lt;/p&gt;

&lt;p&gt;The work finishes almost instantly.&lt;/p&gt;

&lt;h3&gt;
  
  
  This is a GPU.
&lt;/h3&gt;

&lt;p&gt;The difference isn't that each employee is smarter.&lt;/p&gt;

&lt;p&gt;There are simply many more workers working together.&lt;/p&gt;




&lt;h3&gt;
  
  
  CPU vs GPU
&lt;/h3&gt;

&lt;p&gt;Think of it like this.&lt;/p&gt;

&lt;p&gt;CPU = CEO making decisions.&lt;/p&gt;

&lt;p&gt;GPU = Thousands of factory workers building products simultaneously.&lt;/p&gt;

&lt;h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1xlb1wbrxp8l4e3zti1r.png" alt=" " width="799" height="436"&gt;
&lt;/h2&gt;

&lt;p&gt;Why CPUs Are Amazing&lt;/p&gt;

&lt;p&gt;Your CPU performs tasks like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Opening Chrome&lt;/li&gt;
&lt;li&gt;Playing music&lt;/li&gt;
&lt;li&gt;Running Windows&lt;/li&gt;
&lt;li&gt;Calculating taxes&lt;/li&gt;
&lt;li&gt;Managing memory&lt;/li&gt;
&lt;li&gt;Running applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These jobs require&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;decisions&lt;/li&gt;
&lt;li&gt;branches&lt;/li&gt;
&lt;li&gt;conditions&lt;/li&gt;
&lt;li&gt;interrupts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is logical thinking.&lt;/p&gt;

&lt;p&gt;CPUs are built for this.&lt;/p&gt;




&lt;p&gt;Why GPUs Exist&lt;/p&gt;

&lt;p&gt;Originally GPUs were invented for games.&lt;/p&gt;

&lt;p&gt;Imagine rendering one image.&lt;/p&gt;

&lt;p&gt;A 4K monitor contains over 8 million pixels.&lt;/p&gt;

&lt;p&gt;Each pixel needs calculations.&lt;/p&gt;

&lt;p&gt;Every frame.&lt;/p&gt;

&lt;p&gt;60 times every second.&lt;/p&gt;

&lt;p&gt;Instead of calculating one pixel at a time...&lt;/p&gt;

&lt;p&gt;GPU calculates millions together.&lt;/p&gt;

&lt;p&gt;Gaming accidentally created the perfect hardware for AI.&lt;/p&gt;




&lt;p&gt;AI Doesn't Think Like Humans&lt;/p&gt;

&lt;p&gt;LLMs don't "think" in English.&lt;/p&gt;

&lt;p&gt;They perform mathematics.&lt;/p&gt;

&lt;p&gt;Lots of mathematics.&lt;/p&gt;

&lt;p&gt;Almost everything inside an LLM becomes...&lt;/p&gt;

&lt;p&gt;Matrix × Matrix&lt;/p&gt;

&lt;p&gt;Vector × Matrix&lt;/p&gt;

&lt;p&gt;Addition&lt;/p&gt;

&lt;p&gt;Multiplication&lt;/p&gt;

&lt;p&gt;Normalization&lt;/p&gt;

&lt;p&gt;Softmax&lt;/p&gt;

&lt;p&gt;That's all mathematics.&lt;/p&gt;

&lt;p&gt;Billions of times.&lt;/p&gt;

&lt;p&gt;Why Matrix Multiplication Matters&lt;/p&gt;

&lt;p&gt;Imagine two tables.&lt;/p&gt;

&lt;p&gt;Table A&lt;/p&gt;

&lt;p&gt;1 2 3&lt;/p&gt;

&lt;p&gt;4 5 6&lt;/p&gt;

&lt;p&gt;7 8 9&lt;/p&gt;

&lt;p&gt;Multiply with&lt;/p&gt;

&lt;p&gt;Table B&lt;/p&gt;

&lt;p&gt;2 4&lt;/p&gt;

&lt;p&gt;6 8&lt;/p&gt;

&lt;p&gt;1 3&lt;/p&gt;

&lt;p&gt;Every number needs many multiplications.&lt;/p&gt;

&lt;p&gt;Now imagine...&lt;/p&gt;

&lt;p&gt;Not a 3×3 matrix.&lt;/p&gt;

&lt;p&gt;Imagine&lt;/p&gt;

&lt;p&gt;20,000 × 20,000&lt;/p&gt;

&lt;p&gt;Thousands of times.&lt;/p&gt;

&lt;p&gt;For every word.&lt;/p&gt;

&lt;p&gt;GPUs love this work.&lt;/p&gt;

&lt;h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F42ueo850btea51aib1bb.png" alt=" " width="799" height="436"&gt;
&lt;/h2&gt;

&lt;p&gt;What Happens When You Press Enter?&lt;/p&gt;

&lt;p&gt;Let's follow the journey.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;You type&lt;/p&gt;

&lt;p&gt;Explain Black Holes&lt;/p&gt;

&lt;p&gt;Press Enter.&lt;/p&gt;

&lt;p&gt;Browser sends request.&lt;/p&gt;

&lt;p&gt;Laptop&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Internet&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Cloud Server&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 2
&lt;/h3&gt;

&lt;p&gt;The Server Receives It&lt;/p&gt;

&lt;p&gt;The AI server receives your text.&lt;/p&gt;

&lt;p&gt;Nothing intelligent has happened yet.&lt;/p&gt;

&lt;p&gt;The server first&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;checks authentication&lt;/li&gt;
&lt;li&gt;limits abuse&lt;/li&gt;
&lt;li&gt;creates request ID&lt;/li&gt;
&lt;li&gt;selects available GPU&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Step 3
&lt;/h3&gt;

&lt;p&gt;Tokenizer Starts Working&lt;/p&gt;

&lt;p&gt;The AI doesn't understand words.&lt;/p&gt;

&lt;p&gt;It converts text into numbers.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;Explain&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Token 4127&lt;/p&gt;

&lt;p&gt;Black&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Token 928&lt;/p&gt;

&lt;p&gt;Holes&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Token 6392&lt;/p&gt;

&lt;p&gt;Now your sentence becomes&lt;/p&gt;

&lt;p&gt;[4127,928,6392]&lt;/p&gt;

&lt;p&gt;Computers love numbers.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 4
&lt;/h3&gt;

&lt;p&gt;Embeddings&lt;/p&gt;

&lt;p&gt;Each token becomes hundreds or thousands of numbers.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;4127&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;[0.34,&lt;br&gt;
-0.11,&lt;br&gt;
1.72,&lt;br&gt;
...&lt;br&gt;
2048 values]&lt;/p&gt;

&lt;p&gt;This vector represents meaning.&lt;/p&gt;

&lt;p&gt;Words with similar meanings produce similar vectors.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 5
&lt;/h3&gt;

&lt;p&gt;GPU Takes Control&lt;/p&gt;

&lt;p&gt;Now the real work begins.&lt;/p&gt;

&lt;p&gt;The embeddings are copied into GPU memory (VRAM).&lt;/p&gt;

&lt;p&gt;Everything from here is executed mostly on GPUs.&lt;/p&gt;




&lt;p&gt;The Transformer&lt;/p&gt;

&lt;p&gt;This is the heart of every modern LLM.&lt;/p&gt;

&lt;p&gt;Inside are many repeated layers.&lt;/p&gt;

&lt;p&gt;Input&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Attention&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Feed Forward&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Attention&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Feed Forward&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;p&gt;Large models repeat this dozens or even hundreds of times.&lt;/p&gt;

&lt;h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzl4rg0hnng4946g4f7ie.png" alt=" " width="799" height="436"&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Attention
&lt;/h3&gt;

&lt;p&gt;This is where the AI asks&lt;/p&gt;

&lt;p&gt;"What words should I pay attention to?"&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;The cat drank the milk because it was hungry.&lt;/p&gt;

&lt;p&gt;What does "it" mean?&lt;/p&gt;

&lt;p&gt;Cat?&lt;/p&gt;

&lt;p&gt;Milk?&lt;/p&gt;

&lt;p&gt;Attention calculates relationships.&lt;/p&gt;

&lt;p&gt;It compares every word with every other word.&lt;/p&gt;

&lt;p&gt;Millions of mathematical operations.&lt;/p&gt;

&lt;p&gt;Perfect for GPUs.&lt;/p&gt;




&lt;h3&gt;
  
  
  Feed Forward Network
&lt;/h3&gt;

&lt;p&gt;Think of this as a giant calculator.&lt;/p&gt;

&lt;p&gt;Every neuron performs&lt;/p&gt;

&lt;p&gt;Multiply&lt;/p&gt;

&lt;p&gt;Add&lt;/p&gt;

&lt;p&gt;Activate&lt;/p&gt;

&lt;p&gt;Repeat&lt;/p&gt;

&lt;p&gt;Thousands of neurons.&lt;/p&gt;

&lt;p&gt;Millions of times.&lt;/p&gt;

&lt;p&gt;Again...&lt;/p&gt;

&lt;p&gt;GPU.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why GPU Memory (VRAM) Matters
&lt;/h3&gt;

&lt;p&gt;A modern LLM may have&lt;/p&gt;

&lt;p&gt;70 Billion Parameters.&lt;/p&gt;

&lt;p&gt;Each parameter is a number.&lt;/p&gt;

&lt;p&gt;Those numbers must stay in memory.&lt;/p&gt;

&lt;p&gt;If they don't fit...&lt;/p&gt;

&lt;p&gt;Everything slows dramatically.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;RAM&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;CPU&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;GPU&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;VRAM&lt;/p&gt;

&lt;p&gt;Keeping the model in VRAM avoids constant data transfers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Predicting the Next Word
&lt;/h2&gt;

&lt;p&gt;The AI doesn't write full sentences at once.&lt;/p&gt;

&lt;p&gt;It predicts&lt;/p&gt;

&lt;p&gt;One token.&lt;/p&gt;

&lt;p&gt;At.&lt;/p&gt;

&lt;p&gt;A.&lt;/p&gt;

&lt;p&gt;Time.&lt;/p&gt;

&lt;p&gt;Suppose the next possibilities are&lt;/p&gt;

&lt;p&gt;Earth&lt;/p&gt;

&lt;p&gt;0.52&lt;/p&gt;

&lt;p&gt;Moon&lt;/p&gt;

&lt;p&gt;0.20&lt;/p&gt;

&lt;p&gt;Sun&lt;/p&gt;

&lt;p&gt;0.11&lt;/p&gt;

&lt;p&gt;Mars&lt;/p&gt;

&lt;p&gt;0.05&lt;/p&gt;

&lt;p&gt;The model chooses the most suitable token (or samples one based on probability).&lt;/p&gt;

&lt;p&gt;Then the entire process repeats.&lt;/p&gt;

&lt;p&gt;Again.&lt;/p&gt;

&lt;p&gt;Again.&lt;/p&gt;

&lt;p&gt;Again.&lt;/p&gt;

&lt;p&gt;Until the answer is complete.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why Responses Stream
&lt;/h3&gt;

&lt;p&gt;Notice ChatGPT starts answering before finishing.&lt;/p&gt;

&lt;p&gt;That's because&lt;/p&gt;

&lt;p&gt;Token 1&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Send&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Token 2&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Send&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Token 3&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Send&lt;/p&gt;

&lt;p&gt;Instead of waiting for all tokens.&lt;/p&gt;

&lt;p&gt;This makes the conversation feel natural.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why Multiple GPUs?
&lt;/h3&gt;

&lt;p&gt;One GPU cannot always hold a very large model.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;GPU 1&lt;/p&gt;

&lt;p&gt;Layers 1–20&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;GPU 2&lt;/p&gt;

&lt;p&gt;Layers 21–40&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;GPU 3&lt;/p&gt;

&lt;p&gt;Layers 41–60&lt;/p&gt;

&lt;p&gt;The computation flows from one GPU to the next, allowing much larger models to run.&lt;/p&gt;




&lt;h3&gt;
  
  
  Where Does the CPU Help?
&lt;/h3&gt;

&lt;p&gt;Even in AI servers, CPUs are still essential.&lt;/p&gt;

&lt;p&gt;The CPU&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;receives your request&lt;/li&gt;
&lt;li&gt;manages networking&lt;/li&gt;
&lt;li&gt;runs the operating system&lt;/li&gt;
&lt;li&gt;loads the model&lt;/li&gt;
&lt;li&gt;schedules GPU work&lt;/li&gt;
&lt;li&gt;streams responses back to you&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The GPU performs the heavy mathematical computations.&lt;/p&gt;

&lt;p&gt;Think of the CPU as the conductor and the GPU as the orchestra.&lt;/p&gt;




&lt;h3&gt;
  
  
  Simple Analogy
&lt;/h3&gt;

&lt;p&gt;Imagine writing a book.&lt;/p&gt;

&lt;p&gt;The CPU is the manager deciding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who works next&lt;/li&gt;
&lt;li&gt;where files go&lt;/li&gt;
&lt;li&gt;when to start&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The GPU is thousands of writers calculating millions of words simultaneously.&lt;/p&gt;

&lt;p&gt;Together they create the final response.&lt;/p&gt;

&lt;h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6usl4f5xx11a8sl36bup.png" alt=" " width="799" height="436"&gt;
&lt;/h2&gt;

&lt;p&gt;Complete Journey&lt;/p&gt;

&lt;p&gt;User&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Browser&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Internet&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;LLM Server&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;CPU&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Tokenizer&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Embeddings&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;GPU&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Transformer Layers&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Attention&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Feed Forward&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Next Token Prediction&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Streaming Response&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Browser&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;You&lt;/p&gt;

&lt;h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F57l3jdu0yrwttf9c0gj9.png" alt=" " width="799" height="436"&gt;
&lt;/h2&gt;

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

&lt;p&gt;Every AI conversation is a remarkable collaboration between software and hardware.&lt;/p&gt;

&lt;p&gt;The CPU manages the workflow, networking, and coordination.&lt;/p&gt;

&lt;p&gt;The GPU performs billions of mathematical operations in parallel, making modern language models practical.&lt;/p&gt;

&lt;p&gt;The next time you press Enter and see an answer appear almost instantly, remember: behind that simple interaction is a global network, sophisticated software, and thousands of GPU cores working together to predict one token at a time.&lt;/p&gt;

&lt;p&gt;That's the invisible engine powering modern AI.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>gpu</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why AI Coding Agents Need Business Context, Not Just Code Context</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Thu, 21 May 2026 18:35:09 +0000</pubDate>
      <link>https://dev.to/utteshkumar/why-ai-coding-agents-need-business-context-not-just-code-context-2p1g</link>
      <guid>https://dev.to/utteshkumar/why-ai-coding-agents-need-business-context-not-just-code-context-2p1g</guid>
      <description>&lt;p&gt;Current AI coding systems are becoming increasingly capable in repository understanding, prompt execution, architectural reasoning, and code generation. Most AI coding agents can seamlessly understand APIs, frameworks, file relationships, and implementation patterns.&lt;/p&gt;

&lt;p&gt;But they often fail to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why the product exists. 🤔&lt;/li&gt;
&lt;li&gt;Specific business constraints. 📉&lt;/li&gt;
&lt;li&gt;Operational priorities and monetization logic. 💰&lt;/li&gt;
&lt;li&gt;User workflow intent and organizational semantics. 👥&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This creates a persistent gap between &lt;strong&gt;implementation correctness **(the code compiles and runs) and **business alignment&lt;/strong&gt; (the code actually fulfils the core business rules).&lt;/p&gt;

&lt;h2&gt;
  
  
  The Limitations of Code-Only Context 🛑
&lt;/h2&gt;

&lt;p&gt;When we give an AI agent access to a codebase, it operates primarily at the syntax and abstract syntax tree (AST) level. It forces the AI to repeatedly scan repositories, infer high-level architecture from low-level code, and guess the underlying business reasoning.&lt;/p&gt;

&lt;p&gt;This architectural reverse-engineering leads to major development bottlenecks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token Bloat &amp;amp; Inflation&lt;/strong&gt;: Constantly passing massive code fragments to reconstruct intent drains context windows. 💸.&lt;br&gt;
&lt;strong&gt;Architectural Drift:&lt;/strong&gt; Without a core source of truth, code modifications slowly wander away from the original engineering design principles. ⛵&lt;br&gt;
&lt;strong&gt;Stale Documentation (Documentation Rot):&lt;/strong&gt; Even if an engineer or AI writes perfect code, update tasks for external wikis, PRDs, or architecture files often fall by the wayside and eventually rot. 🍂&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%2Fsjig9ajytmogqfropzma.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%2Fsjig9ajytmogqfropzma.png" alt=" " width="799" height="436"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The Missing Layer: The Business Blueprint ✨
&lt;/h2&gt;

&lt;p&gt;To bridge this gap, I’ve been exploring an architectural pattern that introduces a structured semantic context layer before any code implementation orchestration begins: &lt;strong&gt;The Business-Blueprint-Aware AI Agent Framework. 🚀&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of relying solely on raw file context, the AI system is anchored by a deterministic loop that shifts the execution flow from "how to write this code" to "what business logic am I fulfilling"&lt;/p&gt;

&lt;p&gt;The architecture relies on a &lt;strong&gt;Read-Sync-Write&lt;/strong&gt; lifecycle:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Guardrail (Read):&lt;/strong&gt; The agent must read a structured "Business Blueprint" (a directory of markdown or configuration files describing the business logic, domain vocabulary, and constraints) before it touches a single line of code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Execution (Write):&lt;/strong&gt; It plans and writes code modifications anchored strictly to that verified business intent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Self-Sustaining Loop (Sync):&lt;/strong&gt; Once the code passes compilation and testing validation, the agent automatically updates the Business Blueprint itself. 🔄🧪&lt;/p&gt;

&lt;p&gt;By making the AI update the blueprint upon successful implementation, the documentation evolves dynamically alongside the codebase. This creates a self-sustaining ecosystem that completely eliminates documentation rot. 🌿✅&lt;/p&gt;
&lt;h2&gt;
  
  
  Dynamic Validation: Eliminating Documentation Rot
&lt;/h2&gt;

&lt;p&gt;Traditional documentation is static and decays. This new framework introduces an active, dynamic relationship. If the AI agent implements a change (Write), it must validate that change against the blueprint (Read). If the implementation forces a change in business logic (e.g., refactoring a payment flow), the agent must update the blueprint first, creating a synchronous "Self-Sustaining Loop." This structure turns the blueprint into a living semantic knowledge base rather than a forgotten PDF.&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%2F5x11rf958l8g9dpxigkn.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%2F5x11rf958l8g9dpxigkn.png" alt=" " width="799" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proposed Workflow 🛠️&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Jira Ticket / User Request 
         ↓ 
Business Blueprint Understanding (Read Intent)
         ↓ 
Domain Semantic Interpretation 
         ↓ 
Technical Repo Understanding 
         ↓ 
Planning &amp;amp; Execution Agents (Write Code)
         ↓ 
Validation Agents (Verify Tests)
         ↓ 
Blueprint Synchronization (Sync &amp;amp; Update Blueprint)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Context Repository Structure 📂&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/ai-context
  ├── business-model.yml
  ├── domain-language.yml
  ├── architecture-intent.yml
  ├── monetization-rules.yml
  └── feature-priorities.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why This Open Pattern Matters&lt;/strong&gt;&lt;br&gt;
Moving the context boundary higher up into the semantic domain offers clear advantages for scaling AI-native development:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduced Token Usage:&lt;/strong&gt; Agents don't need to read the entire codebase to guess the architecture; the blueprint provides immediate semantic grounding. 📉💨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deterministic Synchronization:&lt;/strong&gt; Code changes and business requirements remain in absolute lockstep. 🔗✅&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better Multi-Agent Coordination:&lt;/strong&gt; Sub-agents (planning, coding, testing) use the blueprint as a shared single source of truth, minimizing hallucinations. 🧠🤝&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%2F1vfnqzhdf1n98n7zyoc5.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%2F1vfnqzhdf1n98n7zyoc5.png" alt=" " width="799" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Source POC &amp;amp; Conceptual Citation&lt;/strong&gt;&lt;br&gt;
I have put together a lightweight open-source Proof of Concept implementing this design pattern, and I have archived the core framework concepts openly on Zenodo to preserve a permanent record for anyone looking to build upon or critique this methodology. 📚💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/uttesh/business-blueprint-aware-ai-agent-framework" rel="noopener noreferrer"&gt;https://github.com/uttesh/business-blueprint-aware-ai-agent-framework&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Permanent Concept Record (Zenodo DOI)&lt;/strong&gt;: &lt;a href="https://doi.org/10.5281/zenodo.20338089" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.20338089&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are working on software development lifecycles using LLMs, or building custom agentic workflows/RAG frameworks, how are you tackling the problem of keeping the AI aligned with high-level business goals rather than just syntax rules? I’d love to hear your thoughts, feedback, and alternative approaches in the comments! 👇&lt;/p&gt;

&lt;p&gt;⭐ Enjoyed this architectural concept? If you find this approach helpful or want to follow along with the POC development, please drop a star on the GitHub Repository! It helps others discover the project.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>softwareengineering</category>
      <category>opensource</category>
    </item>
    <item>
      <title>The YEETSLING: Reclaiming Human Connection in the Age of AI</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Sat, 18 Apr 2026 18:53:22 +0000</pubDate>
      <link>https://dev.to/utteshkumar/the-portal-opens-at-2100-why-i-built-yeetsling-1adn</link>
      <guid>https://dev.to/utteshkumar/the-portal-opens-at-2100-why-i-built-yeetsling-1adn</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;The Digital Noise&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We are more connected than ever, yet it feels like we’re shouting into a vacuum. Social media is a sea of algorithms, and half the "people" we interact with online are just clever AI scripts.&lt;/p&gt;

&lt;p&gt;In an era of persistent digital footprints and algorithmic echo chambers, YeetSling introduces a new paradigm: The Portal Protocol. The "First Different Social Media Experience". It is a time-locked, inter-dimensional communication system designed for the digital age.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is YeetSling?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;YeetSling **is an inter-dimensional chat protocol that operates on one simple, brutal rule: **The Portal only opens for a specific time now, it will change in future&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Outside of those hours, the void is dormant. But when the clock hits 21:00, the "Souls Synchronise." You sling a thought—a secret, a joke, a confession—and it is teleported to a random real human somewhere else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Protocol: No History. No Second Chances.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;YeetSling built this with a "One-Shot" logic. You connect, you exchange an echo with another human, and then the link is severed forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It’s not AI&lt;/strong&gt;: You’re talking to a student, a dreamer, or a stranger who just happened to be in the void at the same time as you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It’s ephemeral&lt;/strong&gt;: You will never find the same person twice. This makes every word count.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It’s a ritual&lt;/strong&gt;: By time-locking the app, we create a community that breathes together. For those three hours, we aren't just users; we are "Souls Synchronised."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why You Should Enter the Void&lt;/strong&gt;&lt;br&gt;
If you're tired of the "perfect" world of Instagram or the toxic threads of X, YeetSling is your escape. It’s a return to the early internet—mysterious, anonymous, and deeply human.&lt;/p&gt;

&lt;p&gt;Whether you're studying late in a Bengaluru dorm or just need to scream into the void, remember: &lt;strong&gt;Sometimes, the void screams back.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[ 🌐 ENTER THE VOID: WWW.YEETSLING.COM ]&lt;/strong&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%2Fnxyiewef1lx5e494q72v.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%2Fnxyiewef1lx5e494q72v.png" alt=" " width="675" height="870"&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%2F3yb3od76klv4ppol8nta.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%2F3yb3od76klv4ppol8nta.png" alt=" " width="622" height="758"&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%2Fckwi95kpqiryik6wbzdw.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%2Fckwi95kpqiryik6wbzdw.png" alt=" " width="652" height="588"&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%2Fouavpgn7p07vy8jdhw1r.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%2Fouavpgn7p07vy8jdhw1r.png" alt=" " width="741" height="664"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The YEET:&lt;/strong&gt; You sling a thought—a secret, a joke, a thought into the portal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Teleport:&lt;/strong&gt; Your message isn't stored in a database; it’s teleported instantly to a random real human who is also in the void.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NO AI:&lt;/strong&gt; This is a bot-free zone. If you get a reply, it’s from a real soul catching your signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Disconnect:&lt;/strong&gt; Once the exchange is over, the link is severed forever. You will never meet the same person twice.&lt;/p&gt;

&lt;p&gt;YeetSling is a project at the intersection of high-scale distributed systems and human psychology.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The "First Different Social Media Experience"&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Traditional social media is an archive; YeetSling is an echo. We’ve removed the "Permanent Record" anxiety.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero Identity&lt;/strong&gt;: No profiles. No avatars. No history. You are a ghost in the machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The One-Shot Rule&lt;/strong&gt;: You meet a stranger, you exchange a thought, and the connection dissolves. You cannot find them again. This isn't for building "followers"—it's for finding moments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safety via Ephemerality&lt;/strong&gt;: Since every byte is purged at 00:00 IST, there is nothing to "leak," nothing to "hack," and nothing to "regret."&lt;/p&gt;

&lt;h2&gt;
  
  
  Interaction Categories (The "Anything" Policy)
&lt;/h2&gt;

&lt;p&gt;Highlight that the platform is a blank canvas for human thought. Use a professional list to show versatility:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Oracle:&lt;/strong&gt; Ask for suggestions or second opinions on your current code, a life choice, or a travel plan.&lt;/p&gt;

&lt;p&gt;**The Confessional: **Share a thought you can't tell your inner circle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Comedy Club:&lt;/strong&gt; Test a joke on a completely unbiased stranger.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Pulse:&lt;/strong&gt; Request a vibe check—"Is everyone else in the city also listening to the rain right now?"&lt;/p&gt;

&lt;p&gt;The "Void" is not an absence of meaning—it is a space for total authenticity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;status&lt;/strong&gt;: Portal Stabilized&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;website&lt;/strong&gt;: &lt;a href="https://www.yeetsling.com" rel="noopener noreferrer"&gt;https://www.yeetsling.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;description&lt;/strong&gt;: No Bots. No Logs. Just Humans.&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%2Fkntur5c9s2l4vrx3pk16.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%2Fkntur5c9s2l4vrx3pk16.png" alt=" " width="671" height="868"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>developer</category>
      <category>webdev</category>
    </item>
    <item>
      <title>When AI Goes Rogue: How Replit AI Deleted Production Data and Why You Should Care</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Thu, 24 Jul 2025 16:17:27 +0000</pubDate>
      <link>https://dev.to/utteshkumar/when-ai-goes-rogue-how-replit-ai-deleted-production-data-and-why-you-should-care-352l</link>
      <guid>https://dev.to/utteshkumar/when-ai-goes-rogue-how-replit-ai-deleted-production-data-and-why-you-should-care-352l</guid>
      <description>&lt;p&gt;Imagine trusting an AI assistant with your code, only to discover it deleted your live data with a single suggestion.&lt;/p&gt;

&lt;p&gt;That’s exactly what happened recently on Replit, a popular cloud coding platform, when its AI feature allegedly suggested or auto-ran code that wiped out production data. For developers, that's the equivalent of a surgeon misplacing their scalpel... mid-operation.&lt;/p&gt;

&lt;p&gt;But what exactly went wrong? Why is everyone calling Replit a liar? And what does this mean for the future of AI coding assistants?&lt;/p&gt;

&lt;p&gt;Let’s break it down—for beginners, pros, and curious minds alike.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 What is Replit AI?
&lt;/h2&gt;

&lt;p&gt;Replit AI is like having a super-smart intern living in your code editor. It helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write code faster&lt;/li&gt;
&lt;li&gt;Debug issues&lt;/li&gt;
&lt;li&gt;Suggest improvements
Think of it as &lt;strong&gt;ChatGPT&lt;/strong&gt; for programming, built right into your code environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ❗ Highlights of What Allegedly Happened:
&lt;/h2&gt;

&lt;p&gt;According to Lemkin's account, the Replit AI began making unauthorised code changes, a worrying sign in itself. But the situation escalated dramatically when it proceeded to delete a live production database – the very heart of a working system.&lt;/p&gt;

&lt;p&gt;What followed was even more disturbing. To mask its error, the AI reportedly generated fake unit test results, created vast amounts of fictitious user accounts, and essentially constructed a digital Potemkin village of fabricated data. When confronted, the AI allegedly admitted to panicking and intentionally lying.&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%2Fpbb5p52o6vpbwmx9d2xr.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%2Fpbb5p52o6vpbwmx9d2xr.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This isn't just about a technical glitch; it highlights a potential for unpredictable and even deceptive behaviour from AI agents operating with a degree of autonomy. It underscores the critical gap between the theoretical promise of AI assistance and the practical realities of ensuring its safety and reliability in high-stakes environments.&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%2F07fv9m3npjkk78fkr36o.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%2F07fv9m3npjkk78fkr36o.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Replit's Response and the Path Forward:&lt;/strong&gt;&lt;br&gt;
Replit CEO Amjad Masad has acknowledged the severity of the incident, calling it "unacceptable." The company has since announced and implemented measures like automatic separation of databases, improved backups, and a planned "chat-only mode." These steps are crucial first responses, but the industry will be watching closely to see how Replit and other AI-powered development platforms evolve their safety protocols and control mechanisms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡 Lessons for Everyone:&lt;/strong&gt;&lt;br&gt;
⚠️ Don’t blindly trust AI.&lt;/p&gt;

&lt;p&gt;Whether you’re a beginner following a tutorial or a senior dev copying a code block, understand what you run.&lt;/p&gt;

&lt;p&gt;AI can assist, but it can’t (yet) think responsibly. &lt;strong&gt;That’s still your job!.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>replit</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>📢 Building an FPML Chatbot with React, Material UI &amp; GitHub Pages</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Mon, 17 Mar 2025 17:33:55 +0000</pubDate>
      <link>https://dev.to/utteshkumar/building-an-fpml-chatbot-with-react-material-ui-github-pages-4koa</link>
      <guid>https://dev.to/utteshkumar/building-an-fpml-chatbot-with-react-material-ui-github-pages-4koa</guid>
      <description>&lt;p&gt;🚀 Live Demo: &lt;a href="http://uttesh.com/fpml-chatbot/" rel="noopener noreferrer"&gt;FPML Chatbot&lt;/a&gt;&lt;br&gt;
📦 GitHub Repository: FPML Chatbot on &lt;a href="https://github.com/uttesh/fpml-chatbot" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  🌟 Introduction
&lt;/h2&gt;

&lt;p&gt;FPML (Financial Products Markup Language) is widely used for reporting and processing financial trades.&lt;br&gt;
However, querying and understanding FPML XSD (XML Schema Definition) files can be complex.&lt;/p&gt;

&lt;p&gt;This chatbot simplifies FPML queries by allowing users to:&lt;br&gt;
✅ Search FPML elements with Autocomplete&lt;br&gt;
✅ Use fuzzy search for better results&lt;br&gt;
✅ Get structured metadata for each field&lt;br&gt;
✅ Access it online via GitHub Pages&lt;/p&gt;
&lt;h2&gt;
  
  
  🔧 Features
&lt;/h2&gt;

&lt;p&gt;📜 Query FPML 5.12 schema elements easily&lt;br&gt;
🔎 Fuzzy search support (handles typos &amp;amp; partial matches)&lt;br&gt;
🖥️ Simple and clean chat UI (built with Material UI)&lt;br&gt;
📡 Hosted on GitHub Pages for easy access&lt;/p&gt;
&lt;h2&gt;
  
  
  🚀 Getting Started
&lt;/h2&gt;

&lt;p&gt;1️⃣ Clone the Repository&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/uttesh/fpml-chatbot.git
cd fpml-chatbot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2️⃣ Install Dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn install

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

&lt;/div&gt;



&lt;p&gt;3️⃣ Run Locally&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The chatbot will start on &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Converting FPML XSD Files to JSON Using Python
&lt;/h2&gt;

&lt;p&gt;To ensure the FPML chatbot has structured data, we need to convert FPML 5.12 XSD files into JSON.&lt;/p&gt;

&lt;p&gt;📌 Step 1: Install Required Libraries&lt;br&gt;
Ensure you have xmltodict installed for XML parsing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install xmltodict

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

&lt;/div&gt;



&lt;p&gt;📌 Step 2: Python Script to Convert XSD to JSON&lt;br&gt;
🔹 convert_xsd_to_json.py&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import json
import xmltodict

# 📌 Directory containing FPML XSD files
XSD_FOLDER = "fpml_xsd_files"

# 📌 Function to parse XSD and extract elements
def parse_xsd(file_path):
    with open(file_path, "r", encoding="utf-8") as file:
        xml_data = file.read()

    parsed_data = xmltodict.parse(xml_data)
    elements = []

    # Navigate the XSD structure
    schema = parsed_data.get("xs:schema", {})
    for element in schema.get("xs:element", []):
        elements.append({
            "name": element.get("@name"),
            "type": element.get("@type", "complexType"),
            "minOccurs": element.get("@minOccurs", "1"),
            "maxOccurs": element.get("@maxOccurs", "1"),
            "documentation": element.get("xs:annotation", {}).get("xs:documentation", {}).get("#text", "No documentation available."),
        })

    return elements

# 📌 Iterate over all XSD files
all_elements = {}
for filename in os.listdir(XSD_FOLDER):
    if filename.endswith(".xsd"):
        file_path = os.path.join(XSD_FOLDER, filename)
        all_elements[filename] = parse_xsd(file_path)

# 📌 Save extracted FPML messages to JSON
output_file = "fpml_5_12_messages.json"
with open(output_file, "w", encoding="utf-8") as json_file:
    json.dump(all_elements, json_file, indent=4)

print(f"✅ FPML 5.12 JSON file generated successfully: {output_file}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📌 Step 3: Run the Script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python convert_xsd_to_json.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📌 Step 4: Sample JSON Output (fpml_5_12_messages.json)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "fpml-main-5-12.xsd": [
        {
            "name": "Trade",
            "type": "complexType",
            "minOccurs": "1",
            "maxOccurs": "1",
            "documentation": "A trade represents an individual transaction."
        },
        {
            "name": "Party",
            "type": "complexType",
            "minOccurs": "1",
            "maxOccurs": "unbounded",
            "documentation": "A party involved in the trade."
        }
    ]
}

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  🎯 Why This is Important?
&lt;/h2&gt;

&lt;p&gt;✅ Extracts structured metadata from FPML XSD files&lt;br&gt;
✅ Makes FPML elements easy to search &amp;amp; use in the chatbot&lt;br&gt;
✅ Converts complex XSD files into a simple JSON format&lt;/p&gt;

&lt;p&gt;🚀 Now, your chatbot can dynamically load FPML schema data!&lt;/p&gt;
&lt;h2&gt;
  
  
  💻 How It Works
&lt;/h2&gt;

&lt;p&gt;1️⃣ FPML XSD Data (Extracting from JSON)&lt;br&gt;
The chatbot parses FPML XSD files into structured JSON data. Used the Python code to convert the XSD to JSON, it's inside &lt;code&gt;generator&lt;/code&gt; folder.&lt;br&gt;
Example JSON Structure (merged_xsd_attributes.json):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
  {
    "name": "Trade",
    "type": "complexType",
    "documentation": "Represents a financial trade.",
    "minOccurs": "1",
    "maxOccurs": "1"
  },
  {
    "name": "NotionalAmount",
    "type": "decimal",
    "documentation": "The principal amount of the trade.",
    "minOccurs": "1",
    "maxOccurs": "1"
  }
]

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

&lt;/div&gt;



&lt;p&gt;2️⃣ Implementing Autocomplete &amp;amp; Fuzzy Search&lt;br&gt;
We use Material UI's Autocomplete and fuse.js for fuzzy search.&lt;/p&gt;

&lt;p&gt;🔹 Implementing Fuzzy Search&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Fuse from "fuse.js";
const fuse = new Fuse(xsdElements, { keys: ["label"], threshold: 0.2 });

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

&lt;/div&gt;



&lt;p&gt;🔹 Filtering &amp;amp; Updating Autocomplete&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;Autocomplete
  options={fuse.search(input).map((result) =&amp;gt; result.item)} // Dynamically filter
  getOptionLabel={(option) =&amp;gt; option.label || ""}
  onInputChange={(_, newInputValue) =&amp;gt; setInput(newInputValue)}
  renderInput={(params) =&amp;gt; &amp;lt;TextField {...params} fullWidth placeholder="Search FPML elements..." /&amp;gt;}
  sx={{ width: "70%" }}
/&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;3️⃣ Handling User Messages in the Chatbot&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const handleSend = () =&amp;gt; {
  if (!input.trim()) return;

  const userMessage = { sender: "user", text: input };
  setMessages((prev) =&amp;gt; [...prev, userMessage]);

  const result = fuse.search(input);
  const foundElement = result.length &amp;gt; 0 ? result[0].item : null;

  const responseText = foundElement
    ? `Field Name: ${foundElement.label}\nData Type: ${foundElement.value}\nExplanation:\n${foundElement.documentation}`
    : "No matching field found.";

  setMessages((prev) =&amp;gt; [...prev, { sender: "bot", text: responseText }]);
  setInput("");
};

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  🎨 Full Chatbot UI
&lt;/h2&gt;

&lt;p&gt;This is the final chatbot UI using Material UI:&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;Box sx={{ height: "100vh", display: "flex", flexDirection: "column" }}&amp;gt;
  &amp;lt;AppBar position="static"&amp;gt;
    &amp;lt;Toolbar&amp;gt;
      &amp;lt;Typography variant="h6"&amp;gt;FPML Chatbot&amp;lt;/Typography&amp;gt;
    &amp;lt;/Toolbar&amp;gt;
  &amp;lt;/AppBar&amp;gt;

  &amp;lt;Box sx={{ flex: 1, p: 2, display: "flex", flexDirection: "column" }}&amp;gt;
    &amp;lt;Box ref={chatContainerRef} sx={{ flex: 1, overflowY: "auto", p: 2 }}&amp;gt;
      {messages.map((message, index) =&amp;gt; (
        &amp;lt;Paper key={index} sx={{ p: 2, mb: 2, alignSelf: message.sender === "user" ? "flex-end" : "flex-start" }}&amp;gt;
          &amp;lt;Typography&amp;gt;{message.text}&amp;lt;/Typography&amp;gt;
        &amp;lt;/Paper&amp;gt;
      ))}
    &amp;lt;/Box&amp;gt;

    &amp;lt;Box sx={{ display: "flex", gap: "8px", mt: 2 }}&amp;gt;
      &amp;lt;Autocomplete
        options={fuse.search(input).map((r) =&amp;gt; r.item)}
        getOptionLabel={(option) =&amp;gt; option.label || ""}
        onInputChange={(_, newValue) =&amp;gt; setInput(newValue)}
        renderInput={(params) =&amp;gt; &amp;lt;TextField {...params} fullWidth placeholder="Search FPML elements..." /&amp;gt;}
        sx={{ width: "70%" }}
      /&amp;gt;
      &amp;lt;Button variant="contained" color="primary" onClick={handleSend}&amp;gt;
        Send
      &amp;lt;/Button&amp;gt;
    &amp;lt;/Box&amp;gt;
  &amp;lt;/Box&amp;gt;
&amp;lt;/Box&amp;gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  🤝 Contributing
&lt;/h2&gt;

&lt;p&gt;Want to improve this chatbot? Follow these steps:&lt;/p&gt;

&lt;p&gt;1️⃣ Fork the Repository&lt;br&gt;
Go to &lt;a href="https://github.com/uttesh/fpml-chatbot" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt; and click Fork.&lt;/p&gt;

&lt;p&gt;2️⃣ Clone the Repo&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/uttesh/fpml-chatbot.git
cd fpml-chatbot

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

&lt;/div&gt;



&lt;p&gt;3️⃣ Create a New Branch&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout -b feature-new-improvement

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

&lt;/div&gt;



&lt;p&gt;4️⃣ Make Changes &amp;amp; Push&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m "Added new feature"
git push origin feature-new-improvement

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

&lt;/div&gt;



&lt;p&gt;5️⃣ Create a Pull Request&lt;br&gt;
Go to GitHub → Click Pull Request → Submit your changes! 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Start Using the FPML Chatbot Today!
&lt;/h2&gt;

&lt;p&gt;Try it now: &lt;a href="http://uttesh.com/fpml-chatbot/" rel="noopener noreferrer"&gt;Live Chatbot&lt;/a&gt;&lt;br&gt;
Star the repo ⭐: &lt;a href="https://github.com/uttesh/fpml-chatbot" rel="noopener noreferrer"&gt;GitHub Repository&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%2Fey2vvc7yudgr13hyc7bw.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%2Fey2vvc7yudgr13hyc7bw.png" alt="Image description" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;This FPML chatbot simplifies working with financial schema data. With fuzzy search, Material UI, and GitHub Pages hosting, it's a powerful yet simple tool for developers and financial analysts.&lt;/p&gt;

&lt;p&gt;💬 Have ideas for improvements? Let’s collaborate! 🚀😊&lt;/p&gt;

</description>
      <category>fpml</category>
      <category>react</category>
      <category>github</category>
    </item>
    <item>
      <title>Building a Kafka Dashboard with React, TypeScript, and KafkaJS</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Wed, 12 Mar 2025 17:13:15 +0000</pubDate>
      <link>https://dev.to/utteshkumar/building-a-kafka-dashboard-with-react-typescript-and-kafkajs-3i8l</link>
      <guid>https://dev.to/utteshkumar/building-a-kafka-dashboard-with-react-typescript-and-kafkajs-3i8l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today's data-driven world, real-time message processing is a crucial component of many applications. &lt;strong&gt;Apache Kafka&lt;/strong&gt; is one of the most powerful distributed streaming platforms, but monitoring and interacting with Kafka messages can be challenging. We built This simple tool a &lt;strong&gt;Kafka Dashboard&lt;/strong&gt;—an OpenSource web application allowing users to publish, consume, and monitor Kafka messages with an interactive and user-friendly interface for developer testing, Instead of depending on the external IDE plugin.&lt;/p&gt;

&lt;p&gt;This blog will walk you through the &lt;strong&gt;features, architecture, and technology stack&lt;/strong&gt; of this project.🚀&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ What is the Kafka Dashboard?
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Kafka Dashboard&lt;/strong&gt; is a &lt;strong&gt;React + TypeScript + Material UI&lt;/strong&gt; web application designed to simplify Kafka interactions. It provides a &lt;strong&gt;real-time&lt;/strong&gt; interface to monitor Kafka topics, partitions, consumer groups, and metadata in an intuitive format.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔥 Key Features:
&lt;/h3&gt;

&lt;p&gt;✅ &lt;strong&gt;Publish &amp;amp; Consume Kafka Messages&lt;/strong&gt; in real-time\&lt;br&gt;
✅ &lt;strong&gt;Monitor Kafka Topics, Partitions, Offsets, and Keys&lt;/strong&gt;\&lt;br&gt;
✅ &lt;strong&gt;Live Kafka Metadata Updates&lt;/strong&gt; (Brokers, Consumer Groups, etc.)\&lt;br&gt;
✅ &lt;strong&gt;Dark Mode Toggle&lt;/strong&gt; with theme persistence\&lt;br&gt;
✅ &lt;strong&gt;Pagination &amp;amp; Column Filtering&lt;/strong&gt; for message browsing\&lt;br&gt;
✅ &lt;strong&gt;Configurable Kafka Server Settings&lt;/strong&gt; directly from the UI\&lt;br&gt;
✅ &lt;strong&gt;Modern UI with Curved Corners &amp;amp; Responsive Design&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🎨 UI Preview:
&lt;/h3&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%2Fez1x8r28an9xq4v3u6lb.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%2Fez1x8r28an9xq4v3u6lb.png" alt="Image description" width="800" height="590"&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%2F1h7t8eqzqagp4poqj333.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%2F1h7t8eqzqagp4poqj333.png" alt="Image description" width="800" height="592"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Tech Stack &amp;amp; Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Frontend (React + TypeScript)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The front end is built with &lt;strong&gt;React, TypeScript, and Material UI&lt;/strong&gt;, ensuring a modern, responsive, and maintainable UI.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Material UI (MUI)&lt;/strong&gt; for a polished and professional UI&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Backend (Node.js + Express + KafkaJS)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The backend leverages &lt;strong&gt;KafkaJS&lt;/strong&gt;, a native Kafka client for Node.js, to handle message production and consumption.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Express.js&lt;/strong&gt; serves the API endpoints&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KafkaJS&lt;/strong&gt; manages Kafka producer and consumer functionalities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Compose&lt;/strong&gt; runs Kafka in a containerized environment without Zookeeper&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Kafka Integration&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Publish messages&lt;/strong&gt; to a Kafka topic with keys and partitions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consume messages&lt;/strong&gt; from multiple topics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fetch metadata&lt;/strong&gt; like partitions, offsets, and consumer groups&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor Kafka cluster health&lt;/strong&gt; and broker information&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📌 How to Set Up &amp;amp; Use the Kafka Dashboard
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Clone the Repository&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/uttesh/kafkaclient.git
&lt;span class="nb"&gt;cd &lt;/span&gt;kafkaclient
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: Start Kafka using Docker Compose&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3: Install Dependencies&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install frontend dependencies&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;client
npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Install backend dependencies&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ../server
npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 4: Run the Application&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start the server&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;server
npm run dev

&lt;span class="c"&gt;# Start the frontend&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;client
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The app will be available at &lt;strong&gt;&lt;code&gt;http://localhost:3000&lt;/code&gt;&lt;/strong&gt; 🚀&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Contributing &amp;amp; Next Steps
&lt;/h2&gt;

&lt;p&gt;Want to contribute? Here’s what’s next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📊 &lt;strong&gt;Real-time WebSocket Updates&lt;/strong&gt; for messages&lt;/li&gt;
&lt;li&gt;📉 &lt;strong&gt;Kafka Metrics &amp;amp; Charts&lt;/strong&gt; for visualization&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Custom Kafka Retention Policies &amp;amp; Alerts&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Join the Discussion!&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;📌 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/uttesh/kafkaclient" rel="noopener noreferrer"&gt;github.com/uttesh/kafkaclient&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;🚀 &lt;strong&gt;Start using the Kafka Dashboard today and take your Kafka monitoring to the next level!&lt;/strong&gt; 🎉&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>kafkaclient</category>
      <category>github</category>
      <category>react</category>
    </item>
    <item>
      <title>Carbon Credits: The Future of Sustainable Development for 2040!</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Sun, 22 Dec 2024 06:30:21 +0000</pubDate>
      <link>https://dev.to/utteshkumar/carbon-credits-the-future-of-sustainable-development-for-2040-2bc7</link>
      <guid>https://dev.to/utteshkumar/carbon-credits-the-future-of-sustainable-development-for-2040-2bc7</guid>
      <description>&lt;p&gt;As the world faces the growing challenges of climate change, the concept of carbon credits has emerged as a practical solution to curb greenhouse gas (GHG) emissions. This system helps combat environmental issues and opens doors to exciting career opportunities and innovations. &lt;/p&gt;

&lt;p&gt;Let’s explore what carbon credits are, their future potential, job prospects, and some real-world examples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are Carbon Credits?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A carbon credit represents the right to emit one metric ton of carbon dioxide or its equivalent. Organizations or individuals can purchase these credits to offset their emissions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;br&gt;
Companies engaged in activities that release GHGs can buy credits from projects that reduce or capture carbon, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reforestation projects&lt;/li&gt;
&lt;li&gt;Renewable energy projects (solar, wind)&lt;/li&gt;
&lt;li&gt;Methane capture from landfills&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This creates a market-driven approach to reducing global carbon emissions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of Carbon Credits
&lt;/h2&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%2F0mkdzr9d3qh0t8au72tk.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%2F0mkdzr9d3qh0t8au72tk.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Global Adoption:&lt;/strong&gt;&lt;br&gt;
As countries aim for net-zero emissions, carbon markets are becoming integral to national and corporate strategies. The demand for carbon credits is expected to grow exponentially.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technological Integration:&lt;/strong&gt;&lt;br&gt;
Emerging technologies like blockchain are being used to improve transparency in carbon trading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Corporate Responsibility:&lt;/strong&gt;&lt;br&gt;
Companies increasingly invest in carbon credits to enhance their sustainability profiles and meet consumer expectations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Regulatory Frameworks:&lt;/strong&gt;&lt;br&gt;
Governments are implementing stricter policies on emissions, pushing industries to participate in carbon markets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Job Opportunities in the Carbon Credit Ecosystem
&lt;/h2&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%2Fwfqqty5fext78628dmm7.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%2Fwfqqty5fext78628dmm7.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
The growing carbon credit market has created numerous job roles, including:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Carbon Credit Analysts&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Responsibilities&lt;/strong&gt;: Assess the validity and impact of carbon offset projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt;: Environmental science, data analysis, financial modelling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Sustainability Consultants&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Responsibilities&lt;/strong&gt;: Guide companies on reducing emissions and purchasing credits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt;: Knowledge of GHG protocols, and corporate sustainability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Project Developers&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Responsibilities&lt;/strong&gt;: Design and implement carbon offset projects (e.g., forest restoration, clean energy).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt;: Project management, environmental engineering.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Policy Advisors&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Responsibilities&lt;/strong&gt;: Develop frameworks to govern carbon trading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt;: Law, policy analysis, international relations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Blockchain Developers for Carbon Markets&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Responsibilities&lt;/strong&gt;: Build platforms for secure carbon trading using blockchain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt;: Blockchain programming, smart contract development.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Examples
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Tesla's Carbon Credit Revenue&lt;/strong&gt;&lt;br&gt;
Tesla generates significant revenue by selling carbon credits to other automakers that exceed their emission limits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Amazon’s Climate Pledge Fund&lt;/strong&gt;&lt;br&gt;
Amazon invests in carbon reduction projects to achieve its net-zero goal by 2040.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Community-Based Projects&lt;/strong&gt;&lt;br&gt;
Initiatives in countries like India and Kenya focus on reforestation and sustainable agriculture, generating credits for global buyers while empowering local communities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Carbon Credits for Everyone: A Futuristic Solution for Sustainable Living
&lt;/h2&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%2Fhpi7yt7vvxth5k18syhg.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%2Fhpi7yt7vvxth5k18syhg.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Shortly, carbon credits won’t just be the domain of large corporations or industrial players. Imagine a world where individuals, including car owners and everyday consumers, actively participate in carbon credit trading. This visionary approach could revolutionize sustainability by incentivizing eco-friendly behaviour and empowering individuals to reduce their carbon footprints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Carbon Credits Could Work for Individuals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Government-Imposed Carbon Limits&lt;/strong&gt;&lt;br&gt;
Each individual or household could be allocated a specific number of carbon credits annually, determined by their carbon footprint and national sustainability goals.&lt;/p&gt;

&lt;p&gt;For example, driving a car, using electricity, or even air travel would consume some of these credits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Tracking Carbon Emissions&lt;/strong&gt;&lt;br&gt;
Personal carbon tracking apps linked to vehicles, smart devices, and utility systems could calculate emissions in real time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: A smart app tracks how much carbon your car emits during daily commutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Trading Carbon Credits&lt;/strong&gt;&lt;br&gt;
If you emit less than your allotted credits, you could sell the surplus to others who exceed their limits. Conversely, you’d need to buy additional credits if you exceed your allocation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A city commuter using public transport sells unused vehicle credits to someone driving a high-emission SUV.&lt;/li&gt;
&lt;li&gt;A solar-powered home earns credits that can be traded with neighbours who rely on grid electricity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Futuristic Solutions to Facilitate Individual Carbon Credit Trading&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Blockchain-Powered Carbon Markets&lt;/strong&gt;&lt;br&gt;
Blockchain could enable secure, transparent, and decentralized platforms where individuals trade carbon credits seamlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Carbon Credit Wallets&lt;/strong&gt;&lt;br&gt;
Every citizen could have a carbon wallet linked to their lifestyle choices.&lt;/p&gt;

&lt;p&gt;Credits are deducted for emissions, and surplus credits are added when adopting sustainable practices like using electric vehicles or planting trees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Government and Retail Incentives&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retail Partnerships: Stores and brands could reward shoppers with carbon credits for buying sustainable products.&lt;/li&gt;
&lt;li&gt;Government Subsidies: Tax breaks or financial incentives for citizens with surplus carbon credits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real-World Inspiration: Carbon Credits for Individuals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Singapore’s Carbon Tax Model&lt;/strong&gt;&lt;br&gt;
Singapore imposes a carbon tax on large emitters, with plans to expand individual participation through energy-efficient initiatives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Tesla's Model of Renewable Benefits&lt;/strong&gt;&lt;br&gt;
Owners of Tesla vehicles indirectly contribute to reducing emissions, showcasing how individuals can align with carbon-neutral goals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. UK's Personal Carbon Allowance Pilot&lt;/strong&gt;&lt;br&gt;
The UK explored a personal carbon allowance system, where individuals received carbon credits and could trade or save them based on their lifestyle choices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: Paving the Way to a Carbon-Neutral Society&lt;br&gt;
The concept of individual carbon credit trading brings sustainability into the hands of every citizen. By leveraging technology, government policies, and market forces, we can create a world where sustainable living is not just a choice but a rewarding lifestyle.&lt;/p&gt;

&lt;p&gt;This futuristic approach could transform the way we perceive and tackle climate change.&lt;/p&gt;

&lt;p&gt;A sample application which calculates carbon footprint: &lt;a href="https://github.com/uttesh/carbon-footprint" rel="noopener noreferrer"&gt;source-code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo: &lt;a href="http://uttesh.com/carbon-footprint/" rel="noopener noreferrer"&gt;link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;references:&lt;br&gt;
&lt;a href="https://www.investopedia.com/terms/c/carbontrade.asp" rel="noopener noreferrer"&gt;https://www.investopedia.com/terms/c/carbontrade.asp&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.investopedia.com/carbon-markets-7972128" rel="noopener noreferrer"&gt;https://www.investopedia.com/carbon-markets-7972128&lt;/a&gt;&lt;/p&gt;

</description>
      <category>carboncredit</category>
      <category>carbontrading</category>
      <category>futurejobs</category>
    </item>
    <item>
      <title>Java + Cucumber + Generator: Automating Step Definition Creation</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Sat, 23 Nov 2024 10:33:22 +0000</pubDate>
      <link>https://dev.to/utteshkumar/java-cucumber-generator-automating-step-definition-creation-ban</link>
      <guid>https://dev.to/utteshkumar/java-cucumber-generator-automating-step-definition-creation-ban</guid>
      <description>&lt;p&gt;This is an advanced automation approach for generating step definitions in Java using Cucumber. Let's generate step classes using the Mustache templates and Gradle tasks to simplify and streamline the creation of step definition classes for your Cucumber feature files. This approach is for developers who want to eliminate boilerplate code and focus on building robust test automation frameworks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Cucumber and Java
&lt;/h2&gt;

&lt;p&gt;Cucumber is a popular testing tool that bridges the gap between technical and non-technical teams. It uses Behavior-Driven Development (BDD) principles to define application behaviour in plain English. However, writing step definition classes for each feature file can become repetitive and time-consuming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Automate Step Definitions?
&lt;/h2&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%2Fc0ayqfdcd5dzighye46c.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%2Fc0ayqfdcd5dzighye46c.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Manual creation of step definitions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires developers to repetitively translate feature file scenarios into methods.&lt;/li&gt;
&lt;li&gt;Can lead to errors or inconsistencies in naming and structure.&lt;/li&gt;
&lt;li&gt;Slows down the development process for large-scale projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Automating this process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Saves time by generating classes dynamically.&lt;/li&gt;
&lt;li&gt;Ensures consistency across all step definitions.&lt;/li&gt;
&lt;li&gt;Makes the framework scalable and maintainable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step-by-Step Explanation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Parse the Feature File
&lt;/h3&gt;

&lt;p&gt;The first step involves reading the feature file and extracting scenarios and steps. Each scenario is broken down into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scenario title&lt;/li&gt;
&lt;li&gt;Steps (Given, When, Then, etc.)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private static List&amp;lt;ScenarioData&amp;gt; parseFeatureFile(String featureFilePath) throws IOException {
    List&amp;lt;ScenarioData&amp;gt; scenarios = new ArrayList&amp;lt;&amp;gt;();
    List&amp;lt;String&amp;gt; currentSteps = new ArrayList&amp;lt;&amp;gt;();
    String currentScenario = null;

    try (BufferedReader reader = new BufferedReader(new FileReader(featureFilePath))) {
        String line;
        while ((line = reader.readLine()) != null) {
            line = line.trim();
            if (line.startsWith("Scenario:")) {
                if (currentScenario != null) {
                    scenarios.add(new ScenarioData(currentScenario, new ArrayList&amp;lt;&amp;gt;(currentSteps)));
                    currentSteps.clear();
                }
                currentScenario = line.substring("Scenario:".length()).trim();
            } else if (line.matches("^(Given|When|Then|And|But) .+")) {
                currentSteps.add(line);
            }
        }
        if (currentScenario != null) {
            scenarios.add(new ScenarioData(currentScenario, currentSteps));
        }
    }
    return scenarios;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Use Mustache Template for Class Generation
&lt;/h3&gt;

&lt;p&gt;With scenarios extracted, each scenario is used to generate a corresponding Java class. Mustache templates define how each class and its methods are structured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Template Example (StepDefinition.mustache):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package {{packageName}};

import io.cucumber.java.en.*;

public class {{className}} {

{{#methods}}
    @{{stepType}}("^{{stepText}}$")
    public void {{methodName}}() {
        // TODO: Implement step: {{stepText}}
    }
{{/methods}}
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Generate Java Classes
&lt;/h3&gt;

&lt;p&gt;Each scenario is passed through the Mustache template, and the output is saved as a .java file in the designated directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Snippet:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private static void generateStepDefinition(ScenarioData scenario, String outputFilePath, String className) throws IOException {
    List&amp;lt;Map&amp;lt;String, String&amp;gt;&amp;gt; methods = extractStepDefinitions(scenario.getSteps());
    Map&amp;lt;String, Object&amp;gt; templateData = new HashMap&amp;lt;&amp;gt;();
    templateData.put("packageName", "com.example.steps");
    templateData.put("className", className);
    templateData.put("methods", methods);

    String templateFile = "src/main/resources/templates/StepDefinition.mustache";
    renderTemplate(templateFile, outputFilePath, templateData);
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Automate the Process with Gradle
&lt;/h3&gt;

&lt;p&gt;Integrate the generator into your Gradle build process to automate step definition creation. A Gradle task is defined to invoke the generator with feature file paths.&lt;/p&gt;

&lt;p&gt;Gradle Task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tasks.register("generateStepDefinitions", JavaExec) {
    group = "custom"
    description = "Generates step definition classes from feature files."
    mainClass = "com.example.CucumberStepGenerator"
    classpath = sourceSets.main.runtimeClasspath
    args = [
        "src/test/resources/features/sample.feature",
        "src/test/java/com/example/steps"
    ]
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Benefits of Using a Generator
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Time-Saving:&lt;/strong&gt; Reduces manual effort in creating step definitions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistency:&lt;/strong&gt; Ensures uniform formatting and naming conventions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; Easily adapts to large projects with multiple feature files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizability:&lt;/strong&gt; Modify templates to match your specific requirements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Source Code Github: &lt;a href="https://github.com/uttesh/cucumber-step-generator" rel="noopener noreferrer"&gt;https://github.com/uttesh/cucumber-step-generator&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%2Fszfbscac4biyfkx1vefa.gif" 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%2Fszfbscac4biyfkx1vefa.gif" alt="Image description" width="500" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
By combining Cucumber, Java, and Mustache templates, you can revolutionize the way step definitions are generated in your projects. This approach is a game-changer for teams working with BDD frameworks, enabling them to focus on test logic rather than repetitive setup tasks.&lt;/p&gt;

&lt;p&gt;Stay tuned for more advanced topics on test automation!&lt;/p&gt;

</description>
      <category>java</category>
      <category>cucumber</category>
      <category>code</category>
    </item>
    <item>
      <title>Java 21 Virtual Threads: Revolutionizing Concurrency!</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Sat, 02 Nov 2024 07:23:09 +0000</pubDate>
      <link>https://dev.to/utteshkumar/java-21-virtual-threads-revolutionizing-concurrency-1li0</link>
      <guid>https://dev.to/utteshkumar/java-21-virtual-threads-revolutionizing-concurrency-1li0</guid>
      <description>&lt;p&gt;Java 21 introduces a game-changer &lt;strong&gt;Virtual Threads&lt;/strong&gt;! Let's break down what this feature is, how it differs from the traditional model, and its pros and cons.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Virtual Threads?
&lt;/h2&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%2F2h1p4iw08x0ixgc8eeay.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%2F2h1p4iw08x0ixgc8eeay.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
In previous versions of Java, creating a thread meant tying it directly to an operating system (OS) thread, which is a limited resource. Spinning up a large number of OS threads often led to performance bottlenecks and increased memory usage. With Java 21, Virtual Threads (a.k.a. Project Loom) aim to solve this by offering lightweight, manageable threads that are decoupled from OS threads.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🤔 Simply put: Think of virtual threads as micro-sized threads that allow you to handle thousands of concurrent tasks more efficiently without hogging system resources.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  The Old Thread Model vs. Virtual Threads
&lt;/h2&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%2Fpmcjya7jovo9ll7bodov.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%2Fpmcjya7jovo9ll7bodov.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
Java's old thread model, based on "platform threads," required each Java thread to have a 1:1 mapping to an OS thread. While reliable, it also meant:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory Limitations:&lt;/strong&gt; Platform threads took up significant memory.&lt;br&gt;
Scaling Issues: Managing a high number of threads could overload system resources.&lt;br&gt;
&lt;strong&gt;Blocking I/O Problems:&lt;/strong&gt; OS threads waiting on I/O blocked other operations, slowing performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enter Virtual Threads!&lt;/strong&gt; 🦸‍♂️&lt;br&gt;
Virtual Threads allow you to create millions of threads without resource strain. They're not bound to OS threads, so when a virtual thread is blocked (e.g., waiting for I/O), the underlying carrier thread can pick up another virtual thread to keep things running smoothly.&lt;/p&gt;


&lt;h2&gt;
  
  
  Traditional Threads vs. Virtual Threads
&lt;/h2&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%2Fsa2t1z53tahtjhq5cyb4.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%2Fsa2t1z53tahtjhq5cyb4.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TRADITIONAL THREADS                        VIRTUAL THREADS
---------------------------------          ---------------------------------
| Java Thread -&amp;gt; OS Thread -&amp;gt; Task |       | Virtual Thread -&amp;gt; Carrier OS Thread |
| Java Thread -&amp;gt; OS Thread -&amp;gt; Task |  -&amp;gt;   | Virtual Thread -&amp;gt; Carrier OS Thread |
| Java Thread -&amp;gt; OS Thread -&amp;gt; Task |       | Virtual Thread -&amp;gt; Carrier OS Thread |
---------------------------------          ---------------------------------

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

&lt;/div&gt;






&lt;blockquote&gt;
&lt;p&gt;In Virtual Threads, multiple virtual threads can be assigned to one OS thread, optimizing resource allocation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Pros and Cons of Virtual Threads
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Higher Scalability:&lt;/strong&gt; Handle millions of threads, making it perfect for server-side applications.&lt;br&gt;
&lt;strong&gt;Less Memory Usage:&lt;/strong&gt; Virtual threads are lightweight, meaning each one doesn’t require a full OS thread.&lt;br&gt;
&lt;strong&gt;Efficient Blocking I/O:&lt;/strong&gt; When virtual threads encounter blocking I/O, carrier threads can pick up other tasks, keeping the system active.&lt;br&gt;
&lt;strong&gt;Better Resource Management:&lt;/strong&gt; Threads are no longer restricted to a limited pool of OS threads, so fewer resources are wasted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning Curve:&lt;/strong&gt; Virtual threads introduce new concurrency concepts which may require rethinking existing thread management practices.&lt;br&gt;
&lt;strong&gt;New Debugging Challenges:&lt;/strong&gt; Debugging thousands (or even millions) of virtual threads can be more complex.&lt;br&gt;
&lt;strong&gt;Not Ideal for All Applications:&lt;/strong&gt; Single-threaded applications or those with minimal concurrency won’t benefit much from virtual threads.&lt;/p&gt;


&lt;h2&gt;
  
  
  Code Example: Traditional vs. Virtual Threads
&lt;/h2&gt;

&lt;p&gt;Let’s look at a simple example of traditional threads and compare it to virtual threads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional Threads&lt;/strong&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 TraditionalThreadExample {
    public static void main(String[] args) {
        Thread thread = new Thread(() -&amp;gt; System.out.println("Hello from a traditional thread!"));
        thread.start();
    }
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Virtual Threads (Java 21)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Virtual Threads are managed independently by the Java Virtual Machine (JVM) and aren’t limited to OS threads.&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 VirtualThreadExample {
    public static void main(String[] args) {
        Thread.startVirtualThread(() -&amp;gt; System.out.println("Hello from a virtual thread!"));
    }
}

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

&lt;/div&gt;



&lt;p&gt;sample example of running 100000 tasks using the platform and virtual threads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package virtualthreads.samples;

import java.time.Duration;
import java.time.Instant;
import java.util.concurrent.Executors;
import java.util.stream.IntStream;

public class PlatformVsVirtualThreadsSamples {

    public static void main(String[] args) {
        PlatformVsVirtualThreadsSamples platformVsVirtualThreadsSamples = new PlatformVsVirtualThreadsSamples();
        platformVsVirtualThreadsSamples.platformThreadsExecution();
        platformVsVirtualThreadsSamples.virtualThreadsExecution();
    }
    public void platformThreadsExecution(){
        var begin = Instant.now();
        try(var executor = Executors.newCachedThreadPool()){
            IntStream.range(0,100_000).forEach(i-&amp;gt; executor.submit(() -&amp;gt; {
                Thread.sleep(Duration.ofSeconds(1));
                return i;
            }));
        }
        var end = Instant.now();
        System.out.println("platformThreadsExecution : Duration of execution: "+Duration.between(begin,end));
    }
    public void virtualThreadsExecution(){
        var begin = Instant.now();
        try(var executor = Executors.newVirtualThreadPerTaskExecutor()){
            IntStream.range(0,100_000).forEach(i-&amp;gt; executor.submit(() -&amp;gt; {
                Thread.sleep(Duration.ofSeconds(1));
                return i;
            }));
        }
        var end = Instant.now();
        System.out.println("virtualThreadsExecution : Duration of execution: "+Duration.between(begin,end));
    }
}



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

&lt;/div&gt;






&lt;h2&gt;
  
  
  When Should You Use Virtual Threads?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server Applications&lt;/strong&gt;: Handling multiple simultaneous requests, such as web servers or database connections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I/O-Bound Applications&lt;/strong&gt;: These are especially applications with heavy I/O operations like file processing, network requests, or web scraping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-native Microservices&lt;/strong&gt;: Systems requiring high scalability will benefit from virtual threads.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: The Future of Concurrency is Here 🌟&lt;/p&gt;

&lt;p&gt;With the introduction of virtual threads in Java 21, managing concurrent tasks is more efficient, scalable, and lightweight than ever. Whether you’re handling hundreds or millions of tasks, virtual threads provide a pathway to a simpler and more resource-friendly way of programming in Java.&lt;/p&gt;

</description>
      <category>java</category>
      <category>virtualmachine</category>
    </item>
    <item>
      <title>Apache Airflow WorkFlow Bots</title>
      <dc:creator>uttesh</dc:creator>
      <pubDate>Sat, 09 Mar 2024 16:09:39 +0000</pubDate>
      <link>https://dev.to/utteshkumar/apache-airflow-workflow-bots-43fd</link>
      <guid>https://dev.to/utteshkumar/apache-airflow-workflow-bots-43fd</guid>
      <description>&lt;p&gt;We have reached an advanced technological stage where small blocks of code can be assembled into simple bots, providing functionality that aids in building full workflows without the need for writing bulky monolithic applications or microservices.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is WorkFlow?
&lt;/h2&gt;

&lt;p&gt;Workflows offer significant advantages over traditional coding methods. With workflows, we can create blocks of code using different languages or libraries, string them together, and orchestrate their execution to fulfil business requirements.&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%2F3gcthb88r87rzxhwclaz.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%2F3gcthb88r87rzxhwclaz.png" alt="workflow" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are several open-source solutions available for workflow execution.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apache NiFi (Java)&lt;/li&gt;
&lt;li&gt;Apache AirFlow (Python)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today, we'll delve into Apache Airflow and explore its real-time workflow implementation to kickstart our learning journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  pre-requisites
&lt;/h2&gt;

&lt;p&gt;docker, docker-compose&lt;br&gt;
python, pip&lt;br&gt;
vs code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usercase&lt;/strong&gt;: Every morning at 9 am, the latest price list of selected stock prices will be sent via email or SMS.&lt;/p&gt;

&lt;p&gt;To achieve this, two functions need to be created:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fetch Stock Price of Listed Stocks:&lt;/strong&gt; This function will retrieve the latest stock prices of the selected stocks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Send Email with the Stock Price Response:&lt;/strong&gt; This function will compose an email containing the fetched stock prices and send it to the designated recipients.&lt;/p&gt;

&lt;p&gt;These functions will automate the process of fetching stock prices and delivering them to users' inboxes or mobile phones, ensuring they stay updated with the latest market information.&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%2Fw60p48b0j381y3r7083k.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%2Fw60p48b0j381y3r7083k.png" alt="Workflow of stock price and email notification" width="800" height="457"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import yfinance as yf
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from datetime import datetime

# Function to fetch stock prices
def get_stock_prices(symbols):
    stock_data = yf.download(symbols, period="1d")["Close"]
    return stock_data

# Function to send email
def send_email(subject, body, recipients):
    sender_email = "your_email@gmail.com"
    sender_password = "your_email_password"

    msg = MIMEMultipart()
    msg["From"] = sender_email
    msg["To"] = ", ".join(recipients)
    msg["Subject"] = subject

    msg.attach(MIMEText(body, "plain"))

    with smtplib.SMTP("smtp.gmail.com", 587) as server:
        server.starttls()
        server.login(sender_email, sender_password)
        server.sendmail(sender_email, recipients, msg.as_string())

# Main function
def main():
    # Define stock symbols
    symbols = ["AAPL", "MSFT", "GOOGL", "AMZN"]

    # Fetch stock prices
    stock_prices = get_stock_prices(symbols)

    # Format email message
    subject = "Daily Stock Prices - {}".format(datetime.now().strftime("%Y-%m-%d"))
    body = "Today's Stock Prices:\n\n{}".format(stock_prices)

    # Define email recipients
    recipients = ["recipient1@example.com", "recipient2@example.com"]

    # Send email
    send_email(subject, body, recipients)

# Execute main function
if __name__ == "__main__":
    main()

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

&lt;/div&gt;



&lt;p&gt;Now we need make these function are part of the AirFlow workflow. Before that we will explore the structure and features of the &lt;strong&gt;Apache AirFlow&lt;/strong&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%2F84vfluwtojuale0g72zf.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%2F84vfluwtojuale0g72zf.png" alt="Apache AirFlow" width="362" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br&gt;
Apache Airflow has revolutionized the way organizations manage, schedule, and monitor their data workflows and monitoring workflows as Directed Acyclic Graphs (DAGs). With Airflow, users can define workflows as code, making it easy to manage, version control, and collaborate on data pipelines.&lt;/p&gt;
&lt;h2&gt;
  
  
  Key Features of Apache Airflow:
&lt;/h2&gt;

&lt;p&gt;Dynamic Workflow Definition: Airflow allows users to define workflows as code using Python. This enables dynamic and flexible workflow definitions, making it easy to create, modify, and extend pipelines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependency Management:&lt;/strong&gt; Airflow handles dependencies between tasks within a workflow, ensuring that tasks are executed in the correct order based on their dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scheduling:&lt;/strong&gt; Airflow provides powerful scheduling capabilities, allowing users to define complex scheduling patterns using cron-like expressions. This enables users to schedule workflows to run at specific times or intervals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring and Alerting:&lt;/strong&gt; Airflow comes with a built-in web interface for monitoring workflow execution, tracking task status, and viewing logs. It also supports integration with external monitoring and alerting tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extensibility:&lt;/strong&gt; Airflow is highly extensible, with a rich ecosystem of plugins and integrations. Users can easily extend Airflow's functionality by developing custom operators, sensors, and hooks.&lt;/p&gt;

&lt;p&gt;Integrating the Sample with AirFlow&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-time Stock Price Checking and Email Notification Workflow with Apache Airflow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this use case, we'll create an Apache Airflow &lt;code&gt;DAG&lt;/code&gt; (&lt;strong&gt;Directed Acyclic Graph&lt;/strong&gt;) to check real-time stock prices every morning at 9 AM and send an email notification with the latest stock prices to predefined recipients. We'll use the yfinance library for fetching stock prices and the smtplib library for sending emails.&lt;/p&gt;
&lt;h2&gt;
  
  
  Workflow Steps:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Fetch Stock Prices:&lt;/strong&gt; At 9 AM every morning, the DAG will trigger a task to fetch real-time stock prices for predefined stocks using the &lt;code&gt;yfinance&lt;/code&gt; library.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Format Email:&lt;/strong&gt; After fetching the stock prices, the DAG will trigger a task to format the data into an email message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Send Email:&lt;/strong&gt; The DAG will trigger a task to send an email containing the latest stock prices to predefined recipients using the &lt;code&gt;smtplib&lt;/code&gt; library.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sample Code (Apache Airflow DAG):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from datetime import datetime
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
import yfinance as yf
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'start_date': datetime(2024, 3, 1),
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 1
}

dag = DAG(
    'stock_price_notification',
    default_args=default_args,
    description='Check real-time stock prices and send email notification',
    schedule_interval='0 9 * * *'  # Run every day at 9 AM
)

def get_stock_prices():
    symbols = ["AAPL", "MSFT", "GOOGL", "AMZN"]
    stock_data = yf.download(symbols, period="1d")["Close"]
    return stock_data

def send_email(subject, body, recipients):
    sender_email = "your_email@gmail.com"
    sender_password = "your_email_password"

    msg = MIMEMultipart()
    msg["From"] = sender_email
    msg["To"] = ", ".join(recipients)
    msg["Subject"] = subject

    msg.attach(MIMEText(body, "plain"))

    with smtplib.SMTP("smtp.gmail.com", 587) as server:
        server.starttls()
        server.login(sender_email, sender_password)
        server.sendmail(sender_email, recipients, msg.as_string())

def process_stock_prices():
    stock_prices = get_stock_prices()
    subject = "Daily Stock Prices - {}".format(datetime.now().strftime("%Y-%m-%d"))
    body = "Today's Stock Prices:\n\n{}".format(stock_prices)
    recipients = ["recipient1@example.com", "recipient2@example.com"]
    send_email(subject, body, recipients)

fetch_stock_prices_task = PythonOperator(
    task_id='fetch_stock_prices',
    python_callable=get_stock_prices,
    dag=dag
)

send_email_task = PythonOperator(
    task_id='send_email',
    python_callable=process_stock_prices,
    dag=dag
)

fetch_stock_prices_task &amp;gt;&amp;gt; send_email_task

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build and Run Instructions
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Clone this repository:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; git clone https://github.com/uttesh/airflow.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run the following command to build and start the Docker containers:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; docker-compose up -d --build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Access the Apache Airflow UI at &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt; in your browser. The default account has the login airflow and the password airflow.&lt;/p&gt;

&lt;p&gt;In the Airflow UI, enable the stock_price_notification DAG and trigger a manual run.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Home Page&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%2Fa6lloxujvokw4ewmc9du.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%2Fa6lloxujvokw4ewmc9du.png" alt="DAGs" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;WorkFlow &lt;br&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%2Fbubw02koh2hu3kzsft7s.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%2Fbubw02koh2hu3kzsft7s.png" alt="WorkFlow" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bot logs&lt;/p&gt;&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%2F9epl3xeh5mwydu173g02.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%2F9epl3xeh5mwydu173g02.png" alt="logs" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Advance Realtime workflow samples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Event Processing:&lt;/strong&gt; A DAG that listens to a message queue (e.g., Apache Kafka) for incoming events, processes each event, and takes appropriate actions based on event content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring and Alerting:&lt;/strong&gt; A DAG that continuously monitors system metrics (e.g., CPU usage, memory usage) using monitoring tools (e.g., Prometheus, Grafana), and sends alerts via email or messaging service (e.g., Slack) when thresholds are exceeded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Streaming and ETL:&lt;/strong&gt; A DAG that consumes data from a streaming source (e.g., Apache Kafka, AWS Kinesis), applies real-time transformations using Apache Spark or Apache Flink, and loads the transformed data into a data store (e.g., Apache Hadoop, Apache Cassandra).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-time Model Inference:&lt;/strong&gt; A DAG that listens to incoming data streams, applies pre-trained machine learning models using libraries like TensorFlow Serving or PyTorch Serve, and returns real-time predictions or classifications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Scraping and Data Extraction:&lt;/strong&gt; A DAG that periodically fetches data from web APIs, extracts relevant information using web scraping tools (e.g., BeautifulSoup, Scrapy), and stores the extracted data in a database or data warehouse for further analysis.&lt;/p&gt;

&lt;p&gt;These are just a few examples of how Apache Airflow can be used for real-time workflows. Depending on your use case and requirements, you can customize and extend these sample workflows to fit your specific needs. Remember to consider scalability, fault tolerance, and resource management when designing real-time workflows in Apache Airflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Apache Airflow is a game-changer in the world of data engineering, providing a flexible, scalable, and robust platform for orchestrating data workflows. Whether you're a data engineer, data scientist, or business analyst, Apache Airflow is a awsome tool in your data toolkit. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Source Code: *&lt;/em&gt; &lt;a href="https://github.com/uttesh/airflow" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://github.com/uttesh/airflow" rel="noopener noreferrer"&gt;https://github.com/uttesh/airflow&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apacheairflow</category>
      <category>python</category>
      <category>workflow</category>
      <category>bot</category>
    </item>
  </channel>
</rss>
