<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Deepak Singh</title>
    <description>The latest articles on Forem by Deepak Singh (@deepak_negi_f1d64e7393000).</description>
    <link>https://forem.com/deepak_negi_f1d64e7393000</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1823635%2F298ec0da-7f4d-40ee-8553-fb0d50c22aa4.png</url>
      <title>Forem: Deepak Singh</title>
      <link>https://forem.com/deepak_negi_f1d64e7393000</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/deepak_negi_f1d64e7393000"/>
    <language>en</language>
    <item>
      <title>🚀 How I Built My Dream Chrome Extension Template in 36 Hours — Thanks to Kiro</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Wed, 19 Nov 2025 14:33:56 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/how-i-built-my-dream-chrome-extension-template-in-36-hours-thanks-to-kiro-147a</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/how-i-built-my-dream-chrome-extension-template-in-36-hours-thanks-to-kiro-147a</guid>
      <description>&lt;p&gt;For the past two years, I’ve wanted to build real Chrome extensions.&lt;br&gt;
I had ideas. I had excitement. I had big plans.&lt;/p&gt;

&lt;p&gt;But I didn’t have the direction, the resources, or the right tooling to turn those ideas into reality. Chrome extensions—especially modern, Manifest V3 extensions—come with complicated architecture, annoying setup tasks, and limited documentation.&lt;/p&gt;

&lt;p&gt;So, like many of my ideas…&lt;br&gt;
I dropped everything.&lt;/p&gt;

&lt;p&gt;But then came the Kiroween Hackathon.&lt;/p&gt;

&lt;p&gt;And in just 36 hours, I built the Chrome extension development template I’d been dreaming about for two years:&lt;/p&gt;
&lt;h3&gt;
  
  
  🎉 Extension Bro — Skeleton Crew
&lt;/h3&gt;

&lt;p&gt;A luxury, production-ready, AI-capable, React + Vite + TypeScript Chrome extension template with a generator, design system, and two real working extensions.&lt;/p&gt;

&lt;p&gt;This is the story of how I built it, what I learned, and how Kiro changed everything.&lt;/p&gt;
&lt;h3&gt;
  
  
  🎃 The Spark That Started It All
&lt;/h3&gt;

&lt;p&gt;When the hackathon began, I decided:&lt;/p&gt;

&lt;p&gt;“This time, I’m doing it. No excuses.”&lt;/p&gt;

&lt;p&gt;I had always struggled with Chrome extension architecture:&lt;/p&gt;

&lt;p&gt;Setting up React + Vite the correct way&lt;/p&gt;

&lt;p&gt;Handling Manifest V3 service workers&lt;/p&gt;

&lt;p&gt;Managing popup → background → content messaging&lt;/p&gt;

&lt;p&gt;Chrome storage&lt;/p&gt;

&lt;p&gt;Icons&lt;/p&gt;

&lt;p&gt;Build scripts&lt;/p&gt;

&lt;p&gt;AI integration&lt;/p&gt;

&lt;p&gt;These pain points killed my motivation again and again.&lt;/p&gt;

&lt;p&gt;But with Kiro, something clicked.&lt;/p&gt;
&lt;h3&gt;
  
  
  💡 Kiro was a game changer
&lt;/h3&gt;

&lt;p&gt;Here’s the polished version of what I’ve told many people already:&lt;/p&gt;

&lt;p&gt;Kiro was a game changer for me. For the past two years, I had many ideas for Chrome extensions, but due to the limitations of Chrome extensions and the lack of available resources, I dropped everything. However, in this hackathon, I decided to give it a try—and it worked. The steering really helped me create a highly optimized and production-ready extension template that I can use to build more complex Chrome extensions in the future.&lt;/p&gt;

&lt;p&gt;This hackathon gave me a reason, but Kiro gave me the ability.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧪 How Kiro Supercharged My Development Process&lt;/li&gt;
&lt;li&gt;🔧 1. Vibe Coding — Fixing UI, Bugs, and Optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whenever the UI felt off—or something just wasn’t working right—I used vibe coding to quickly refine things.&lt;/p&gt;

&lt;p&gt;The bundle size reduction blew my mind.&lt;br&gt;
Suddenly, my extension felt like a SaaS-level product.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧩 2. Agent Hooks — My Secret Weapon
&lt;/h3&gt;

&lt;p&gt;Hooks saved me hours of debugging.&lt;/p&gt;

&lt;p&gt;“Agent hooks helped me a lot, as did Kiro itself. I set up hooks so that I could get the desired output and write code properly. Sometimes small mistakes—like casing issues—can waste hours, so I configured hooks to prevent these kinds of errors.”&lt;/p&gt;

&lt;p&gt;Hooks ensured consistency.&lt;br&gt;
They ensured correctness.&lt;br&gt;
They made Kiro predictable and reliable.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧠 3. Steering — The Real Superpower
&lt;/h3&gt;

&lt;p&gt;Steering is where the magic happened.&lt;/p&gt;

&lt;p&gt;With steering, I could:&lt;/p&gt;

&lt;p&gt;Constrain Kiro when I wanted minimal UI&lt;/p&gt;

&lt;p&gt;Boost Kiro when I wanted animations&lt;/p&gt;

&lt;p&gt;Change design rules&lt;/p&gt;

&lt;p&gt;Define component quality&lt;/p&gt;

&lt;p&gt;Declare color palettes&lt;/p&gt;

&lt;p&gt;Lock in architecture decisions&lt;/p&gt;

&lt;p&gt;As I said:&lt;/p&gt;

&lt;p&gt;“I used steering both to constrain Kiro and to boost it, because not every project requires the same things. Sometimes I want a very simple, basic UI, and other times I want animations—so steering helped me adjust that easily. The strategy that worked best for me was clearly defining requirements, such as design style, color themes, and other details.”&lt;/p&gt;

&lt;p&gt;This gave me SaaS-level design quality with AI-level speed.&lt;/p&gt;
&lt;h3&gt;
  
  
  🤯 The Moment That Blew My Mind
&lt;/h3&gt;

&lt;p&gt;There was one experience that changed everything.&lt;/p&gt;

&lt;p&gt;I wrote a single prompt, asked for an AI-powered, polished extension UI—and Kiro generated nearly the entire working extension.&lt;/p&gt;

&lt;p&gt;Just… like… that.&lt;/p&gt;

&lt;p&gt;“That was something that completely blew my mind. I literally coded a fully working, AI-integrated, beautifully designed extension with just one prompt and two revisions. A well-structured template + hooks + steering = insane productivity.”&lt;/p&gt;

&lt;p&gt;This made me realize:&lt;br&gt;
With the right structure, AI becomes 10x more powerful.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧱 What I Built in 36 Hours
&lt;/h3&gt;

&lt;p&gt;Let me break down Extension Bro — Skeleton Crew:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;✔️ React + Vite + TypeScript Architecture&lt;/li&gt;
&lt;li&gt;Fully typed&lt;/li&gt;
&lt;li&gt;Multi-entry Vite build&lt;/li&gt;
&lt;li&gt;Popup + content scripts + service worker&lt;/li&gt;
&lt;li&gt;Optimized rollup output&lt;/li&gt;
&lt;li&gt;Hot Reload for popup (HMR)&lt;/li&gt;
&lt;li&gt;Tailwind design tokens &amp;amp; luxury theme&lt;/li&gt;
&lt;li&gt;Gold, glassmorphism, gradients, animations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✔️ A Generator CLI&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node generate-bro.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you get:&lt;/p&gt;

&lt;p&gt;New extension folder&lt;/p&gt;

&lt;p&gt;Manifest updated&lt;/p&gt;

&lt;p&gt;Icons generated&lt;/p&gt;

&lt;p&gt;Dependencies installed&lt;/p&gt;

&lt;p&gt;Ready-to-run dev server&lt;/p&gt;

&lt;p&gt;Clean structure with no build artifacts&lt;/p&gt;

&lt;p&gt;✔️ AI Features&lt;/p&gt;

&lt;p&gt;I built two example extensions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is True? — AI Fact Checker&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;@google/genai integration&lt;/p&gt;

&lt;p&gt;Select text → Right-click → Verify&lt;/p&gt;

&lt;p&gt;Verdict + confidence&lt;/p&gt;

&lt;p&gt;Beautiful modal&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spam Detector 🛡️&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Real-time background analysis&lt;/p&gt;

&lt;p&gt;Page scanning&lt;/p&gt;

&lt;p&gt;Warning overlay system&lt;/p&gt;

&lt;p&gt;Persistent toggle state&lt;/p&gt;

&lt;p&gt;All built on top of my template.&lt;/p&gt;

&lt;p&gt;⚙️ Technologies I Used&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React 18&lt;/li&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;Manifest V3&lt;/li&gt;
&lt;li&gt;Google Gemini AI&lt;/li&gt;
&lt;li&gt;Node.js (for generator)&lt;/li&gt;
&lt;li&gt;Kiro steering, hooks, vibe coding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📦 How You Can Use Extension Bro&lt;/p&gt;

&lt;p&gt;You can build:&lt;/p&gt;

&lt;p&gt;AI-powered extensions&lt;/p&gt;

&lt;p&gt;Productivity tools&lt;/p&gt;

&lt;p&gt;Security scanners&lt;/p&gt;

&lt;p&gt;UI-enhancement extensions&lt;/p&gt;

&lt;p&gt;Screenshot tools&lt;/p&gt;

&lt;p&gt;Translators&lt;/p&gt;

&lt;p&gt;Context menu utilities&lt;/p&gt;

&lt;p&gt;Run the generator and start coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔮 Future Plans
&lt;/h3&gt;

&lt;p&gt;This is just the beginning.&lt;/p&gt;

&lt;p&gt;🌐 1. Multi-language Support&lt;/p&gt;

&lt;p&gt;I want to add templates for:&lt;/p&gt;

&lt;p&gt;Vue&lt;/p&gt;

&lt;p&gt;Svelte&lt;/p&gt;

&lt;p&gt;Solid&lt;/p&gt;

&lt;p&gt;Vanilla TypeScript&lt;/p&gt;

&lt;p&gt;🧱 2. Drag-and-Drop Chrome Extension Builder&lt;/p&gt;

&lt;p&gt;This is my ultimate vision:&lt;/p&gt;

&lt;p&gt;A UI builder where you drag components, and the system automatically generates a Chrome extension using my template + AI.&lt;/p&gt;

&lt;p&gt;Imagine building extensions like:&lt;br&gt;
Webflow → Chrome Extensions.&lt;/p&gt;

&lt;p&gt;That’s my dream.&lt;/p&gt;

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

&lt;p&gt;This hackathon helped me create something I’ve wanted for years.&lt;br&gt;
Kiro helped me structure, build, polish, and perfect a template I can use forever.&lt;/p&gt;

&lt;p&gt;A template I can extend.&lt;br&gt;
A template I can teach others with.&lt;br&gt;
A template I can turn into a full product later.&lt;/p&gt;

&lt;p&gt;If you want to check out the project, here it is:&lt;/p&gt;

&lt;p&gt;👉 GitHub: &lt;a href="https://github.com/openmediaveris-deepak/Extension-Bro" rel="noopener noreferrer"&gt;https://github.com/openmediaveris-deepak/Extension-Bro&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to Kiro, the Kiroween Hackathon, and the community for giving me the push I needed.&lt;/p&gt;

&lt;p&gt;If you liked this, feel free to drop a comment or star the repo.&lt;br&gt;
More extensions are coming soon 👻✨&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>webdev</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building Tantrik — A Multi-Agent AI Halloween Chat Using Next.js, Flask &amp; Kiro</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Mon, 17 Nov 2025 10:01:00 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/building-tantrik-a-multi-agent-ai-halloween-chat-using-nextjs-flask-kiro-jgi</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/building-tantrik-a-multi-agent-ai-halloween-chat-using-nextjs-flask-kiro-jgi</guid>
      <description>&lt;h3&gt;
  
  
  &lt;em&gt;Talk to Dracula, Grim Reaper &amp;amp; Bloody Mary — each powered by their own AI agent.&lt;/em&gt;
&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%2Fwqmxm1btblbnvic2et0t.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%2Fwqmxm1btblbnvic2et0t.png" alt="Chat" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Halloween should be &lt;em&gt;felt&lt;/em&gt;, not just seen.&lt;br&gt;&lt;br&gt;
So I built &lt;strong&gt;Tantrik&lt;/strong&gt; — a web experience where you can actually chat with supernatural spirits, each with unique personalities, sounds, animations, and moods.&lt;/p&gt;

&lt;p&gt;Live App → &lt;a href="https://tantrik-web.vercel.app" rel="noopener noreferrer"&gt;https://tantrik-web.vercel.app&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Source Code → &lt;a href="https://github.com/luexclothings-hue/tantrik" rel="noopener noreferrer"&gt;https://github.com/luexclothings-hue/tantrik&lt;/a&gt;  &lt;/p&gt;


&lt;h2&gt;
  
  
  👻 What is Tantrik?
&lt;/h2&gt;

&lt;p&gt;A fully immersive Halloween spirit-chat platform where users talk to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧛 &lt;strong&gt;Count Dracula&lt;/strong&gt; – ancient, poetic, blood-obsessed
&lt;/li&gt;
&lt;li&gt;💀 &lt;strong&gt;Grim Reaper&lt;/strong&gt; – cold, judgmental, metaphor-heavy
&lt;/li&gt;
&lt;li&gt;👰 &lt;strong&gt;Bloody Mary&lt;/strong&gt; – unpredictable, whispery, mirror-themed
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each spirit has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Its own &lt;strong&gt;AI agent&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Custom &lt;strong&gt;system prompt&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Animated &lt;strong&gt;background scene&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Spirit-specific &lt;strong&gt;ambience + horror sounds&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Themed &lt;strong&gt;UI + color psychology&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  🧱 Architecture Overview
&lt;/h2&gt;

&lt;p&gt;tantrik/&lt;br&gt;
├── tantrik_web/ # Next.js 16 + React + TS frontend&lt;br&gt;
└── tantrik_ai/ # Flask backend with multi-agent AI&lt;/p&gt;


&lt;h2&gt;
  
  
  🔮 Multi-Agent AI Backend (Flask + OpenAI)
&lt;/h2&gt;

&lt;p&gt;Tantrik doesn’t use one model pretending to be everyone — I built &lt;strong&gt;separate AI agents&lt;/strong&gt; for each spirit.&lt;/p&gt;
&lt;h3&gt;
  
  
  Base agent
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class SpiritAgent:
    def __init__(self, name, system_prompt, primary_api_key, model, temperature):
        self.name = name
        self.system_prompt = system_prompt
        self.model = model
        self.temperature = temperature
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Dracula example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class DraculaAgent(SpiritAgent):
    def __init__(self, primary_api_key):
        super().__init__(
            name="Count Dracula",
            system_prompt=DRACULA_SYSTEM_PROMPT,
            primary_api_key=primary_api_key,
            model="gpt-4o-mini",
            temperature=0.9
        )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1.Why separate agents?&lt;br&gt;
2.Faster&lt;br&gt;
3.Cheaper&lt;br&gt;
4.No personality mixing&lt;br&gt;
5.Better consistency&lt;/p&gt;

&lt;p&gt;🎨 Immersive Halloween Frontend (Next.js 16)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend stack:&lt;/li&gt;
&lt;li&gt;Next.js App Router&lt;/li&gt;
&lt;li&gt;React 19 + TypeScript&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;Streaming chat UI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Horror animations (blood drips, flickers, cracked mirrors)&lt;br&gt;
Custom sound engine (ambience + effects)&lt;br&gt;
All wrapped in a Halloween color psychology theme:&lt;br&gt;
Mystic Purple (#8B5CF6)&lt;br&gt;
Blood Red (#DC2626)&lt;br&gt;
Pumpkin Orange (#FF6B35)&lt;br&gt;
Shadow Black (#0A0612)&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ How Kiro Helped Me Build Tantrik
&lt;/h2&gt;

&lt;p&gt;Kiro became my AI development partner.&lt;/p&gt;

&lt;p&gt;✔️ Hook System&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;onCheck → Prevent duplicate components, enforce naming rules, block non-Halloween colors&lt;/li&gt;
&lt;li&gt;onGenerate → Ensure theme compliance during generation, log all files&lt;/li&gt;
&lt;li&gt;onSave → Formatting warnings, missing semicolons, TODO detection&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✔️ Steering Docs&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I wrote full guides:&lt;/li&gt;
&lt;li&gt;Coding style&lt;/li&gt;
&lt;li&gt;Dev rules&lt;/li&gt;
&lt;li&gt;Agent architecture&lt;/li&gt;
&lt;li&gt;Theme system
This made Kiro produce consistent, on-brand code automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;😂 Fun Bugs&lt;/p&gt;

&lt;p&gt;Dracula once said “bro”&lt;br&gt;
Grim Reaper used “lol”&lt;br&gt;
Bloody Mary gave relationship advice&lt;br&gt;
First blood animation looked like ketchup&lt;/p&gt;

&lt;p&gt;🚀 What’s Next&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Seasonal themes (Christmas, New Year spirits)&lt;/li&gt;
&lt;li&gt;Live voice chat with spirits&lt;/li&gt;
&lt;li&gt;AR “mirror ghost” mode&lt;/li&gt;
&lt;li&gt;More AI entities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🧡 Final Thoughts&lt;/p&gt;

&lt;p&gt;Tantrik showed me how powerful multi-agent systems + theme design + Kiro automation can be.&lt;/p&gt;

&lt;p&gt;If you want to build something atmospheric, weird, creative — this is your sign.&lt;/p&gt;

&lt;p&gt;“The spirits always listen…&lt;br&gt;
but they only answer in darkness.” 👻&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>🎃 Transforming the Web Into a Spooky World — Building Halloween Vibes with Kiro</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Sun, 16 Nov 2025 14:04:23 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/transforming-the-web-into-a-spooky-world-building-halloween-vibes-with-kiro-9lj</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/transforming-the-web-into-a-spooky-world-building-halloween-vibes-with-kiro-9lj</guid>
      <description>&lt;p&gt;For this Hackathon kiroween, I wanted to build something fun, atmospheric, and full of personality. Halloween has always been about eerie visuals, creepy sounds, and unexpected jump scares — so why not bring that experience to any website on the internet?&lt;/p&gt;

&lt;p&gt;That’s how Halloween Vibes was born: a Chrome extension that instantly transforms ordinary webpages into a magical, spooky Halloween universe. 👻🕸️&lt;/p&gt;

&lt;p&gt;Halloween is all about atmosphere — the glowing pumpkins, flickering lights, creepy whispers, and things that move when you’re not looking. I wanted to capture that feeling and bring it directly into the browser.&lt;/p&gt;

&lt;p&gt;Instead of a static theme or wallpaper, I envisioned something alive, animated, and reactive. Halloween Vibes became my way of turning the entire web into a fully immersive haunted experience.&lt;/p&gt;

&lt;p&gt;🎃 What It Does&lt;/p&gt;

&lt;p&gt;Halloween Vibes overlays spooky decorations, sounds, and animations onto any website without breaking the layout.&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%2F24s22fhtnvfctuf6e4yq.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%2F24s22fhtnvfctuf6e4yq.png" alt="halloween-vibes" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✨ Key Features&lt;/p&gt;

&lt;p&gt;👻 Visual Magic&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Floating pumpkins, ghosts, bats, leaves, witches&lt;/li&gt;
&lt;li&gt;Spider webs in all corners&lt;/li&gt;
&lt;li&gt;Special Halloween cursors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔊 Audio Effects&lt;/p&gt;

&lt;p&gt;Ambient spooky music&lt;/p&gt;

&lt;p&gt;Jump-scare screams &amp;amp; whispers&lt;/p&gt;

&lt;p&gt;Tab-aware audio (pauses when switching tabs)&lt;/p&gt;

&lt;p&gt;All sounds fully user-controlled&lt;/p&gt;

&lt;p&gt;😱 Jump Scares&lt;/p&gt;

&lt;p&gt;Flying skulls&lt;/p&gt;

&lt;p&gt;Peeking zombies&lt;/p&gt;

&lt;p&gt;Bloody Mary crack animations&lt;/p&gt;

&lt;p&gt;🧠 Smart Engine&lt;/p&gt;

&lt;p&gt;Overlay mode keeps original site styles intact&lt;/p&gt;

&lt;p&gt;Per-tab sound management&lt;/p&gt;

&lt;p&gt;Autoplay-compliant audio&lt;/p&gt;

&lt;p&gt;Lightning-fast injection (under 50ms)&lt;/p&gt;

&lt;p&gt;💻 Developer Friendly&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;React + TypeScript&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;Framer Motion for animations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Halloween Vibes uses a modern Chrome extension structure:&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%2Fd3ov1orcy2ipfcr8q90c.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%2Fd3ov1orcy2ipfcr8q90c.png" alt="Architecture" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React 18 + TypeScript for the popup UI&lt;/li&gt;
&lt;li&gt;Vite for fast development &amp;amp; builds&lt;/li&gt;
&lt;li&gt;Framer Motion for smooth animations&lt;/li&gt;
&lt;li&gt;Chrome Storage API for settings&lt;/li&gt;
&lt;li&gt;Web Audio API for sound playback&lt;/li&gt;
&lt;li&gt;Content Script to inject decorations onto any webpage&lt;/li&gt;
&lt;li&gt;Background Service Worker to manage global state
The content script handles the Halloween overlay, animations, decorations, and jump scare logic, while the popup allows users to toggle sounds or switch modes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;😅 Challenges&lt;br&gt;
🔊 Sound System Challenges&lt;/p&gt;

&lt;p&gt;Preventing duplicated audio across multiple tabs&lt;/p&gt;

&lt;p&gt;Keeping jump scare sounds synced&lt;/p&gt;

&lt;p&gt;Handling autoplay restrictions&lt;/p&gt;

&lt;p&gt;Ensuring sound toggles worked per-tab&lt;/p&gt;

&lt;p&gt;Integrating React + Vite + Manifest V3&lt;/p&gt;

&lt;p&gt;Avoiding broken layouts while injecting visual effects&lt;/p&gt;

&lt;p&gt;Working around strict CSP websites&lt;/p&gt;

&lt;p&gt;Managing performance so animations stayed smooth&lt;/p&gt;

&lt;p&gt;A clean, polished Halloween extension that works on most websites&lt;/p&gt;

&lt;p&gt;Smooth animations and overlays that don’t break page layouts&lt;/p&gt;

&lt;p&gt;A lightweight jump scare system under 10MB memory&lt;/p&gt;

&lt;p&gt;Fast injection speed: &amp;lt;50ms&lt;/p&gt;

&lt;p&gt;A responsive popup UI&lt;/p&gt;

&lt;p&gt;Fully tab-aware sound engine&lt;/p&gt;

&lt;p&gt;📚 Learnings&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- Dealing with browser autoplay policies&lt;/li&gt;
&lt;li&gt;- Multi-tab communication inside Chrome extensions&lt;/li&gt;
&lt;li&gt;- High-performance animations with Framer Motion&lt;/li&gt;
&lt;li&gt;- Structuring a scalable extension with Vite&lt;/li&gt;
&lt;li&gt;- Balancing creativity with accessibility and performance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🎨 What’s Next for Halloween Vibes&lt;br&gt;
Multi-Theme Expansion&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cute Halloween&lt;/li&gt;
&lt;li&gt;Gothic&lt;/li&gt;
&lt;li&gt;Cyberpunk Halloween&lt;/li&gt;
&lt;li&gt;Retro Halloween&lt;/li&gt;
&lt;li&gt;Seasonal Themes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🎄 Christmas&lt;/p&gt;

&lt;p&gt;🎆 New Year&lt;/p&gt;

&lt;p&gt;💖 Valentine’s Day&lt;/p&gt;

&lt;p&gt;🐇 Easter&lt;/p&gt;

&lt;p&gt;🎉 Birthday Theme&lt;/p&gt;

&lt;p&gt;More Features&lt;/p&gt;

&lt;p&gt;Customizable sound packs&lt;/p&gt;

&lt;p&gt;Adjustable jump scare frequency&lt;/p&gt;

&lt;p&gt;More decorations &amp;amp; animations&lt;/p&gt;

&lt;p&gt;Theme selector inside the popup&lt;/p&gt;

&lt;p&gt;Halloween Vibes is evolving into a year-round seasonal web transformation extension.&lt;/p&gt;

&lt;p&gt;💡 How Kiro Helped Build This Project&lt;/p&gt;

&lt;p&gt;Kiro played a huge role in speeding up development:&lt;/p&gt;

&lt;p&gt;Steerings&lt;/p&gt;

&lt;p&gt;I used detailed steering docs covering:&lt;/p&gt;

&lt;p&gt;Accessibility guidelines&lt;/p&gt;

&lt;p&gt;Animation rules&lt;/p&gt;

&lt;p&gt;Architecture standards&lt;/p&gt;

&lt;p&gt;Performance constraints&lt;/p&gt;

&lt;p&gt;Sound design rules&lt;/p&gt;

&lt;p&gt;This helped Kiro generate code that matched my design system, accessibility requirements, and Halloween vibe without constant correction.&lt;/p&gt;

&lt;p&gt;Hooks&lt;/p&gt;

&lt;p&gt;I automated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pre-write filename validation&lt;/li&gt;
&lt;li&gt;Automatic file headers&lt;/li&gt;
&lt;li&gt;Project context injection&lt;/li&gt;
&lt;li&gt;Task planning review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made code generation more consistent and saved a lot of time.&lt;/p&gt;

&lt;p&gt;Specs&lt;/p&gt;

&lt;p&gt;I kept my spec focused on the MVP first, then layered complexity later. Reviewing each task before execution made everything predictable and clean.&lt;/p&gt;

&lt;p&gt;🔗 Built With&lt;/p&gt;

&lt;p&gt;React&lt;/p&gt;

&lt;p&gt;TypeScript&lt;/p&gt;

&lt;p&gt;Vite&lt;/p&gt;

&lt;p&gt;🎉 Try It Out&lt;/p&gt;

&lt;p&gt;👨‍💻 GitHub Repo:&lt;br&gt;
&lt;a href="https://github.com/lucidyatra-web/halloween-vibes" rel="noopener noreferrer"&gt;https://github.com/lucidyatra-web/halloween-vibes&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>halloween</category>
      <category>react</category>
    </item>
    <item>
      <title>Why You Need to Know How a Database Works Internally?</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Sun, 14 Sep 2025 18:02:36 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/why-you-need-to-know-how-a-database-works-internally-5g6a</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/why-you-need-to-know-how-a-database-works-internally-5g6a</guid>
      <description>&lt;p&gt;We rarely build our own database engine from scratch, but even then, understanding how databases work internally is important. Without this knowledge, it becomes hard to choose the right database according to business needs or tune a particular database to fit those needs.&lt;/p&gt;

&lt;p&gt;In this article, you will gain a good understanding of the internal workings of databases without much technical jargon. By the end, you will have clear reasons to choose a particular database engine while building your next impactful software application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Imagine This: Building the Fastest Database
&lt;/h2&gt;

&lt;p&gt;Let’s say you sat in a time machine and went a few years back when databases were about to be invented. As a great software engineer from 2025, you are asked to build the fastest database. What technique would come to your mind first? Hashmaps?&lt;/p&gt;

&lt;p&gt;Why not? They are used to read and write data in constant time (O(1)). So theoretically, they should be the best database in the world. And indeed, a similar concept was used in the beginning (like Bitcask). But if you check the 2025 statistics, you’ll find that B-Tree (which we will discuss later) is the most popular database engine for storing data, and it does not use hashmaps.&lt;/p&gt;

&lt;p&gt;Why? Because we don’t need perfection. We need something that works and reduces cost.&lt;/p&gt;

&lt;p&gt;Let’s go through important database engine terms, where to use each one, and their advantages over others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hash Index
&lt;/h2&gt;

&lt;p&gt;By its name, you already understand that this technique uses hashmaps. But more important is how it is implemented for reliability, concurrency, and fault tolerance.&lt;/p&gt;

&lt;p&gt;Hashmaps are generally in-memory data structures for maximum efficiency. I said generally because we can use disk for hashmaps too, but that wouldn’t be efficient. Disks like HDD and SSD are not designed for this type of random-access operation.&lt;/p&gt;

&lt;p&gt;In a hash index, we maintain an in-memory hashmap whose key is the actual key of the data, and the value is the offset (or location) of that data on the disk. The value can be large, so it is not stored in memory. Only a single seek time (finding a value by address on disk) is added.&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%2Fq7eurlob77u1quch1z9n.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%2Fq7eurlob77u1quch1z9n.png" alt="hash index" width="740" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But what if the machine crashes while updating a value? The data would be in a partial state, which would be useless. To solve this, log-structured techniques are used.&lt;/p&gt;

&lt;p&gt;An append-only file (where nothing is overwritten) stores the data. Whenever we need to update a value, we simply write the new value, and the hash index now points to this new version. However, this causes disk space to increase rapidly.&lt;/p&gt;

&lt;p&gt;To solve this, instead of writing the whole data into a single file, we write data in segments and continuously merge them to keep only the latest value for each key (known as compaction). This happens in the background so that read and write operations are not affected.&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%2Fe8pa8oznudgs0v5v5q0q.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%2Fe8pa8oznudgs0v5v5q0q.png" alt="hash index" width="743" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitations of Hash Index:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;On machine restart, all keys are lost. This is solved by taking periodic snapshots of the keys and storing them on disk.&lt;/li&gt;
&lt;li&gt;RAM is expensive and limited in size, so we can’t store many keys, and several disk management techniques can’t be applied.&lt;/li&gt;
&lt;li&gt;Although we can access any key-value pair in O(1), range queries (retrieving data between a particular range) cannot be efficiently performed with hashmaps. And range queries are crucial in most businesses.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SSTables and LSM-Trees
&lt;/h2&gt;

&lt;p&gt;Now we encounter some names that seem technically complex but aren’t.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is an SSTable?
&lt;/h3&gt;

&lt;p&gt;An SSTable (Sorted Strings Table) is a file format where strings (keys) are stored in sorted order. That’s it.&lt;/p&gt;

&lt;p&gt;The idea is to improve upon the hash index.&lt;/p&gt;

&lt;p&gt;We know that in a hash index, data is stored in segments. In the same way, here too, data is stored in segments, but each segment is in SSTable format — sorted by keys.&lt;/p&gt;

&lt;p&gt;Each SSTable has its own in-memory or disk-based hash index. That is, a table we can use to get a key’s value from that segment.&lt;/p&gt;

&lt;p&gt;Better alternatives than hash tables also exist — not necessarily faster, but they work fairly well while reducing cost. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sparse tables with binary search
&lt;/li&gt;
&lt;li&gt;Other efficient lookup structures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because segments aren’t very large, these work great.&lt;/p&gt;

&lt;p&gt;Compaction happens here too, but in a slightly better way. A merge sort is used so that the new segment appears in sorted order.&lt;/p&gt;

&lt;p&gt;But where do SSTables come from?&lt;/p&gt;

&lt;p&gt;Because we write data in any order, we use an in-memory AVL or Red-Black tree. This tree stores incoming data in sorted order. After crossing a threshold, the data is flushed to disk in SSTable format, and memory becomes reusable.&lt;/p&gt;

&lt;p&gt;This helps in writing data more than the available memory and enables range queries because of the sorted keys.&lt;/p&gt;

&lt;p&gt;This entire technique is known as &lt;strong&gt;LSM Tree (Log-Structured Merge Tree)&lt;/strong&gt;. Easy peasy, right?&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%2Fckarxo53h0jqn5e14862.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%2Fckarxo53h0jqn5e14862.png" alt="LSM Tree" width="701" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To read data:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, we look in the in-memory tree (called the memtable).&lt;/li&gt;
&lt;li&gt;Then, in the latest segment.&lt;/li&gt;
&lt;li&gt;Then, in older segments sequentially.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If data is very old or not present, we might have to look into too many segments, which is inefficient. To solve this, &lt;strong&gt;Bloom filters&lt;/strong&gt; are used to quickly check if a key exists in a segment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitations of LSM Tree:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Even though we use Bloom filters, reads are not very fast.
&lt;/li&gt;
&lt;li&gt;This makes LSM Trees less suitable for read-heavy applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  B-Tree
&lt;/h2&gt;

&lt;p&gt;Don’t confuse it with a Binary Tree or Binary Search Tree — it is completely different.&lt;/p&gt;

&lt;p&gt;B-Tree is the most popular data engine, used by big names like MySQL, PostgreSQL, and Oracle. Why?&lt;/p&gt;

&lt;p&gt;Because of its balanced performance in read and write operations, especially for disk-based databases.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does B-Tree work?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A B-Tree stores several pages of fixed-size blocks.&lt;/li&gt;
&lt;li&gt;Each page holds keys in sorted order and references to other pages.&lt;/li&gt;
&lt;li&gt;References are not random. Each reference between two keys points to pages containing keys in that range.&lt;/li&gt;
&lt;li&gt;Leaf pages contain references to values or the values themselves.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It looks like a search tree but differs in how data is inserted.&lt;/p&gt;

&lt;p&gt;Any key-value pair is inserted into the appropriate leaf page.&lt;br&gt;&lt;br&gt;
If a page doesn’t have space for a new key:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It splits into two equal parts.&lt;/li&gt;
&lt;li&gt;The parent page adds a new reference to the extra page.&lt;/li&gt;
&lt;li&gt;This process continues up to the root.&lt;/li&gt;
&lt;li&gt;If the root splits, a new root is created.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Although it seems like heavy work, in practice, 4–5 levels contain a lot of data.&lt;br&gt;&lt;br&gt;
Read and write complexity remains &lt;strong&gt;O(log n)&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitations of B-Tree:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In concurrent scenarios or server failures, a B-Tree can become corrupted due to missing parent references.&lt;/li&gt;
&lt;li&gt;This is solved by &lt;strong&gt;Write-Ahead Logging (WAL)&lt;/strong&gt; — an append-only file written before the actual B-Tree modification.&lt;/li&gt;
&lt;li&gt;However, WAL makes B-Tree slower in writes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary: Choosing the Right DB Engine
&lt;/h2&gt;

&lt;p&gt;We covered the most popular DB engines and their internal workings.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;B-Tree&lt;/strong&gt; is the most mature and optimized engine, making it a widely popular choice.
&lt;/li&gt;
&lt;li&gt;All techniques are useful and chosen based on specific business needs.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s impossible to directly compare them due to factors like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data type and complexity
&lt;/li&gt;
&lt;li&gt;Workload type
&lt;/li&gt;
&lt;li&gt;Database tuning
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But generally:&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%2Fvbzpj97a07bf0kgb27lc.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%2Fvbzpj97a07bf0kgb27lc.png" alt="comparision" width="754" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the end, the choice is not about the fastest or best, but the one that suits your software application the most.&lt;br&gt;&lt;br&gt;
Consider your business needs carefully and tune your DB engine accordingly.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;br&gt;&lt;br&gt;
Feel free to comment your thoughts or share how you chose your database in your last project.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;Kleppmann, M. (2017). &lt;em&gt;Designing Data-Intensive Applications: The big ideas behind reliable, scalable, and maintainable systems.&lt;/em&gt; O’Reilly Media.&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>softwareengineering</category>
      <category>programming</category>
      <category>database</category>
    </item>
    <item>
      <title>Which Database Should We Use: Relational, Document, or Graph Model?</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Fri, 05 Sep 2025 03:32:15 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/which-database-should-we-use-relational-document-or-graph-model-33lb</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/which-database-should-we-use-relational-document-or-graph-model-33lb</guid>
      <description>&lt;p&gt;A good general answer is: &lt;strong&gt;everything&lt;/strong&gt;. In real-world applications, using a mix of all types of database models is often the most efficient approach.&lt;/p&gt;

&lt;p&gt;So the better question isn’t “Which database should we use?” but rather: &lt;strong&gt;“Where should we use each type of database model?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even if using all data models isn’t feasible for a business, this article will give you a deeper understanding of how different database models work — and how we can even simulate multiple models within a single database type. This might seem hacky, but modern applications’ need for &lt;strong&gt;polyglot persistence&lt;/strong&gt; has pushed databases to provide functionalities beyond their original model.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding Basic Terminology
&lt;/h2&gt;

&lt;p&gt;Before diving deeper, let’s clarify some key concepts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Model
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;data model&lt;/strong&gt; is a way of storing data. It can exist at different levels: hardware, software, or application layer. Each is complex in its own right, so abstraction is crucial.&lt;/p&gt;

&lt;p&gt;For example, if you want to store user resume details, you don’t need to worry about how it’s stored at the electrical current level. Instead, we focus on &lt;strong&gt;application layer data models&lt;/strong&gt;, which describe how data is structured and accessed, not how it’s physically retrieved.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Relationships
&lt;/h3&gt;

&lt;p&gt;Entities in real-world applications are often related in different ways. Understanding the type of relationship is essential for choosing the right database model.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Many-to-Many:&lt;/strong&gt; One entity can relate to many others, and vice versa.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Example:&lt;/em&gt; A case can have many tests, and a test can belong to many cases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One-to-Many:&lt;/strong&gt; One entity can have many of another entity.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Example:&lt;/em&gt; A person can have multiple education entries. Note that the reverse may not hold true.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Many-to-One:&lt;/strong&gt; Many entities relate to a single entity.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Example:&lt;/em&gt; Many users can work in the same industry, but one industry doesn’t have the same user multiple times.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these concepts clear, understanding the role of each database model becomes simpler.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Different Data Models Exist
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Data Locality
&lt;/h3&gt;

&lt;p&gt;Data that is related and often read together should be stored together. This is called &lt;strong&gt;data locality&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relational Database
&lt;/h3&gt;

&lt;p&gt;Relational databases (RDBMS) are the classic approach. Many of us first encounter databases through relational tables — whether in IT or simple real-world analogies like notebook tables.&lt;/p&gt;

&lt;p&gt;Though RDBMS feels old-fashioned, they became powerful with &lt;strong&gt;query languages like SQL&lt;/strong&gt;, which allow efficient data manipulation, retrieval, and &lt;strong&gt;JOIN operations&lt;/strong&gt;. Relational databases were specifically designed to &lt;strong&gt;optimize referenced data retrieval&lt;/strong&gt; — technically, this is what a JOIN does.&lt;/p&gt;

&lt;h3&gt;
  
  
  Document Model
&lt;/h3&gt;

&lt;p&gt;Document databases feel very natural to developers because they store data in &lt;strong&gt;objects or JSON-like structures&lt;/strong&gt;, which reduces impedance with applications.&lt;/p&gt;

&lt;p&gt;The main advantage of document databases is &lt;strong&gt;data locality&lt;/strong&gt; — related information is stored together, making reads more efficient.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Example:&lt;/em&gt; Netflix can store all movies a user likes in a single document for easy retrieval.  &lt;/p&gt;

&lt;p&gt;Flexible schema design also makes document databases ideal when the data structure isn’t fixed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Graph Model
&lt;/h3&gt;

&lt;p&gt;Graph databases store data as &lt;strong&gt;vertices&lt;/strong&gt; (entities) and &lt;strong&gt;edges&lt;/strong&gt; (relationships). The vertices can be heterogeneous, such as users, posts, comments, or likes.&lt;/p&gt;

&lt;p&gt;Graph databases shine in handling &lt;strong&gt;complex many-to-many relationships&lt;/strong&gt;, such as social networks (Facebook, LinkedIn), where the relationships themselves are critical.&lt;/p&gt;




&lt;h2&gt;
  
  
  Choosing the Right Data Model
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One-to-Many Relationships:&lt;/strong&gt; Document databases work well because related data can be stored together. However, if the “many” side is independent or highly nested, a relational table with references may be better.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Many-to-One Relationships:&lt;/strong&gt; Storing the “one” side as a reference prevents data duplication, making relational databases suitable.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Many-to-Many Relationships:&lt;/strong&gt; These often require join tables in relational databases. For more complex relationships, graph databases are optimal.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Polyglot Persistence: Simulating Other Models
&lt;/h2&gt;

&lt;p&gt;In real-world applications, relationships are usually a mix of all types. Modern databases help handle this complexity:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB&lt;/strong&gt; supports lookups, a form of joins.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relational databases&lt;/strong&gt; now support JSON storage and manipulation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even as applications scale, some data remains unstructured, rapid, or requires locality (IoT, logs), so document models remain relevant.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The key takeaway isn’t just &lt;em&gt;which database to use&lt;/em&gt;, but &lt;strong&gt;when to use each data model&lt;/strong&gt;. A successful design balances relational, document, and graph models to best fit the application’s needs.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kleppmann, M. (2017). &lt;em&gt;Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems.&lt;/em&gt; O’Reilly Media.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>database</category>
      <category>softwareengineering</category>
      <category>softwaredevelopment</category>
      <category>programming</category>
    </item>
    <item>
      <title>OOP Didn’t Invent Anything New — It Just Gave Us Discipline</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Sun, 31 Aug 2025 07:25:13 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/oop-didnt-invent-anything-new-it-just-gave-us-discipline-4a5i</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/oop-didnt-invent-anything-new-it-just-gave-us-discipline-4a5i</guid>
      <description>&lt;p&gt;&lt;strong&gt;Deepak Singh&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
3 min read · 13 hours ago  &lt;/p&gt;



&lt;p&gt;Encapsulation, inheritance, polymorphism — we had them long before OOP.&lt;br&gt;&lt;br&gt;
What OOP really did was add discipline, structure, and accessibility.&lt;br&gt;&lt;br&gt;
And that’s exactly why it changed everything.  &lt;/p&gt;


&lt;h2&gt;
  
  
  The Big Misconception
&lt;/h2&gt;

&lt;p&gt;When people talk about Object-Oriented Programming (OOP), they often ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“But didn’t OOP give us encapsulation, inheritance, and polymorphism?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The truth: &lt;strong&gt;No, it didn’t.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All three concepts existed before OOP.&lt;br&gt;&lt;br&gt;
What OOP brought was a way to enforce constraints and discipline around how we use them.&lt;br&gt;&lt;br&gt;
Surprisingly, that’s what made OOP revolutionary.  &lt;/p&gt;

&lt;p&gt;Let’s break it down.  &lt;/p&gt;


&lt;h2&gt;
  
  
  Encapsulation
&lt;/h2&gt;

&lt;p&gt;Encapsulation means hiding data and exposing behavior through controlled interfaces.  &lt;/p&gt;

&lt;p&gt;But hiding from whom? And why?  &lt;/p&gt;
&lt;h3&gt;
  
  
  Encapsulation in C
&lt;/h3&gt;

&lt;p&gt;Long before OOP, C programmers used header files (&lt;code&gt;.h&lt;/code&gt;) and implementation files (&lt;code&gt;.c&lt;/code&gt;) to achieve encapsulation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// mathlib.h
#ifndef MATHLIB_H
#define MATHLIB_H

int add(int a, int b);
#endif
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// mathlib.c
#include "mathlib.h"

int add(int a, int b) {
    return a + b;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// main.c
#include &amp;lt;stdio.h&amp;gt;
#include "mathlib.h"

int main() {
    printf("%d\n", add(3, 4)); // Output: 7
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the caller knows a function exists but not how it works.&lt;br&gt;&lt;br&gt;
The same applies to structs: we can declare them without exposing internals, forcing access through functions.  &lt;/p&gt;

&lt;p&gt;This abstraction might feel like &lt;em&gt;“hiding a book from ourselves”&lt;/em&gt; — but it’s intentional.&lt;br&gt;&lt;br&gt;
By forcing ourselves to interact through controlled functions, we reduce coupling and make future changes safe.  &lt;/p&gt;
&lt;h3&gt;
  
  
  What OOP Added
&lt;/h3&gt;

&lt;p&gt;OOP gave us keywords like &lt;code&gt;private&lt;/code&gt;, &lt;code&gt;protected&lt;/code&gt;, and &lt;code&gt;public&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Account {
private:
    double balance; // hidden
public:
    void deposit(double amount) { balance += amount; }
    double getBalance() { return balance; }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This made encapsulation easier to apply in a single file, even though compilers still know about structure layouts.  &lt;/p&gt;

&lt;p&gt;So, OOP didn’t invent encapsulation — it just made it &lt;strong&gt;mainstream and practical&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Inheritance
&lt;/h2&gt;

&lt;p&gt;Inheritance means reusing code by deriving one type from another.  &lt;/p&gt;

&lt;p&gt;But guess what? Programmers were already doing it in C.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Inheritance in C
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;typedef struct {
    int x;
    int y;
} Point;

typedef struct {
    Point base;   // reuse Point
    char name[50];
} NamedPoint;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By embedding one struct inside another, C developers could simulate inheritance.&lt;br&gt;&lt;br&gt;
But it only worked for single inheritance, and managing it got messy.  &lt;/p&gt;
&lt;h3&gt;
  
  
  What OOP Added
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Point {
public:
    int x, y;
};

class NamedPoint : public Point {
public:
    std::string name;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OOP gave us &lt;strong&gt;first-class syntax&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Clean, readable, and no casting tricks required.  &lt;/p&gt;

&lt;p&gt;So again, inheritance wasn’t new.&lt;br&gt;&lt;br&gt;
OOP just made it &lt;strong&gt;simple and expressive&lt;/strong&gt;.  &lt;/p&gt;


&lt;h2&gt;
  
  
  Polymorphism
&lt;/h2&gt;

&lt;p&gt;Polymorphism means the same function name can behave differently depending on context.  &lt;/p&gt;
&lt;h3&gt;
  
  
  In OOP
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Shape {
public:
    virtual void draw() = 0;
};

class Circle : public Shape {
public:
    void draw() override { std::cout &amp;lt;&amp;lt; "Drawing Circle\n"; }
};
class Square : public Shape {
public:
    void draw() override { std::cout &amp;lt;&amp;lt; "Drawing Square\n"; }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Different objects (like &lt;code&gt;Circle&lt;/code&gt; or &lt;code&gt;Square&lt;/code&gt;) can implement the same function (e.g., &lt;code&gt;draw&lt;/code&gt;) in different ways.  &lt;/p&gt;
&lt;h3&gt;
  
  
  Polymorphism in C
&lt;/h3&gt;

&lt;p&gt;Before OOP, C programmers used &lt;strong&gt;function pointers&lt;/strong&gt; to achieve polymorphism.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;

typedef struct {
    void (*read)();
} Device;
void readFromConsole() { printf("Reading from console\n"); }
void readFromFile()    { printf("Reading from file\n"); }
int main() {
    Device console = { readFromConsole };
    Device file = { readFromFile };
    console.read(); // Reading from console
    file.read();    // Reading from file
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That worked, but it was clunky and risky.  &lt;/p&gt;

&lt;p&gt;OOP gave us a &lt;strong&gt;safer and cleaner way&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Why Polymorphism Changed Everything
&lt;/h2&gt;

&lt;p&gt;Among the three pillars, &lt;strong&gt;polymorphism was the game-changer&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Imagine plugging a new device into your PC.&lt;br&gt;&lt;br&gt;
Without polymorphism, you’d need to rewrite functions for each new device.&lt;br&gt;&lt;br&gt;
With polymorphism, as long as the device implements the same interface, your existing code just works.  &lt;/p&gt;

&lt;p&gt;Even more importantly, polymorphism enables &lt;strong&gt;Dependency Inversion&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Higher-level code no longer depends on low-level details.&lt;br&gt;&lt;br&gt;
Instead, both depend on shared contracts (interfaces).  &lt;/p&gt;

&lt;p&gt;This makes systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More maintainable
&lt;/li&gt;
&lt;li&gt;Easier to extend
&lt;/li&gt;
&lt;li&gt;Loosely coupled
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s real power.  &lt;/p&gt;




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

&lt;p&gt;OOP didn’t invent encapsulation, inheritance, or polymorphism.&lt;br&gt;&lt;br&gt;
Those ideas existed long before.  &lt;/p&gt;

&lt;p&gt;But OOP gave us &lt;strong&gt;discipline, structure, and accessibility&lt;/strong&gt; — making these ideas practical for everyday programming.  &lt;/p&gt;

&lt;p&gt;And that’s the real lesson:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Building great software isn’t always about inventing something new.&lt;br&gt;&lt;br&gt;
Sometimes, it’s about applying the right constraints to create powerful systems.  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;Martin, R. C. (2017). &lt;em&gt;Clean Architecture: A Craftsman’s Guide to Software Structure and Design&lt;/em&gt;. Prentice Hall.&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>programming</category>
      <category>oop</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Why Programming is Science Rather Than Maths</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Mon, 18 Aug 2025 17:49:18 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/why-programming-is-science-rather-than-maths-3dig</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/why-programming-is-science-rather-than-maths-3dig</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;"Testing shows the presence, not the absence, of bugs." — &lt;em&gt;Edsger Wybe Dijkstra&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I ask you whether programming is fundamentally &lt;strong&gt;science&lt;/strong&gt; or &lt;strong&gt;mathematics&lt;/strong&gt;, many people would say mathematics. It feels like it — we use variables, functions, operators, and assignments, which all look like math.  &lt;/p&gt;

&lt;p&gt;But if we go down to history, we'll see that programming started as a vision to make it mathematical — and then, fortunately or unfortunately (you decide), it transformed into a science.  &lt;/p&gt;

&lt;p&gt;Maybe this is why we study &lt;strong&gt;Computer Science&lt;/strong&gt; and not &lt;em&gt;Computer Mathematics&lt;/em&gt;.  &lt;/p&gt;

&lt;p&gt;The real question is: &lt;strong&gt;Why?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Why is programming a science and not maths?&lt;br&gt;&lt;br&gt;
And could programming have been better if it had stayed mathematical?  &lt;/p&gt;

&lt;p&gt;You may not get the answer to all of these questions in this article — some are still a "black hole" for us. But you'll understand why &lt;strong&gt;structured programming&lt;/strong&gt;, the backbone of modern software engineering, leans on science instead of math.  &lt;/p&gt;




&lt;h2&gt;
  
  
  The Beginning: Programming with Punch Cards
&lt;/h2&gt;

&lt;p&gt;In the early days, programming was done on punch cards. People at that time had no idea about the future of programming — they were simply trying to reduce the complexity of mathematical calculations.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edsger Wybe Dijkstra&lt;/strong&gt; lived in this era. A brilliant mind, he excelled in mathematics, physics, chemistry, and biology during high school. He later became one of the very first programmers, working with large computers, punch cards, and then core-level assembly languages.  &lt;/p&gt;

&lt;p&gt;The problem of that time? Programs were &lt;strong&gt;monolithic and tightly coupled&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
A single error could break the entire application, and even a small change in the problem meant rewriting huge amounts of code.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Dijkstra's Vision: Programming as Mathematics
&lt;/h2&gt;

&lt;p&gt;Dijkstra wanted programming to be like mathematics, where we rely on already-proven &lt;strong&gt;lemmas, theorems, and corollaries&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;In mathematics, proofs build on previous truths:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We don't re-prove the basics every time.
&lt;/li&gt;
&lt;li&gt;Lemmas (already true statements) help prove theorems.
&lt;/li&gt;
&lt;li&gt;This recursive building of truths leads to powerful results like integration, differentiation, gradient descent, backpropagation, and more.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dijkstra's vision was to prove fundamental algorithms, which would then serve as theorems, making larger algorithms provable more easily.  &lt;/p&gt;




&lt;h2&gt;
  
  
  The Roadblock: GOTO
&lt;/h2&gt;

&lt;p&gt;In mathematics:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sequential statements can be proved by enumeration.
&lt;/li&gt;
&lt;li&gt;Iterations can be proved using mathematical induction.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But programming in those early days used &lt;strong&gt;GOTO&lt;/strong&gt; — an instruction that transfers control &lt;em&gt;anywhere&lt;/em&gt; in the program. This broke the possibility of enumeration and induction-based proofs.  &lt;/p&gt;

&lt;p&gt;The solution was to &lt;strong&gt;restrict GOTO&lt;/strong&gt;. That's how &lt;code&gt;if/else&lt;/code&gt;, &lt;code&gt;loops&lt;/code&gt;, and &lt;code&gt;breaks&lt;/code&gt; were born — controlled ways of transferring control.  &lt;/p&gt;

&lt;p&gt;This was a breakthrough. It gave us the ability to write &lt;strong&gt;modular, independent blocks of code&lt;/strong&gt; instead of monolithic programs.  &lt;/p&gt;

&lt;p&gt;But… the proofs never came.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Where Science Entered
&lt;/h2&gt;

&lt;p&gt;Even though Dijkstra's mathematical proofs never materialized, his ideas weren't wasted. The removal of &lt;code&gt;GOTO&lt;/code&gt; gave us &lt;strong&gt;structured programming&lt;/strong&gt; — and with it, a way to build modular, testable code.  &lt;/p&gt;

&lt;p&gt;Here's where &lt;strong&gt;science&lt;/strong&gt; took over:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In mathematics, we prove something to be &lt;strong&gt;true forever&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;In science, we don't prove truth — we prove &lt;strong&gt;falsehood&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;If after countless experiments we can't disprove a theory, we accept it as true (for now).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example: &lt;strong&gt;Newton's law of gravitation&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%2Fnk4kp3wyaxselm5beihn.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%2Fnk4kp3wyaxselm5beihn.png" alt="Gravitational Formula" width="317" height="159"&gt;&lt;/a&gt;&lt;br&gt;
was accepted until &lt;strong&gt;Einstein's relativity&lt;/strong&gt; disproved it.  &lt;/p&gt;

&lt;p&gt;Programming works the same way:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We test submodules with &lt;strong&gt;unit tests&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;If a test fails, we fix the module.
&lt;/li&gt;
&lt;li&gt;If it passes thousands of tests, we assume it works.
&lt;/li&gt;
&lt;li&gt;Then we combine modules and test again at a higher level.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is &lt;strong&gt;science at work&lt;/strong&gt;: truth until falsified.  &lt;/p&gt;




&lt;h2&gt;
  
  
  The Conclusion
&lt;/h2&gt;

&lt;p&gt;Fundamentally, programming is &lt;strong&gt;science&lt;/strong&gt;, not mathematics.  &lt;/p&gt;

&lt;p&gt;Dijkstra's vision of mathematical programming never fully came true. We don't know if it would have been &lt;em&gt;better&lt;/em&gt; — maybe, maybe not.  &lt;/p&gt;

&lt;p&gt;But what we do know is this:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Programming behaves like science.
&lt;/li&gt;
&lt;li&gt;We test, disprove, and iterate.
&lt;/li&gt;
&lt;li&gt;We can't prove code to be true for all cases, only that it hasn't failed yet.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that's why we say:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Programming is science. It is true… until we find a bug.&lt;/strong&gt;  &lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Martin, R. C. (2017). &lt;em&gt;Clean Architecture: A Craftsman's Guide to Software Structure and Design&lt;/em&gt;. Prentice Hall.
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>softwareengineering</category>
      <category>programming</category>
      <category>architecture</category>
      <category>science</category>
    </item>
    <item>
      <title>Do You Have a Good Software System? Of Course, Yes!</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Sun, 10 Aug 2025 16:53:21 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/do-you-have-a-good-software-system-of-course-yes-45ld</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/do-you-have-a-good-software-system-of-course-yes-45ld</guid>
      <description>&lt;p&gt;Do You Have a Good Software System? Of Course, Yes! Everyone will say that — until they get a failure that makes them lose millions.&lt;/p&gt;

&lt;p&gt;Before building a good software system, we have to know what really is a good software system. What are the measures of a good software system?&lt;/p&gt;

&lt;p&gt;After this article, you will get to know what is a good software system and why it is important. Or maybe I’ll tell you right now why it is important in short — yes, &lt;strong&gt;money&lt;/strong&gt;. Money is the why.  &lt;/p&gt;

&lt;p&gt;With a good system, your application will be alive most of the time, in most situations, and for a longer time — meaning more money will flow through your accounts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Things Get Complicated
&lt;/h2&gt;

&lt;p&gt;Before diving into all these measures, we have to go through data systems — why things get complicated even when we have amazing modern tools to work with. We have tools for everything: servers, databases, frontend technologies, and more.&lt;/p&gt;

&lt;p&gt;When a user is interacting with data stored in a DB, it’s not just like a direct operation on data like we do on our local system. Even in a simple system, there are multiple tools working together like caching tools, indexing tools, or message queues. All these work together to give the end user a fast and efficient response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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%2Fbauiitm18n2gmqsm3onq.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%2Fbauiitm18n2gmqsm3onq.png" alt="System Design" width="800" height="572"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the data system where data is traveling through several tools, and we have to take care of every part of the tool. For example, if the name of a user is changed in the DB, it should also reflect in the cache memory.&lt;/p&gt;

&lt;p&gt;And look here — for every part like caching, DB, and indexing, we are doing them separately. Even if a modern DB can provide caching, it is not as effective as caching as a separate tool. So, in any software system, a lot of tools are involved in the data system, which makes it complicated and has to be handled properly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Measures of a Good Software System
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Reliability
&lt;/h3&gt;

&lt;p&gt;Most people are aware of a part of it and work on it most of the time. Reliability means the system works according to the requirements of the user. But not only this — the system should work even if some level of faults occur in components of the system, users send unreliable data to the DB, or the user should not be able to get unauthorized data.&lt;/p&gt;

&lt;p&gt;The system should be fault-tolerant, meaning it should work in case of different kinds of faults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hardware faults:&lt;/strong&gt; Hardware faults like system crashes, electricity going down, hard disk failures, and more. Physical devices are prone to faults and even have some lifespan after which they stop working. To handle this, we use things like RAID configurations, dual power supplies, and diesel supply in emergencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Software faults:&lt;/strong&gt; Software can sometimes behave unpredictably due to several conditions like heavy CPU or data workload, defective data, legacy software, platform dependency, and others. If one component is affected, others should still work — meaning less coupling in the system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human faults:&lt;/strong&gt; Mistakes are part of humans, and we can’t separate them from us. Human faults are always there in any software system, but they should not make the system stop working. While working, a separate sandbox should be provided to engineers with separate data to reduce risks.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Scalability
&lt;/h3&gt;

&lt;p&gt;If the system is reliable at the current load, it doesn’t mean it will work at 10x the data load. We must make the system handle more data according to the growth of the application. Growth is always unpredictable, so ignoring scalability is risky (though in the case of an MVP, we can skip it).&lt;/p&gt;

&lt;p&gt;We first need load parameters that define how load will increase. It may seem simple to just increase the number of user requests, but in most cases, it’s not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Twitter (2012 data)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Post Tweet:&lt;/strong&gt; 4.6k requests/sec on average, over 12k/sec at peak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Home Timeline:&lt;/strong&gt; 300k requests/sec.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two approaches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A global DB with all tweets, all writes done here, and the feed fetched by matching followers in the DB.
&lt;/li&gt;
&lt;li&gt;Each user has their own cache with tweets from only their followers — reducing read complexity but increasing writes.&lt;/li&gt;
&lt;/ol&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%2Fgoj1cdxh2jc7fax0ggoe.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%2Fgoj1cdxh2jc7fax0ggoe.png" alt="Twitter Example" width="738" height="265"&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%2Fybxc0doxll4f3mfmh22j.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%2Fybxc0doxll4f3mfmh22j.png" alt="Twitter Example" width="737" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twitter switched from the first to the second method for scalability. Now, followers per user became a critical load parameter. If someone has 30 million followers, write operations increase very rapidly.&lt;/p&gt;

&lt;p&gt;When testing scalability, &lt;strong&gt;response time is key&lt;/strong&gt; — but average response time is not a good metric. It hides slow requests. Amazon, for example, may have an average of 200ms, but its slowest 5% requests could be over 1 second — possibly from its most valuable users.&lt;/p&gt;

&lt;p&gt;Percentiles like &lt;code&gt;p50&lt;/code&gt;, &lt;code&gt;p95&lt;/code&gt;, &lt;code&gt;p99&lt;/code&gt;, and &lt;code&gt;p999&lt;/code&gt; are better metrics. They tell exactly how many requests are slower. But if improving extreme percentiles costs too much, avoid it.&lt;/p&gt;

&lt;p&gt;Also, slow requests can block faster ones because of limited CPU or DB parallelism. In request chains, the probability of hitting the slowest request increases, making the whole chain slow.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Maintainability
&lt;/h3&gt;

&lt;p&gt;At the start of building a software system, we focus on meeting requirements and implementing features. Over time, as the application grows, every new change requires going through older databases and code — which must be clean and organized to avoid productivity loss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key maintainability practices:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid redundant complexity that doesn’t solve user problems.&lt;/li&gt;
&lt;li&gt;Use abstraction to reduce coupling.&lt;/li&gt;
&lt;li&gt;Keep monitoring systems active.&lt;/li&gt;
&lt;li&gt;Practice Test-Driven Development (TDD).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now you understand how to know if a system is a good software system. Go let your business boom in the market — and don’t let technology leave you behind. These metrics measure the goodness of a software system regardless of the language, tool, or framework you use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now whenever someone asks — "Do you have a good software system?" You can say: Of course, YES!&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kleppmann, M. (2017). &lt;em&gt;Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems.&lt;/em&gt; O’Reilly Media.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>designsystem</category>
      <category>softwareengineering</category>
      <category>softwaredevelopment</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Software Success: Balancing Architecture and Behavior</title>
      <dc:creator>Deepak Singh</dc:creator>
      <pubDate>Sat, 09 Aug 2025 14:52:28 +0000</pubDate>
      <link>https://forem.com/deepak_negi_f1d64e7393000/software-success-balancing-architecture-and-behavior-3p6a</link>
      <guid>https://forem.com/deepak_negi_f1d64e7393000/software-success-balancing-architecture-and-behavior-3p6a</guid>
      <description>&lt;h2&gt;
  
  
  Software Success: Balancing Architecture and Behavior
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“Your software’s behaviour can win clients today — but only its architecture will keep it alive tomorrow.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What are the two important things a software is expected to do?&lt;br&gt;&lt;br&gt;
Well, everyone knows the first one — &lt;strong&gt;behaviour&lt;/strong&gt; — meaning it should behave according to requirements. Easy-pissy.&lt;br&gt;&lt;br&gt;
But what is the other important thing? &lt;strong&gt;Software architecture&lt;/strong&gt; — meaning how components of the software are arranged.&lt;/p&gt;

&lt;p&gt;But is it really important?&lt;br&gt;&lt;br&gt;
What if I tell you it has the same value as behaviour, or maybe more, but not less for sure?&lt;/p&gt;

&lt;p&gt;In this article, my sole purpose is to make you understand the value of architecture in such a way that your hands will get stuck on the keyboard if you do not care about architecture while building software.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Behaviour
&lt;/h2&gt;

&lt;p&gt;You, your client, your manager, your development team — all of these understand what behaviour is because this is the thing you will present to the client or users.&lt;/p&gt;

&lt;p&gt;You first develop the requirement document and then code the software so that it behaves according to that document. All the upcoming features and bugs are part of the behaviour of the software.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Architecture
&lt;/h2&gt;

&lt;p&gt;It is how our software is arranged. Sometimes, managers don’t even know what it is, and a manager will prioritise it lower (if not a good manager) until he comes up with actual data — yes, data — which will reveal how much loss the company is making because of poor architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Data That Proves It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;This shows the number of employees in 8 versions of a software:&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%2Fwizdxk3jba9fvvpr26xk.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%2Fwizdxk3jba9fvvpr26xk.png" alt="Employees per version graph" width="572" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And this is the productivity per release of the software:&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%2F61ztc3v49kqdp4ydg1cx.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%2F61ztc3v49kqdp4ydg1cx.png" alt="Productivity graph" width="528" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It kept decreasing, and at a point, it will become &lt;strong&gt;0&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Zero productivity — man, just think — it means you will not be able to change the software according to future requirements. Then what’s the purpose of the software anymore?&lt;/p&gt;

&lt;p&gt;Okay, first you might think that it is impossible that we can’t change the software anymore, right?&lt;br&gt;&lt;br&gt;
But if its cost is so high that it makes you losses, then you don’t change it. This is what I mean by &lt;strong&gt;zero productivity&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why It Happens
&lt;/h2&gt;

&lt;p&gt;So why did it happen even with the increasing number of people per release?  &lt;/p&gt;

&lt;p&gt;Well, if the architecture of the software is so bad, then when you have to change something in it, you don’t understand where to start and how many files to change.&lt;br&gt;&lt;br&gt;
It becomes riskier, harder, and takes more time, which costs more to the company.&lt;/p&gt;

&lt;p&gt;But with good architecture, even an intern can add a new functionality because he doesn’t have to focus on the coding hell — only on meeting the requirements.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Great Experiment by Jason Gorman
&lt;/h2&gt;

&lt;p&gt;This will make most people believe everything written here. Jason conducted this test over a period of six days.&lt;/p&gt;

&lt;p&gt;Each day, he completed a simple program to convert integers into Roman numerals. He knew his work was complete when his predefined set of acceptance tests passed.&lt;br&gt;&lt;br&gt;
Each day, the task took a little less than 30 minutes.&lt;/p&gt;

&lt;p&gt;Jason used a well-known cleanliness discipline named &lt;strong&gt;Test-Driven Development (TDD)&lt;/strong&gt; on the first, third, and fifth days.&lt;br&gt;&lt;br&gt;
On the other three days, he wrote the code without that discipline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And here are the results:&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%2F5htb4y5ygj3lw6f3bvtk.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%2F5htb4y5ygj3lw6f3bvtk.png" alt="code-review-example.png" width="578" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can clearly see that when done with good architecture practices, the work is completed way faster.&lt;br&gt;&lt;br&gt;
And this is the data we have to rely on — not our intuitive decisions.&lt;/p&gt;




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

&lt;p&gt;We all think we have to finish the behaviour and can focus on architecture later — but no, there is no time for us to do it later.&lt;br&gt;&lt;br&gt;
With each bad architecture, software becomes less flexible to change and performance decreases.&lt;/p&gt;

&lt;p&gt;The conclusion of this article is that architecture has the same or more value than the behaviour of the software.&lt;br&gt;&lt;br&gt;
If we want to make software live longer, then a good architecture should be chosen, and we must be consistent with it.&lt;/p&gt;

&lt;p&gt;But behaviour is also an important aspect, as we all know, so choosing a good balance and setting priorities is important.&lt;/p&gt;




&lt;p&gt;That’s it for this article. I will keep showing up with future articles about &lt;strong&gt;Clean Architecture&lt;/strong&gt; as well as other important engineering concepts like &lt;strong&gt;system design, databases, and problem solving&lt;/strong&gt; — the real things that are needed.&lt;/p&gt;




</description>
      <category>softwareengineering</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
