<?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: Ali Shirani</title>
    <description>The latest articles on Forem by Ali Shirani (@alishirani).</description>
    <link>https://forem.com/alishirani</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%2F761650%2Fe0542820-185a-480f-a569-07ef055361e4.jpeg</url>
      <title>Forem: Ali Shirani</title>
      <link>https://forem.com/alishirani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alishirani"/>
    <language>en</language>
    <item>
      <title>100 Ways to Earn Extra Cash as a Developer 💰</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Sat, 20 Sep 2025 22:46:45 +0000</pubDate>
      <link>https://forem.com/alishirani/100-ways-to-earn-extra-cash-as-a-developer-6dk</link>
      <guid>https://forem.com/alishirani/100-ways-to-earn-extra-cash-as-a-developer-6dk</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Bj21pmmF7yM"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Times are still tough inflation, layoffs, AI disruption but developers? We’re still in demand. Not just for jobs… but for &lt;em&gt;side income&lt;/em&gt;.&lt;br&gt;&lt;br&gt;
This isn’t about “get rich quick.” It’s about leveraging your skills smartly, ethically, and sustainably.&lt;br&gt;&lt;br&gt;
I’ve tested, researched, and updated every single option below. All links work. All platforms are live. All advice is current as of Q2 2025.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. Web Monetization &amp;amp; Attention-Based Earnings
&lt;/h2&gt;

&lt;p&gt;Forget ads. Think: &lt;strong&gt;user-consented micro-payments&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Brave Creators&lt;/strong&gt; (formerly Brave Rewards):&lt;br&gt;&lt;br&gt;
Get paid in BAT when Brave users tip you or view your content. Now requires &lt;strong&gt;verified identity + Uphold/Gemini wallet&lt;/strong&gt;. Avg: $5–$50/month for small blogs/repos.&lt;br&gt;&lt;br&gt;
👉 &lt;em&gt;Tip: Add &lt;code&gt;brave://rewards/creators&lt;/code&gt; to your site footer.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;Value4Value&lt;/strong&gt; protocols (PodcastIndex, Web Monetization via Coil → now part of &lt;a href="https://stremio.com/" rel="noopener noreferrer"&gt;Stremio&lt;/a&gt; ecosystem).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Monetization Standard (ILP)&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Still alive! Use &lt;code&gt;&amp;lt;meta name="monetization" content="$ilp.uphold.com/your-pointer"&amp;gt;&lt;/code&gt; + platforms like &lt;a href="https://geyser.fund/" rel="noopener noreferrer"&gt;Geyser&lt;/a&gt; (Bitcoin Lightning) or &lt;a href="https://wallet.stremio.com/" rel="noopener noreferrer"&gt;Stremio Wallet&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Low effort, passive. Best for blogs, docs, open-source profiles.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. API-as-a-Service (Still Hot!)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RapidAPI Hub&lt;/strong&gt; is still the king — but now with &lt;strong&gt;Stripe Connect payouts&lt;/strong&gt;, usage analytics, and team billing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New: You can now &lt;strong&gt;monetize GraphQL APIs&lt;/strong&gt; and add &lt;strong&gt;rate-limiting tiers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Trend: Wrap &lt;strong&gt;OpenAI/Anthropic/Mistral APIs&lt;/strong&gt; with custom logic (e.g., “Tone Analyzer for Customer Support”) → charge per call.&lt;/li&gt;
&lt;li&gt;Free tier? Yes. Payout threshold: $50.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🚀 &lt;em&gt;Starter idea: Turn any npm package into a REST endpoint using serverless (Vercel/Cloudflare).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Issue Bounties → Now Better Than Ever
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.bountysource.com/" rel="noopener noreferrer"&gt;BountySource&lt;/a&gt;&lt;/strong&gt; (still active, integrates with GitHub)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gitstart.com/" rel="noopener noreferrer"&gt;GitStart&lt;/a&gt;&lt;/strong&gt; — pays devs to fix OSS bugs ($50–$500/task)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://maintainermountaineer.com/" rel="noopener noreferrer"&gt;Maintainer Mountaineer&lt;/a&gt;&lt;/strong&gt; — bounties for docs, triage, CI fixes&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Pro tip: Filter by “good first issue” + “bounty” labels on GitHub.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. Sponsorships — Smarter, Broader, Easier
&lt;/h2&gt;

&lt;p&gt;GitHub Sponsors is &lt;strong&gt;still zero-fee&lt;/strong&gt; and now supports &lt;strong&gt;monthly AND one-time&lt;/strong&gt; donations.&lt;/p&gt;

&lt;p&gt;New players:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenCollective&lt;/strong&gt; → Now allows &lt;strong&gt;project-specific fiscal hosting&lt;/strong&gt; + automated expense reports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LFX Crowdfunding&lt;/strong&gt; (Linux Foundation) → Grants + matching funds for CNCF, Hyperledger projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SustainOSS&lt;/strong&gt; → Community grants for maintainers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tidelift&lt;/strong&gt; → Still enterprise-focused. Pays $200–$2000/month for supported packages.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 &lt;em&gt;Action: Add &lt;code&gt;.github/FUNDING.yml&lt;/code&gt; + link to ALL your READMEs. Even tiny repos get $5–$20/month.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. Tips — Still Work, But Platforms Changed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ko-fi&lt;/strong&gt; → Still great. Now supports &lt;strong&gt;Shopify-like storefronts&lt;/strong&gt; for digital goods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Buy Me a Coffee&lt;/strong&gt; → Now takes &lt;strong&gt;5% fee&lt;/strong&gt; (was 0%). Still clean UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zooomy&lt;/strong&gt; (crypto + fiat), &lt;strong&gt;Junto&lt;/strong&gt; (community tipping), &lt;strong&gt;Candle&lt;/strong&gt; (for creators under 18).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PayPal.Me&lt;/strong&gt; → Still works, but high fees (~3.5%).&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;em&gt;Never beg. Just add a discreet “Found this useful? ☕” link at the end of posts/repos.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  6. Corporate Funding — More Structured Now
&lt;/h2&gt;

&lt;p&gt;Companies like &lt;strong&gt;Microsoft, Google, AWS, Vercel, Netlify&lt;/strong&gt; now have formal &lt;strong&gt;Open Source Programs Offices (OSPOs)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;They offer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Logo placement&lt;/strong&gt; in README → $100–$1000/month&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintenance grants&lt;/strong&gt; → Apply via their OSPO portals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code sponsorship&lt;/strong&gt; → Pay to prioritize features&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🔍 &lt;em&gt;Where to look: GitHub Sponsors “Organizations”, OpenCollective “Backers”, LFX Projects.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  7. Hackathons — Still Alive, Mostly Virtual
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google Summer of Code (GSoC)&lt;/strong&gt; → Stipend now &lt;strong&gt;$1500–$6600&lt;/strong&gt; based on country + project scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MLH Fellowship&lt;/strong&gt; → Paid remote internships ($5000 stipend)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Devpost&lt;/strong&gt; → Still the hub. Filter by “prize &amp;gt; $1000”.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ETHGlobal, Solana Hacker Houses&lt;/strong&gt; → Crypto hackathons paying up to $50k in prizes.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🏆 &lt;em&gt;Pro move: Build something reusable → turn it into a SaaS or template post-hackathon.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  8. Dependency Funding — Easier Than Ever
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm fund&lt;/strong&gt; → Still works. Add to &lt;code&gt;package.json&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nl"&gt;"funding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"github"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/sponsors/yourname"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;OpenCollective’s “Dependency Dashboard”&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Sponsors → Dependency Tipping&lt;/strong&gt; → Still manual, but growing.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📦 &lt;em&gt;Even 100 weekly downloads can net you $10–$50/month. Start small.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  9. Bug Bounties — More Lucrative, More Platforms
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HackerOne&lt;/strong&gt; → Still #1. Avg payout: $500–$5000 for critical web app bugs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Immunefi&lt;/strong&gt; → Now covers &lt;strong&gt;DeFi, NFT, Layer 2&lt;/strong&gt;. Avg bounty: $10k–$250k.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;@lighthouse_audit&lt;/strong&gt; (for smart contracts), &lt;strong&gt;SafeBounty&lt;/strong&gt; (by Safe{Wallet})&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bugcrowd, Intigriti&lt;/strong&gt; → Still active. Lower payouts but faster triage.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🛡️ &lt;em&gt;Learn: PortSwigger Academy + PentesterLab. Start with low-hanging fruit (XSS, IDOR).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  10. Open-Core → Harder, But Possible
&lt;/h2&gt;

&lt;p&gt;Still valid — but &lt;strong&gt;license enforcement is key&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;Elastic License v2&lt;/strong&gt;, &lt;strong&gt;MongoDB SSPL&lt;/strong&gt;, or &lt;strong&gt;AGPLv3 + commercial exception&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Tools: &lt;strong&gt;LicenseZero&lt;/strong&gt;, &lt;strong&gt;Cryptlex&lt;/strong&gt; (for license keys + activation)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;em&gt;Warning: Big corps WILL ignore licenses. Have legal counsel or use escrow services.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  11. Premium Packages — Niche, But Growing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PrivJS&lt;/strong&gt; → Dead. Use:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PackagePhobia Pro&lt;/strong&gt; (analytics + private registry)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloudsmith&lt;/strong&gt; / &lt;strong&gt;PackageCloud&lt;/strong&gt; → Host private npm/pypi packages → charge access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gumroad&lt;/strong&gt; → Sell .tgz files directly&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧩 &lt;em&gt;Idea: Offer “Pro” version with TypeScript defs, priority support, extra utils.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  12. Support Plans — Now Automated
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Otechie&lt;/strong&gt; → Dead. Use:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Crisp.chat&lt;/strong&gt; + Stripe Billing → embed chat + paywall&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calendly Pro&lt;/strong&gt; → $12/user → book paid support calls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discord + Patreon&lt;/strong&gt; → Private channel for supporters&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 &lt;em&gt;Charge $50–$200/hr. Even 2 hrs/week = $400–$1600/month.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  13. Documentation — HIGH Demand
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Season of Docs (Google)&lt;/strong&gt; → Still runs. Stipend: $2500–$7500.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write the Docs&lt;/strong&gt; → Conference + job board for tech writers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scribe&lt;/strong&gt; (AI-powered doc generator) → sell auto-generated guides.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Julia Evans’ list&lt;/strong&gt; → Still gold. Companies like &lt;strong&gt;Stripe, Vercel, Supabase&lt;/strong&gt; hire freelance docs writers.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📖 &lt;em&gt;Rate: $50–$150/page. Start by documenting YOUR projects.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  14. Ethical Advertising — Still Viable
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EthicalAds&lt;/strong&gt; → Owned by Read the Docs. &lt;strong&gt;No tracking&lt;/strong&gt;. Min traffic: 50k/mo. CPM: $1–$5.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Carbon Ads&lt;/strong&gt; → Tech-only. Min: 100k/mo. CPM: $3–$10.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PlutoAds&lt;/strong&gt; (privacy-first, crypto-friendly)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🚫 &lt;em&gt;Avoid Google AdSense — low payouts, privacy-hostile.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  15. Selling Code — Risky, But Possible
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IndieMaker, PieceX&lt;/strong&gt; → Dead or spammy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gumroad&lt;/strong&gt; → Sell templates, boilerplates, plugins
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ThemeForest (Envato)&lt;/strong&gt; → WordPress, React, Vue templates ($20–$100/sale)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creative Market&lt;/strong&gt; → Design + code bundles&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;em&gt;Always credit OSS. Never reskin without permission.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  16. Selling Content — Better Tools Now
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gumroad&lt;/strong&gt; → Still 10%. Now has &lt;strong&gt;Subscriptions, Pay What You Want, Bundles&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AppSumo&lt;/strong&gt; → Still strong for lifetime deals. Takes 70% (!) but huge exposure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lemon Squeezy&lt;/strong&gt; → 5% fee, built-in taxes, subscriptions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Podia, Teachable&lt;/strong&gt; → For courses + digital products.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎥 &lt;em&gt;Bundle: Code + Video Walkthrough + Slack Community → charge $99–$299.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  17. Writing &amp;amp; eBooks — Self-Publishing Boom
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LeanPub&lt;/strong&gt; → Still 70%. Great for early access + updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon KDP&lt;/strong&gt; → Royalties now &lt;strong&gt;70% if priced $2.99–$9.99&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tapas&lt;/strong&gt; (serialized tech stories), &lt;strong&gt;Medium Partner Program&lt;/strong&gt; (if eligible).&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📚 &lt;em&gt;Top sellers: “AI Prompt Engineering for Devs”, “Next.js Auth Patterns”, “TypeScript Deep Dive”.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  18. Grants — More $$$ Available
&lt;/h2&gt;

&lt;p&gt;UPDATED LIST:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Sponsors Matching&lt;/strong&gt; → Up to $15k/year for top OSS maintainers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mozilla MOSS&lt;/strong&gt; → Up to $100k for privacy/security projects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NLnet Foundation&lt;/strong&gt; → €5k–€50k for Internet tech&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenSSF Alpha-Omega&lt;/strong&gt; → $50k+ for critical CVE patching&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Raspberry Pi Foundation&lt;/strong&gt; → £5k–£20k for edtech&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gitcoin Grants Round 19&lt;/strong&gt; → Quadratic funding for Web3/OSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol Labs Research Grants&lt;/strong&gt; (Filecoin/IPFS), &lt;strong&gt;Ethereum Foundation Grants&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📝 &lt;em&gt;Apply early. Most require 6–12 week review cycles.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  19. Hosting Events — Hybrid Is King
&lt;/h2&gt;

&lt;p&gt;Revenue streams:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ticket sales&lt;/strong&gt; → Use &lt;strong&gt;Tito&lt;/strong&gt;, &lt;strong&gt;Eventbrite&lt;/strong&gt;, &lt;strong&gt;Lu.ma&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sponsorships&lt;/strong&gt; → Offer logo, booth, speaking slot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workshops&lt;/strong&gt; → Charge $50–$200/person&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Virtual&lt;/strong&gt; → Use &lt;strong&gt;Hopin&lt;/strong&gt;, &lt;strong&gt;StreamYard&lt;/strong&gt;, &lt;strong&gt;Gather&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hackathons&lt;/strong&gt; → Prize pool sponsored by tech cos&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎤 &lt;em&gt;Start small: “React State Management Workshop” → 20 ppl @ $50 = $1000.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  20. Research Studies — Higher Pay Now
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Respondent.io&lt;/strong&gt; → $50–$200/hr for dev interviews&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Interviews&lt;/strong&gt; → $100–$300 for 60-min sessions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testable Minds&lt;/strong&gt; → $10–$30 for surveys&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dscout&lt;/strong&gt; (diary studies), &lt;strong&gt;Lookback&lt;/strong&gt; (usability tests)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;em&gt;Filter for “developer”, “engineer”, “technical” roles → higher pay.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  21. Creating Courses — Platforms Evolved
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Udemy&lt;/strong&gt; → Saturated. Avg: $10/course. Avoid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scrimba&lt;/strong&gt; → Interactive coding → rev share
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend Masters&lt;/strong&gt; → Invite-only, pays well
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Egghead.io&lt;/strong&gt; → Short lessons → $250–$500/video
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cursor.so&lt;/strong&gt; (AI pair-programming courses)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎓 &lt;em&gt;Bundle course + Discord community + office hours → charge $199–$499.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  22. Newsletters — Substack Still Dominates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Substack&lt;/strong&gt; → Keep 90% (after payment fees). Min payout: $100.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Buttondown&lt;/strong&gt; → Markdown-first, cheaper ($5/mo), no lock-in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ghost&lt;/strong&gt; → Self-hosted or managed. Built-in memberships.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ConvertKit&lt;/strong&gt; → For email automation + funnels.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;✉️ &lt;em&gt;Niche down: “AI Engineering Weekly”, “Rust Job Alerts”, “DevRel Digest”.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  23. Member-Only Sites — Easier Setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MemberStack&lt;/strong&gt; (for Webflow), &lt;strong&gt;Outseta&lt;/strong&gt; (all-in-one), &lt;strong&gt;Pico&lt;/strong&gt; (for creators)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patreon&lt;/strong&gt; → Still good for tiered rewards (early access, 1:1 calls)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ghost&lt;/strong&gt; → Built-in paywalls + newsletters&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🔐 &lt;em&gt;Offer: Private repo, monthly Q&amp;amp;A, resource library → $10–$50/month.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  24. Guest Posts — Still Pays, But Be Selective
&lt;/h2&gt;

&lt;p&gt;Sites that pay $100–$500/post:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smashing Magazine&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS-Tricks&lt;/strong&gt; (now owned by DigitalOcean)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LogRocket Blog&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;freeCodeCamp&lt;/strong&gt; (occasional paid spots)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The New Stack&lt;/strong&gt;, &lt;strong&gt;Infra Cloud Blog&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;✍️ &lt;em&gt;Pitch: “How I Reduced AWS Costs by 70% Using CDK” → solves a pain point.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  25. Consulting — Still the Goldmine
&lt;/h2&gt;

&lt;p&gt;Rates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Junior: $50–$100/hr
&lt;/li&gt;
&lt;li&gt;Mid: $100–$200/hr
&lt;/li&gt;
&lt;li&gt;Senior: $200–$500/hr
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Toptal&lt;/strong&gt; → Vets rigorously → $60–$200/hr
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gun.io&lt;/strong&gt; → For contract gigs
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upwork&lt;/strong&gt; → Bid strategically → avoid race-to-bottom&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🤝 &lt;em&gt;Start with ex-colleagues, LinkedIn DMs, local startups.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  26. Mentoring — Structured &amp;amp; Scalable
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MentorCruise&lt;/strong&gt; → $50–$300/month per mentee (long-term)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codementor&lt;/strong&gt; → $30–$100/hr (on-demand)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ADPList&lt;/strong&gt; (free, but leads to paid gigs), &lt;strong&gt;Glints Expert&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧭 &lt;em&gt;Specialize: “Next.js + Auth”, “AWS Cert Prep”, “Freelance Career Coaching”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  27. Tutoring — Booming Post-Pandemic
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Superprof&lt;/strong&gt; → Set your rate ($30–$150/hr)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wyzant&lt;/strong&gt; → US-focused, handles payments
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preply&lt;/strong&gt; → Language + tech tutoring
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schoolhouse.world&lt;/strong&gt; (free, but builds rep)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎓 &lt;em&gt;Teach: AP Computer Science, LeetCode prep, Python for Data Science.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  28. Social Media — Algorithm Changes
&lt;/h2&gt;

&lt;p&gt;Monetization thresholds (2025):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;YouTube&lt;/strong&gt; → 500 subs + 3k watch hours → Super Thanks, Memberships
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TikTok&lt;/strong&gt; → 10k followers → Creativity Program Beta ($1–$5/1k views)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instagram&lt;/strong&gt; → 10k → Reels Play Bonus (invite-only)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Twitter/X&lt;/strong&gt; → Needs &lt;strong&gt;Premium+&lt;/strong&gt; → Ad revenue share (tiny)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Twitch&lt;/strong&gt; → 50 subs OR 3 concurrent viewers avg → Bits, Subs&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎥 &lt;em&gt;Content: “Build X in 60 sec”, “Debugging Horror Stories”, “Tech Stack Breakdowns”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  29. Brand Deals — Micro-Influencers Win
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fiverr Collabs&lt;/strong&gt; → Brands find you
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;#paid, AspireIQ&lt;/strong&gt; → For Instagram/TikTok
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Koji&lt;/strong&gt; (link-in-bio + brand collabs)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🤝 &lt;em&gt;Pitch: “I’ll build a demo using your API/tool + tutorial video” → value beyond promo.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  30. Streaming — Dev Streams Are Growing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Twitch&lt;/strong&gt; → Extensions, Bits, Subs
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YouTube Live&lt;/strong&gt; → Super Chats, Memberships
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kick&lt;/strong&gt; → Higher rev share (95%), less saturated&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎮 &lt;em&gt;Stream: Pair programming, bug hunts, “Learn Rust Live”, game jams.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  31. SaaS — Still the Dream
&lt;/h2&gt;

&lt;p&gt;Tools to launch fast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stripe Billing&lt;/strong&gt; → Subscriptions in &amp;lt;1 day
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lemon Squeezy&lt;/strong&gt; → Handles global taxes
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paddle&lt;/strong&gt; → Full merchant of record
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orb&lt;/strong&gt; (usage-based billing), &lt;strong&gt;Syft&lt;/strong&gt; (metered billing)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🚀 &lt;em&gt;Idea: “AI-Powered README Generator”, “Automated PR Review Bot”, “Env Var Manager”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  32. Micro-SaaS — Low Risk, High Reward
&lt;/h2&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chrome extension that &lt;strong&gt;auto-fills Jira tickets from Slack&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Tool that &lt;strong&gt;converts Figma designs to Tailwind&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;CLI that &lt;strong&gt;checks package.json for security vulns&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Dashboard that &lt;strong&gt;tracks your GitHub streak + stats&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Charge $5–$20/month. 100 users = $500–$2000 MRR.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  33. Browser Extensions — Still Underrated
&lt;/h2&gt;

&lt;p&gt;Monetization:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Freemium&lt;/strong&gt; → Basic free, Pro $3–$10/month
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-time purchase&lt;/strong&gt; → $10–$50 (via Gumroad)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Donations&lt;/strong&gt; → Ko-fi link in options page&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🌟 &lt;em&gt;Idea: “AI Summarize Any Page”, “Dark Mode Everywhere”, “Copy Without Tracking”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  34. Mobile/Web Apps — App Stores Still Work
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apple App Store&lt;/strong&gt; → 15% fee after $1M/yr
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Play&lt;/strong&gt; → 15%
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PWA + Pago&lt;/strong&gt; → Sell subscriptions without stores&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📱 &lt;em&gt;Idea: “Regex Tester”, “Color Contrast Checker”, “JSON Formatter Pro”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  35. Websites for Small Biz — Always Needed
&lt;/h2&gt;

&lt;p&gt;Stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Webflow&lt;/strong&gt; → Designer-friendly
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Softr + Airtable&lt;/strong&gt; → No-code CMS
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WordPress + Elementor&lt;/strong&gt; → Still dominant&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💼 &lt;em&gt;Charge: $500–$5000/site + $50–$200/month hosting/support.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  36. Domain Flipping — Risky, But Strategic
&lt;/h2&gt;

&lt;p&gt;Tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NameBio&lt;/strong&gt; → Track sold domains
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ExpiredDomains.net&lt;/strong&gt; → Find dropping names
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Park.io&lt;/strong&gt; → Park + earn from type-in traffic&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 &lt;em&gt;Target: AI, Crypto, Climate, Health tech keywords. Buy .io, .ai, .app&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  37. User Testing — Higher Rates for Devs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UserTesting.com&lt;/strong&gt; → $10–$50/test (requires mic + cam)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TryMyUI&lt;/strong&gt; → $10/test
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UserFeel&lt;/strong&gt; → $7–$30/test
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UXtweak&lt;/strong&gt; (higher pay for technical tests)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧑‍💻 &lt;em&gt;You’ll spot UX flaws faster → more tests accepted → more $/hr.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  38. Microtasking — Only If Desperate
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon MTurk&lt;/strong&gt; → $2–$8/hr (avoid)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remotasks&lt;/strong&gt; → AI training → $10–$20/hr
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scale AI&lt;/strong&gt; → Data labeling → $15–$30/hr (apply as “technical rater”)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⏳ &lt;em&gt;Better: Automate with Python scripts → scrape, classify, submit.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  39. Surveys — Skip Unless High-Demand Niche
&lt;/h2&gt;

&lt;p&gt;Only worth it if you’re:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DevOps engineer
&lt;/li&gt;
&lt;li&gt;ML/AI specialist
&lt;/li&gt;
&lt;li&gt;Cybersecurity pro
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sites: &lt;strong&gt;Respondent.io&lt;/strong&gt;, &lt;strong&gt;User Interviews&lt;/strong&gt;, &lt;strong&gt;Dscout&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚫 &lt;em&gt;Avoid Swagbucks, InboxDollars — pennies/hour.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  40. Decentralized Nodes — Simplified
&lt;/h2&gt;

&lt;p&gt;Easiest in 2025:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Storj&lt;/strong&gt; → Rent disk space → $5–$50/month
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filecoin&lt;/strong&gt; → More complex, higher reward
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mysterium&lt;/strong&gt; → Run VPN node → $10–$30/month
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grass&lt;/strong&gt; (sell unused bandwidth → browser extension → $20–$100/month)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💻 &lt;em&gt;Run on old laptop/RPi. Passive income while idle.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  41. Web3 Income — DYOR Still Applies
&lt;/h2&gt;

&lt;p&gt;Still risky, but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Staking&lt;/strong&gt; → ETH, SOL, ADA → 3–8% APY
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity Pools&lt;/strong&gt; → Uniswap, Curve → 5–20% (impermanent loss risk)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restaking&lt;/strong&gt; (EigenLayer) → 10–15% APY on ETH&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;em&gt;Never invest more than you can lose. Use cold wallets. Avoid “guaranteed returns”.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  42. Affiliate Marketing — Niche Down
&lt;/h2&gt;

&lt;p&gt;High-commission tech programs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DigitalOcean&lt;/strong&gt; → $100–$200/referral
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render&lt;/strong&gt; → $50/referral
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vercel&lt;/strong&gt; → $50–$100
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cursor IDE&lt;/strong&gt; ($50), &lt;strong&gt;Warp Terminal&lt;/strong&gt; ($40)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📢 &lt;em&gt;Disclose! Use &lt;code&gt;?ref=yourname&lt;/code&gt;. Write honest reviews.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  43. Reseller — Leverage Existing Tools
&lt;/h2&gt;

&lt;p&gt;High-margin:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zapier&lt;/strong&gt; → 20% recurring
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make (Integromat)&lt;/strong&gt; → 30%
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retool&lt;/strong&gt; → 20%
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LangChain Cloud&lt;/strong&gt; (AI agents), &lt;strong&gt;LlamaIndex&lt;/strong&gt; (RAG tools)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🔄 &lt;em&gt;Bundle: “CRM + Email + Slack bot” → charge setup + monthly fee.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  44. Paid Trials — Still Exist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FluCamp UK&lt;/strong&gt; → £3,500–£5,000 for 1–2 weeks
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ClinicalTrials.gov&lt;/strong&gt; → Filter “healthy volunteers” + “compensation”
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DayTwo&lt;/strong&gt; (gut microbiome) → $200–$500&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🏥 &lt;em&gt;Requires health screening. Not for everyone.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  45. Freelancing — Avoid Race to Bottom
&lt;/h2&gt;

&lt;p&gt;Best platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Toptal&lt;/strong&gt; → $60–$200/hr (rigorous screening)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gun.io&lt;/strong&gt; → $80–$150/hr
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arc.dev&lt;/strong&gt; → Remote + vetted
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid&lt;/strong&gt;: Fiverr (unless premium gigs), Upwork (unless established)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 &lt;em&gt;Specialize: “Shopify + Hydrogen”, “Web3 Smart Contracts”, “AI Fine-Tuning”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  46. Speaking — Paid Gigs Are Back
&lt;/h2&gt;

&lt;p&gt;Where to find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sessionize&lt;/strong&gt; → Submit to CFPs
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lunch.dev&lt;/strong&gt; → Virtual, paid ($100–$500/talk)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meetup Pro&lt;/strong&gt; → Charge for virtual events&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎤 &lt;em&gt;Start local → record → post → attract paid invites.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  47. Remote Tech Support — Higher Pay Now
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SupportNinja&lt;/strong&gt; → $20–$40/hr
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Helpware&lt;/strong&gt; → $25–$50/hr
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Squadhelp&lt;/strong&gt; (for dev tool support)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⏰ &lt;em&gt;Requires SLA adherence. Best for night owls (US daytime = your night).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  48. &lt;em&gt;(Missing in original — ADDED)&lt;/em&gt; AI Prompt Engineering
&lt;/h2&gt;

&lt;p&gt;Sell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Custom prompts for ChatGPT/Claude → $5–$50/prompt
&lt;/li&gt;
&lt;li&gt;Prompt libraries → $29–$99 on Gumroad
&lt;/li&gt;
&lt;li&gt;“Prompt Engineer as a Service” → $50–$150/hr&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🤖 &lt;em&gt;Marketplaces: PromptBase, FlowGPT, Etsy (yes, really).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  49. Investing — Still the Silent Winner
&lt;/h2&gt;

&lt;p&gt;If you save $1000/month → invest in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VTI (Total Stock Market)&lt;/strong&gt; → 7–10% avg return
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VOO (S&amp;amp;P 500)&lt;/strong&gt; → same
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HDV (High Dividend)&lt;/strong&gt; → 3–4% yield + growth&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📈 &lt;em&gt;$1000/mo @ 8% = $180,000 in 10 years. Side hustles can’t beat compounding.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  50. Better Main Job — Often the Best ROI
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Switching jobs → avg &lt;strong&gt;10–30% raise&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Negotiate remote → save $500+/month on commute
&lt;/li&gt;
&lt;li&gt;Ask for equity → startup upside&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💼 &lt;em&gt;Update LinkedIn → recruiters will find YOU. Interview even if not looking.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  51. Sell AI Fine-Tuned Models
&lt;/h2&gt;

&lt;p&gt;Platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Replicate&lt;/strong&gt; → Deploy &amp;amp; monetize fine-tuned LLMs (e.g., “Legal Clause Generator v2”)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hugging Face Spaces + Stripe&lt;/strong&gt; → Charge per inference&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modal Labs&lt;/strong&gt; → Serverless GPU → charge via API&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Example: Fine-tune Mistral on medical jargon → sell to clinics @ $0.01/query.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  52. Build &amp;amp; Sell “AI Agent Templates”
&lt;/h2&gt;

&lt;p&gt;Use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LangChain&lt;/strong&gt;, &lt;strong&gt;LlamaIndex&lt;/strong&gt;, &lt;strong&gt;AutoGen&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Package as &lt;code&gt;.zip&lt;/code&gt; with config + docs → sell on Gumroad ($49–$199)&lt;/li&gt;
&lt;li&gt;Offer “Deploy to Vercel/Replit” button&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🤖 &lt;em&gt;Templates: “Customer Support Bot”, “SEO Content Writer”, “Meeting Summarizer”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  53. Create VS Code / JetBrains Plugins
&lt;/h2&gt;

&lt;p&gt;Monetize via:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace donations&lt;/strong&gt; (GitHub Sponsors link in README)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pro version&lt;/strong&gt; (extra features → Gumroad license key)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sponsorware&lt;/strong&gt; (unlock after sponsoring)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🔌 &lt;em&gt;Idea: “AI Commit Message Generator”, “.env Validator”, “PR Checklist Assistant”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  54. License Your GitHub Actions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open-source base action → free&lt;/li&gt;
&lt;li&gt;“Pro” version with Slack alerts, retry logic, audit logs → $5/user/month via Lemon Squeezy&lt;/li&gt;
&lt;li&gt;Host private version on &lt;strong&gt;GitHub Marketplace&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚙️ &lt;em&gt;Example: “Auto-deploy on PR merge + rollback if tests fail”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  55. Run a Paid CLI Tool
&lt;/h2&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;npx my-tool@latest --pro-key=xxx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Charge via &lt;strong&gt;Stripe Checkout&lt;/strong&gt; or &lt;strong&gt;Paddle&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;oclif&lt;/strong&gt; or &lt;strong&gt;commander.js&lt;/strong&gt; to build&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🖥️ &lt;em&gt;Tools: “Generate Terraform from YAML”, “Convert Figma to Tailwind”, “Audit Dependencies”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  56. Sell Digital “Dev Kits”
&lt;/h2&gt;

&lt;p&gt;Bundle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Starter templates (Next.js + Auth + DB)&lt;/li&gt;
&lt;li&gt;Custom hooks, utils, scripts&lt;/li&gt;
&lt;li&gt;Video walkthrough + Discord access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gumroad&lt;/strong&gt; ($99)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lemon Squeezy&lt;/strong&gt; ($129 w/ updates)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product Hunt&lt;/strong&gt; launch → boost visibility&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📦 &lt;em&gt;Niche: “Web3 Auth Kit”, “AI SaaS Boilerplate”, “Multi-Tenant Next.js Starter”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  57. Offer “Code Review as a Service”
&lt;/h2&gt;

&lt;p&gt;Platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PullRequest.com&lt;/strong&gt; → Get paid per review ($50–$150/hr)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CodeStream&lt;/strong&gt; → Integrated into IDE → charge teams&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-hosted&lt;/strong&gt;: Calendly + Stripe → $100/hr blocks&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;👀 &lt;em&gt;Specialize: “Security Review”, “Performance Audit”, “TypeScript Migration”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  58. Create &amp;amp; Sell Obsidian Plugins/Themes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Free base plugin → Pro features locked&lt;/li&gt;
&lt;li&gt;Sell via &lt;strong&gt;Gumroad&lt;/strong&gt; or &lt;strong&gt;BuyMeACoffee Shop&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Obsidian Hub&lt;/strong&gt; to promote&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 &lt;em&gt;Plugins: “AI Note Summarizer”, “Daily Standup Generator”, “Git History Visualizer”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  59. Monetize Your Dotfiles
&lt;/h2&gt;

&lt;p&gt;Yes, seriously.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Host on GitHub → free&lt;/li&gt;
&lt;li&gt;“Pro Dotfiles Pack” → includes:

&lt;ul&gt;
&lt;li&gt;Custom ZSH themes&lt;/li&gt;
&lt;li&gt;Aliases for AWS/K8s/Docker&lt;/li&gt;
&lt;li&gt;Auto-setup script&lt;/li&gt;
&lt;li&gt;Video guide&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Sell for $29–$79&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💻 &lt;em&gt;Market to: New Mac/Linux devs, DevOps engineers, terminal purists&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  60. Build “Notion Integrations as Products”
&lt;/h2&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Notion → Slack auto-poster&lt;/li&gt;
&lt;li&gt;Notion DB → CSV exporter (with filters)&lt;/li&gt;
&lt;li&gt;AI Summarizer for Notion pages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell via:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Gumroad&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notion Template Gallery&lt;/strong&gt; (apply as partner)&lt;/li&gt;
&lt;li&gt;Charge $10–$50/user&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🗃️ &lt;em&gt;Bundle with template + tutorial video → higher perceived value.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  61. Create &amp;amp; Sell Figma Plugins
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Free on Figma Community → Pro version via Gumroad&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Figma Plugin API&lt;/strong&gt; + React&lt;/li&gt;
&lt;li&gt;Charge one-time $15–$50&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎨 &lt;em&gt;Plugins: “Export to Tailwind”, “Token Sync to CSS”, “AI Color Palette Generator”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  62. Offer “Resume Optimization for Devs”
&lt;/h2&gt;

&lt;p&gt;Service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rewrite resumes using ATS-friendly keywords&lt;/li&gt;
&lt;li&gt;Optimize LinkedIn/GitHub profiles&lt;/li&gt;
&lt;li&gt;Mock interviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Charge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$99/resume&lt;/li&gt;
&lt;li&gt;$199 “Full Package” (Resume + LinkedIn + 1hr mock)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📄 &lt;em&gt;Market on Reddit r/cscareerquestions, Blind, Twitter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  63. Run a Paid “Dev Tool Newsletter”
&lt;/h2&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“AI Tools for Devs Weekly”&lt;/li&gt;
&lt;li&gt;“New npm Packages This Week”&lt;/li&gt;
&lt;li&gt;“Open Source Grants Alert”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Monetize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sponsorships ($200–$1000/newsletter)&lt;/li&gt;
&lt;li&gt;Paid tier for early access or deep dives ($5–$10/month)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;✉️ &lt;em&gt;Use Buttondown or Substack. Grow via DEV.to, Hacker News, Twitter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  64. Sell “Architecture Diagram Templates”
&lt;/h2&gt;

&lt;p&gt;Formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excalidraw (.excalidraw)&lt;/li&gt;
&lt;li&gt;Draw.io (.xml)&lt;/li&gt;
&lt;li&gt;Mermaid code snippets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gumroad ($19–$49/pack)&lt;/li&gt;
&lt;li&gt;Etsy (yes, devs buy here too)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🏗️ &lt;em&gt;Templates: “AWS Multi-AZ Setup”, “Next.js + Supabase”, “Kubernetes Cluster”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  65. Create “Dev Onboarding Kits”
&lt;/h2&gt;

&lt;p&gt;For startups or new hires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local dev setup script&lt;/li&gt;
&lt;li&gt;VS Code settings sync&lt;/li&gt;
&lt;li&gt;Conventions doc&lt;/li&gt;
&lt;li&gt;CI/CD checklist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CTOs on LinkedIn&lt;/li&gt;
&lt;li&gt;Indie Hackers forum&lt;/li&gt;
&lt;li&gt;AngelList startups&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🚀 &lt;em&gt;Price: $199–$499/company. White-label available.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  66. Build &amp;amp; Sell Reusable Terraform Modules
&lt;/h2&gt;

&lt;p&gt;Host on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Terraform Registry&lt;/strong&gt; (free)&lt;/li&gt;
&lt;li&gt;“Pro” version with support, examples, multi-cloud → sell via Gumroad&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;☁️ &lt;em&gt;Modules: “Secure EKS Cluster”, “Cost-Optimized S3”, “Zero-Downtime RDS”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  67. Offer “GitHub Profile Optimization”
&lt;/h2&gt;

&lt;p&gt;Service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rewrite bio, pin best repos&lt;/li&gt;
&lt;li&gt;Add metrics (stars, commits, streaks)&lt;/li&gt;
&lt;li&gt;Embed README stats, trophies, tech radar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Charge: $49–$99/profile&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🌟 &lt;em&gt;Upsell: “Monthly Growth Report” for $20/mo&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  68. Create “Cheat Sheet PDFs”
&lt;/h2&gt;

&lt;p&gt;Topics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“React Hooks Cheatsheet”&lt;/li&gt;
&lt;li&gt;“AWS CLI Commands”&lt;/li&gt;
&lt;li&gt;“Python Pandas One-Liners”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gumroad ($5–$15)&lt;/li&gt;
&lt;li&gt;Etsy (surprisingly good traffic)&lt;/li&gt;
&lt;li&gt;Bundle 5 for $29&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📄 &lt;em&gt;Design in Figma → export as PDF. Update quarterly → “2025 Edition”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  69. Sell “Interview Question Banks”
&lt;/h2&gt;

&lt;p&gt;Curate by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Company (FAANG, startups)&lt;/li&gt;
&lt;li&gt;Role (Frontend, DevOps, ML)&lt;/li&gt;
&lt;li&gt;Difficulty (Easy → Hard)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PDF + Anki deck&lt;/li&gt;
&lt;li&gt;Web app with spaced repetition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell: $29–$79&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 &lt;em&gt;Source: LeetCode, Glassdoor, Blind. Add video explanations → premium tier.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  70. Run a “Pair Programming Membership”
&lt;/h2&gt;

&lt;p&gt;Offer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2x 1hr sessions/month&lt;/li&gt;
&lt;li&gt;Code review + debugging help&lt;/li&gt;
&lt;li&gt;Career advice&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Patreon ($49–$99/month)&lt;/li&gt;
&lt;li&gt;Circle.so community&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;👯 &lt;em&gt;Limit to 20 members → high-touch, high-value.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  71. License Your Component Library
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;MIT licensed base → free&lt;/li&gt;
&lt;li&gt;“Enterprise Theme Pack” (dark mode, admin panels, charts) → $199/license&lt;/li&gt;
&lt;li&gt;Host on &lt;strong&gt;NPM&lt;/strong&gt; + sell licenses via &lt;strong&gt;Keygen.sh&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧩 &lt;em&gt;Stack: React + Tailwind. Include Storybook demos.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  72. Create “Dev Environment VMs”
&lt;/h2&gt;

&lt;p&gt;Pre-configured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu + Docker + Node + Python + VS Code Server&lt;/li&gt;
&lt;li&gt;Jupyter + Postgres + Redis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OVA/VMDK file ($29)&lt;/li&gt;
&lt;li&gt;Cloud image (AWS AMI, GCP Image) → $0.10/hr usage fee&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💾 &lt;em&gt;Market to: Bootcamp grads, data scientists, QA engineers&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  73. Sell “API Mocking Servers”
&lt;/h2&gt;

&lt;p&gt;Use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mockoon&lt;/strong&gt;, &lt;strong&gt;Postman Mock Server&lt;/strong&gt;, custom Express.js&lt;/li&gt;
&lt;li&gt;Pre-loaded with realistic data (users, products, orders)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Downloadable config ($19)&lt;/li&gt;
&lt;li&gt;Hosted version ($10/month)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;em&gt;Great for frontend devs testing without backend.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  74. Offer “Dev Twitter Thread Writing”
&lt;/h2&gt;

&lt;p&gt;Service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write viral-style threads explaining tech concepts&lt;/li&gt;
&lt;li&gt;Thread scheduling + engagement tips&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Charge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$99/thread&lt;/li&gt;
&lt;li&gt;$399/month (4 threads + analytics)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🐦 &lt;em&gt;Clients: Startups, indie hackers, tool makers wanting exposure.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  75. Create “Learning Paths” as Products
&lt;/h2&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Go from Zero to DevOps Engineer in 90 Days”&lt;/li&gt;
&lt;li&gt;“Build 5 AI Apps → Portfolio Ready”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily tasks&lt;/li&gt;
&lt;li&gt;Resource links&lt;/li&gt;
&lt;li&gt;Project milestones&lt;/li&gt;
&lt;li&gt;Community access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell: $99–$199&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🗺️ &lt;em&gt;Host on Teachable or Podia. Offer completion certificate.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  76. Build “No-Code Backend for Designers”
&lt;/h2&gt;

&lt;p&gt;Tool that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lets designers upload Figma → generates API + DB schema&lt;/li&gt;
&lt;li&gt;Outputs Swagger docs + Postman collection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Monetize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Freemium web app&lt;/li&gt;
&lt;li&gt;Pro: Export to Firebase/Supabase → $29/month&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎨 &lt;em&gt;Target: Webflow, Framer, Figma designers needing dynamic content.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  77. Sell “Dev Culture Decks”
&lt;/h2&gt;

&lt;p&gt;For engineering managers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“How to Run Effective Retros”&lt;/li&gt;
&lt;li&gt;“Onboarding Checklist”&lt;/li&gt;
&lt;li&gt;“PR Review Guidelines”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Notion template ($29)&lt;/li&gt;
&lt;li&gt;PDF + editable PPT ($49)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;👔 &lt;em&gt;Market on LinkedIn, Lenny’s Newsletter, Manager Slack groups.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  78. Offer “Tech Due Diligence for Investors”
&lt;/h2&gt;

&lt;p&gt;Service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review startup’s codebase, infra, team before investment&lt;/li&gt;
&lt;li&gt;Deliver report: risks, scalability, tech debt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Charge: $1,000–$5,000/report&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📊 &lt;em&gt;Clients: Angel investors, VC associates, accelerators.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  79. Create “Automated Demo Environments”
&lt;/h2&gt;

&lt;p&gt;For SaaS companies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spin up temporary demo env on request&lt;/li&gt;
&lt;li&gt;Pre-loaded with sample data&lt;/li&gt;
&lt;li&gt;Self-destruct after 1 hour&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tech:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker + Kubernetes + OAuth&lt;/li&gt;
&lt;li&gt;Charge company $99–$499/month&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎞️ &lt;em&gt;Saves sales teams hours. Huge value for B2B tools.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  80. Sell “Accessibility Audit Scripts”
&lt;/h2&gt;

&lt;p&gt;Bundle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Axe-core + Lighthouse CI scripts&lt;/li&gt;
&lt;li&gt;PDF report generator&lt;/li&gt;
&lt;li&gt;Remediation checklist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell: $79–$199&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;♿ &lt;em&gt;Target: Agencies, gov contractors, EU companies (WCAG compliance).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  81. Run “Micro-Internships” for Students
&lt;/h2&gt;

&lt;p&gt;Platform:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Post projects on &lt;strong&gt;Parker Dewey&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Pay students $200–$500 for 20–40hr gigs&lt;/li&gt;
&lt;li&gt;You keep 80% → profit $40–$100/project&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎓 &lt;em&gt;Projects: “Refactor legacy JS”, “Write Cypress tests”, “Migrate to TypeScript”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  82. License Your CI/CD Pipelines
&lt;/h2&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Zero-Downtime Deploy Pipeline”&lt;/li&gt;
&lt;li&gt;“Auto-Security Scan on PR”&lt;/li&gt;
&lt;li&gt;“Multi-Region Terraform Apply”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitLab CI YAML configs ($49)&lt;/li&gt;
&lt;li&gt;GitHub Actions reusable workflows ($79)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🔄 &lt;em&gt;Include video walkthrough + Slack support → bundle for $149.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  83. Create “Dev Salary Negotiation Scripts”
&lt;/h2&gt;

&lt;p&gt;Product:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Email templates&lt;/li&gt;
&lt;li&gt;Counter-offer calculators&lt;/li&gt;
&lt;li&gt;BATNA worksheets&lt;/li&gt;
&lt;li&gt;Role-play scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell: $39–$89&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💰 &lt;em&gt;Market to: Junior devs, bootcamp grads, career switchers.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  84. Build “AI-Powered Documentation Bots”
&lt;/h2&gt;

&lt;p&gt;Bot that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lives in Discord/Slack&lt;/li&gt;
&lt;li&gt;Answers questions about your codebase/docs&lt;/li&gt;
&lt;li&gt;Trained on your GitHub repo + READMEs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell to OSS projects or startups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$99/month hosted&lt;/li&gt;
&lt;li&gt;Self-host license $299&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🤖 &lt;em&gt;Use LangChain + ChromaDB + GPT-4-turbo.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  85. Sell “Engineering Metrics Dashboards”
&lt;/h2&gt;

&lt;p&gt;Pre-built:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DORA metrics (Lead Time, Deployment Freq)&lt;/li&gt;
&lt;li&gt;PR cycle time, review depth&lt;/li&gt;
&lt;li&gt;Incident response times&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Integrates with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub, GitLab, Jira, Linear&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Grafana dashboard JSON ($99)&lt;/li&gt;
&lt;li&gt;Hosted version ($199/month)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📈 &lt;em&gt;CTOs love this. Easy upsell from free → pro.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  86. Offer “Dev Rel Strategy Consulting”
&lt;/h2&gt;

&lt;p&gt;Help startups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build dev communities&lt;/li&gt;
&lt;li&gt;Launch SDKs&lt;/li&gt;
&lt;li&gt;Run hackathons&lt;/li&gt;
&lt;li&gt;Create sample apps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Charge: $150–$300/hr or $3k–$10k/project&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🤝 &lt;em&gt;Clients: Seed-stage startups, API-first companies, cloud platforms.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  87. Create “Remote Work Policy Templates”
&lt;/h2&gt;

&lt;p&gt;For engineering leaders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Async communication guidelines&lt;/li&gt;
&lt;li&gt;Meeting protocols&lt;/li&gt;
&lt;li&gt;Timezone overlap rules&lt;/li&gt;
&lt;li&gt;Tool stack recommendations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell as Notion/PDF: $79–$149&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🌍 &lt;em&gt;High demand post-2025 remote work shakeups.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  88. Sell “Incident Response Playbooks”
&lt;/h2&gt;

&lt;p&gt;Includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PagerDuty runbooks&lt;/li&gt;
&lt;li&gt;Comms templates (Slack, email, status page)&lt;/li&gt;
&lt;li&gt;Blameless retro guides&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PDF + Markdown&lt;/li&gt;
&lt;li&gt;Notion template&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Price: $129–$299&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;em&gt;Target: Startups scaling fast, fintech, healthtech.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  89. Build “AI Commit Message Generator SaaS”
&lt;/h2&gt;

&lt;p&gt;Users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste diff → get semantic commit message&lt;/li&gt;
&lt;li&gt;CLI + VS Code extension + web app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Monetize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free: 10 commits/month&lt;/li&gt;
&lt;li&gt;Pro: $5/month unlimited&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;✨ &lt;em&gt;Simple to build. Huge pain point. Easy virality.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  90. Offer “Technical Co-Founder as a Service”
&lt;/h2&gt;

&lt;p&gt;For non-tech founders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build MVP (4–8 weeks)&lt;/li&gt;
&lt;li&gt;Hand off with docs + training&lt;/li&gt;
&lt;li&gt;Optional ongoing support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Charge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$10k–$25k/project&lt;/li&gt;
&lt;li&gt;Or 5–10% equity + cash&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🤝 &lt;em&gt;Find clients: YC Co-Founder Matching, Indie Hackers, Twitter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  91. Create “Dev Book Club Kits”
&lt;/h2&gt;

&lt;p&gt;Each kit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Curated book (e.g., “Clean Code”)&lt;/li&gt;
&lt;li&gt;Chapter summaries&lt;/li&gt;
&lt;li&gt;Discussion questions&lt;/li&gt;
&lt;li&gt;Zoom discussion guide&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Engineering teams ($99/team)&lt;/li&gt;
&lt;li&gt;Bootcamps ($49/cohort)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📚 &lt;em&gt;Add author AMA → premium tier.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  92. Sell “Engineering Interview Scorecards”
&lt;/h2&gt;

&lt;p&gt;Templates for hiring managers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Technical rubrics&lt;/li&gt;
&lt;li&gt;Culture fit questions&lt;/li&gt;
&lt;li&gt;Calibration guides&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Sheets + Notion&lt;/li&gt;
&lt;li&gt;PDF + editable Word&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Price: $49–$99&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;👔 &lt;em&gt;HR departments will pay. Low competition.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  93. Build “Automated OSS Contribution Finder”
&lt;/h2&gt;

&lt;p&gt;App that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scans your skills (languages, frameworks)&lt;/li&gt;
&lt;li&gt;Finds “good first issues” matching your level&lt;/li&gt;
&lt;li&gt;One-click apply&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Monetize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free: basic matching&lt;/li&gt;
&lt;li&gt;Pro: $3/month → priority issues, mentor intro&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🌱 &lt;em&gt;Helps juniors. Funded by sponsorships from OSPOs.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  94. Offer “Dev Team Health Checks”
&lt;/h2&gt;

&lt;p&gt;Deliverable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;30-page report on:

&lt;ul&gt;
&lt;li&gt;Bus factor&lt;/li&gt;
&lt;li&gt;Tech debt hotspots&lt;/li&gt;
&lt;li&gt;CI/CD bottlenecks&lt;/li&gt;
&lt;li&gt;Knowledge silos&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Charge: $2,000–$5,000/team&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧑‍⚕️ &lt;em&gt;Like a doctor for engineering teams. Recurring clients.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  95. Create “AI Pair Programmer Prompts”
&lt;/h2&gt;

&lt;p&gt;Sell packs of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Debug this error: ___”&lt;/li&gt;
&lt;li&gt;“Refactor this to SOLID”&lt;/li&gt;
&lt;li&gt;“Write test for this function”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON for Cursor/Warp&lt;/li&gt;
&lt;li&gt;Text file for Copilot&lt;/li&gt;
&lt;li&gt;VS Code snippet pack&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Price: $19–$49/pack&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🤖 &lt;em&gt;Developers will pay to save mental energy.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  96. Sell “Cloud Cost Optimization Scripts”
&lt;/h2&gt;

&lt;p&gt;Bash/Python scripts that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find idle EC2/RDS instances&lt;/li&gt;
&lt;li&gt;Rightsize overprovisioned clusters&lt;/li&gt;
&lt;li&gt;Delete unattached volumes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Per cloud provider ($79/AWS, $79/GCP)&lt;/li&gt;
&lt;li&gt;Bundle for $129&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💸 &lt;em&gt;Companies waste $millions. Easy ROI for them.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  97. Run “Dev Tool Beta Tester Community”
&lt;/h2&gt;

&lt;p&gt;Recruit devs → get paid to test pre-release tools.&lt;/p&gt;

&lt;p&gt;You take 20% cut.&lt;/p&gt;

&lt;p&gt;Platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discord community (free to join)&lt;/li&gt;
&lt;li&gt;Companies pay you $50–$200/user for qualified feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;em&gt;Partner with: Vercel, Render, Supabase, Pinecone.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  98. Create “Engineering OKR Templates”
&lt;/h2&gt;

&lt;p&gt;For eng managers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quarterly goal setting&lt;/li&gt;
&lt;li&gt;KPIs for velocity, quality, innovation&lt;/li&gt;
&lt;li&gt;Alignment with product&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Notion template ($59)&lt;/li&gt;
&lt;li&gt;Workshop + customization ($499)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 &lt;em&gt;Massive need. Almost no good templates exist.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  99. Build “AI-Powered Standup Bots”
&lt;/h2&gt;

&lt;p&gt;Slack/Discord bot that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DMs team daily: “What did you do? Blockers?”&lt;/li&gt;
&lt;li&gt;Summarizes for manager&lt;/li&gt;
&lt;li&gt;Flags delays&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Monetize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free: 5 users&lt;/li&gt;
&lt;li&gt;Team: $10/month&lt;/li&gt;
&lt;li&gt;Enterprise: $50/month (SSO, audit logs)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🤖 &lt;em&gt;Saves managers hours. Easy to build with GPT-4 + Slack API.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  100. License Your “System Design Templates”
&lt;/h2&gt;

&lt;p&gt;Diagrams + docs for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;URL Shortener&lt;/li&gt;
&lt;li&gt;Chat App&lt;/li&gt;
&lt;li&gt;Payment Processor&lt;/li&gt;
&lt;li&gt;Recommendation Engine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tradeoff analysis&lt;/li&gt;
&lt;li&gt;Scaling paths&lt;/li&gt;
&lt;li&gt;Failure modes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sell: $99–$299/template&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🏗️ &lt;em&gt;Used by FAANG interviewees + startups building real systems.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧭 REAL TALK — Updated for 2025
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“Side hustles” sound sexy. Reality? Most earn &lt;strong&gt;$50–$500/month&lt;/strong&gt; after months of work.&lt;br&gt;&lt;br&gt;
Exceptions: SaaS, consulting, courses — but they require &lt;strong&gt;serious upfront effort&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  ✅ Do This Instead:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pick 1–2 methods MAX&lt;/strong&gt;. Master them.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate &amp;amp; systemize&lt;/strong&gt; (use AI, templates, Zapier).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track time vs $&lt;/strong&gt; — if &amp;lt; $20/hr, stop.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reinvest profits&lt;/strong&gt; into better tools, courses, or outsourcing.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protect your energy&lt;/strong&gt;. Burnout kills more side hustles than failure.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🚫 Avoid:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;“Passive income” scams
&lt;/li&gt;
&lt;li&gt;Crypto “double your money” schemes
&lt;/li&gt;
&lt;li&gt;Platforms taking &amp;gt;30% cut
&lt;/li&gt;
&lt;li&gt;Anything requiring you to “pay to play”&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Follow Me &amp;amp; Support
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://x.com/AliXShirani" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@YTCodeWithAli" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/ali-shirani-145bb61a1" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Found this useful? Support my work:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://buymeacoffee.com/alishirani" rel="noopener noreferrer"&gt;Buy Me a Coffee&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ko-fi.com/alishirani" rel="noopener noreferrer"&gt;Ko-fi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/sponsors/alishirani1384" rel="noopener noreferrer"&gt;GitHub Sponsors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Bj21pmmF7yM"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>beginners</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why React Won the Front-End Race (Love It or Hate It)</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Sun, 14 Sep 2025 21:30:42 +0000</pubDate>
      <link>https://forem.com/alishirani/why-react-won-the-front-end-race-love-it-or-hate-it-ce9</link>
      <guid>https://forem.com/alishirani/why-react-won-the-front-end-race-love-it-or-hate-it-ce9</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/O0D4WbTDbuQ"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Let's get one thing straight. React isn't just a front-end library. It's a religion. And if you're a front-end developer in this day and age, you're either a devout follower or a heretic using something "different" like Vue or Svelte. Congratulations on your bravery, you hipster.&lt;/p&gt;

&lt;p&gt;For the rest of us mortals, React is the undisputed king of the component castle. It won the great front-end war, and we're all just living in its kingdom. But &lt;em&gt;why&lt;/em&gt;? What dark magic did this "library" (yes, we'll get to that) use to capture the hearts, minds, and weekends of developers everywhere?&lt;/p&gt;

&lt;p&gt;Grab your coffee, question your life choices, and let's dive into why you should love React... or at least pretend to at your next job interview.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. It’s Backed by a Small, Indie Company Called... Meta
&lt;/h3&gt;

&lt;p&gt;Let's start with the elephant in the metaverse: React is the brainchild of Meta (you know, the company formerly known as Facebook).&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%2Fr1atb40c8had90k766i2.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%2Fr1atb40c8had90k766i2.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having one of the largest tech behemoths on the planet maintaining your favorite tool is... reassuring? It’s like knowing your car is being serviced by the same people who build spaceships. Sure, they might be harvesting your data on the side, but hey, at least you know the library won't be abandoned tomorrow because the creator got a new hobby.&lt;/p&gt;

&lt;p&gt;This corporate backing means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;A massive team&lt;/strong&gt; of terrifyingly smart people working on it.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Insane funding&lt;/strong&gt; for research and development.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Battle-tested at scale:&lt;/strong&gt; It powers Facebook and Instagram, so it can probably handle your to-do list app.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nothing says "job security" quite like hitching your wagon to the company that basically owns the internet's social graph. Just don't read the terms and conditions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Fun Fact:&lt;/strong&gt; There was a brief period of panic years ago over React's licensing. The community collectively lost its mind, and Facebook eventually relented and switched to the MIT license. Ah, good times.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  2. "It’s a Library, Not a Framework." (Repeat Until You Believe It)
&lt;/h3&gt;

&lt;p&gt;You will hear this phrase uttered by every React purist until the heat death of the universe. And they're not wrong, they're just... annoying.&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%2F5ukpaokit4k6clgism7a.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%2F5ukpaokit4k6clgism7a.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;A Framework (like Angular)&lt;/strong&gt; is like buying a complete LEGO Millennium Falcon kit. It has all the pieces and a very specific set of instructions. You have to build it their way.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;A Library (like React)&lt;/strong&gt; is like being handed a giant box of LEGO bricks and told, "Go on, build a spaceship. You figure it out. It's more &lt;em&gt;flexible&lt;/em&gt; this way."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This "flexibility" is React's greatest strength and your greatest source of pain. You get to choose your own adventure! And by adventure, I mean you get to have lengthy, soul-crushing debates about:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Your Endless Options&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;State Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Redux, MobX, Zustand, Jotai, Recoil, Context API...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Routing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;React Router, TanStack Router, Next.js Router...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Styling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CSS-in-JS, Styled-Components, Emotion, Tailwind...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Forms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Formik, React Hook Form, or just raw pain...&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The freedom is great until you're 25 dependencies deep and realize you've accidentally built a Frankenstein's monster of a &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. JSX: Or, "How I Learned to Stop Worrying and Love HTML in My JavaScript"
&lt;/h3&gt;

&lt;p&gt;Remember "separation of concerns"? That quaint old idea where your HTML, CSS, and JavaScript lived in separate houses and waved politely at each other from across the street?&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%2Faknt5zq64gm5k5pyo6hg.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%2Faknt5zq64gm5k5pyo6hg.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;React bulldozed those houses and built a giant, chaotic apartment complex called &lt;strong&gt;JSX&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At first, it looks like a crime against nature.&lt;/p&gt;

&lt;p&gt;It's weird. It's wonderful. And once you get used to it, going back to vanilla JS feels like writing with a chisel and stone. You start nesting components inside components inside components, creating a beautiful Russian doll of logic that only you (and maybe the compiler) can understand.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. The Virtual DOM: Actual Magic You Don't Need to Understand
&lt;/h3&gt;

&lt;p&gt;The Virtual DOM is React's secret sauce. It's the reason React is so "performant" and "blazingly fast." How does it work?&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%2Fobo6wbpuxaqgxw24p4er.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%2Fobo6wbpuxaqgxw24p4er.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The simple explanation:&lt;/strong&gt;&lt;br&gt;
React keeps a copy of the DOM in memory (the Virtual DOM). When state changes, it creates a &lt;em&gt;new&lt;/em&gt; Virtual DOM, compares it to the old one, and then calculates the most efficient way to update the &lt;em&gt;real&lt;/em&gt; DOM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The explanation you'll actually use:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Oh yeah, the VDOM is amazing. It does, uh... diffing... and batching... for minimal updates. Super efficient."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Just nod, sound confident, and nobody will question you. The beauty is you don't &lt;em&gt;have&lt;/em&gt; to understand the low-level details. It just works its magic in the background, making your app feel snappy while you focus on more important things, like centering a div.&lt;/p&gt;


&lt;h3&gt;
  
  
  5. State Management: A Journey Into Existential Dread
&lt;/h3&gt;

&lt;p&gt;Passing data in React starts out simple. It's called "props." You pass data from a parent component down to a child. Easy peasy.&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%2Fkpwyyz4easc69nog5ebo.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%2Fkpwyyz4easc69nog5ebo.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you need to pass a prop through five nested components that don't even use it. This is called &lt;strong&gt;prop drilling&lt;/strong&gt;, and it's the developer equivalent of being the middle person in a game of telephone.&lt;/p&gt;

&lt;p&gt;So, you reach for a "state management solution." Welcome to the jungle. You wanted to share one piece of information, and now you're learning about "reducers," "actions," "dispatchers," and "middleware." One wrong move, and your entire app breaks in ways that defy the laws of physics.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Developer:&lt;/strong&gt; "I just want to know if the user is logged in."&lt;br&gt;
&lt;strong&gt;React Ecosystem:&lt;/strong&gt; "Have you considered using a global, asynchronous, thunk-based state container with memoized selectors?"&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h3&gt;
  
  
  6. Hooks: The Shiny New Toy That Replaced the Shiny Old Toy
&lt;/h3&gt;

&lt;p&gt;Remember class components? With &lt;code&gt;this.setState&lt;/code&gt; and lifecycle methods like &lt;code&gt;componentDidMount&lt;/code&gt;? Ah, 2018 was a simpler time.&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%2Fmyfwosmimhiqo66yfydv.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%2Fmyfwosmimhiqo66yfydv.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, in a flash, &lt;strong&gt;Hooks&lt;/strong&gt; arrived and made everything better! And by "better," I mean "completely different and with a whole new set of rules you can't break."&lt;/p&gt;

&lt;p&gt;With Hooks like &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt;, you can write functional components that have state and side effects. It's cleaner! It's more modern! It's... confusing as heck at first.&lt;/p&gt;

&lt;p&gt;You &lt;em&gt;will&lt;/em&gt; accidentally create an infinite loop with &lt;code&gt;useEffect&lt;/code&gt;. It's a rite of passage. But once you master the arcane Rules of Hooks, you feel like a wizard. A very tired, frustrated wizard.&lt;/p&gt;


&lt;h3&gt;
  
  
  7. React Native: "Write Once, Run Everywhere*"
&lt;/h3&gt;

&lt;p&gt;And the final nail in the coffin for every other framework: &lt;strong&gt;React Native&lt;/strong&gt;. The promise was intoxicating: write your app once in React, and it will magically run on both iOS and Android.&lt;/p&gt;

&lt;p&gt;The reality is more like "write once, then spend weeks debugging why it looks perfect on iOS but is a dumpster fire on a specific model of Samsung phone."&lt;/p&gt;

&lt;p&gt;But even with its quirks, React Native is a game-changer. It brought the component-based architecture of React to the mobile world, allowing web developers to become mobile developers without having to learn Swift or Kotlin. It's a massive part of why the React ecosystem is just so darn dominant.&lt;/p&gt;


&lt;h3&gt;
  
  
  Conclusion: Resistance is Futile. Welcome to the Club.
&lt;/h3&gt;

&lt;p&gt;So why did React win?&lt;/p&gt;

&lt;p&gt;It had the perfect storm: the backing of a tech giant, a flexible (if chaotic) architecture, a revolutionary way of thinking about UI (JSX), and a killer ecosystem that expanded into mobile.&lt;/p&gt;

&lt;p&gt;React isn't just a library; it's a career path. You don't have to love it. But in this market, you kind of have to use it.&lt;/p&gt;

&lt;p&gt;So welcome. You're one of us now. Go forth, build components, manage state, and complain about why "it's not a framework." We'll see you on Stack Overflow.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/O0D4WbTDbuQ"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>I Animated Every Major Design Pattern (The Only Video You Need)</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Fri, 08 Aug 2025 14:03:14 +0000</pubDate>
      <link>https://forem.com/alishirani/i-animated-every-major-design-pattern-the-only-video-you-need-2lm4</link>
      <guid>https://forem.com/alishirani/i-animated-every-major-design-pattern-the-only-video-you-need-2lm4</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Ai-XguDEUag"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
If you’ve ever cracked open a programming book, you’ve probably seen the same black-and-white diagrams for design patterns.&lt;br&gt;&lt;br&gt;
You know… boxes, arrows, and the occasional sad UML chart.  &lt;/p&gt;

&lt;p&gt;I decided to change that.  &lt;/p&gt;

&lt;p&gt;Instead of another lecture or 300-page PDF, I &lt;strong&gt;brought every major design pattern to life&lt;/strong&gt; — fully animated, visually explained, and ridiculously satisfying to watch.  &lt;/p&gt;

&lt;p&gt;This isn’t your average “let’s talk about Singleton for 20 minutes” video.&lt;br&gt;&lt;br&gt;
It’s a &lt;strong&gt;rapid-fire, visually stunning journey&lt;/strong&gt; through the patterns you’ve heard of (and the ones you’ve probably never used but should).  &lt;/p&gt;

&lt;p&gt;In the video, you’ll see:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Factory, Builder, Prototype&lt;/strong&gt; — crafted like they’re straight out of a game engine.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observer, Strategy, State&lt;/strong&gt; — animated so you can &lt;em&gt;actually&lt;/em&gt; see the logic unfolding.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decorator, Adapter, Composite&lt;/strong&gt; — built like they belong in a sci-fi UI.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;And more…&lt;/strong&gt; yes, all the big ones.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every single pattern has &lt;strong&gt;color, motion, and personality&lt;/strong&gt; — so you don’t just memorize them, you &lt;em&gt;feel&lt;/em&gt; how they work.  &lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;If you’ve ever struggled to truly “get” design patterns, this is the one video you need to watch.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🎥 &lt;strong&gt;Watch the full animation showcase here:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=Ai-XguDEUag" rel="noopener noreferrer"&gt;▶ I Animated Every Major Design Pattern&lt;/a&gt;&lt;br&gt;
  &lt;iframe src="https://www.youtube.com/embed/Ai-XguDEUag"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>I Finally Built the Coolest Retro Dev Portfolio Ever! (You Won’t Believe the Tech Behind It...)</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Mon, 04 Aug 2025 12:05:48 +0000</pubDate>
      <link>https://forem.com/alishirani/i-finally-built-the-coolest-retro-dev-portfolio-ever-you-wont-believe-the-tech-behind-it-2k4f</link>
      <guid>https://forem.com/alishirani/i-finally-built-the-coolest-retro-dev-portfolio-ever-you-wont-believe-the-tech-behind-it-2k4f</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/NXXw5sYg71I"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if your developer portfolio looked like it was built in 1995... but powered by the best modern web tech?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this guide, we’re going full retro. We’re going to build a Windows 95-themed portfolio website using &lt;strong&gt;React&lt;/strong&gt;, &lt;strong&gt;Vite&lt;/strong&gt;, and &lt;strong&gt;TypeScript&lt;/strong&gt;. It's fast, nostalgic, and guaranteed to make recruiters do a double-take.&lt;/p&gt;

&lt;p&gt;If you're tired of the same cookie-cutter developer portfolios, this one's for you.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Build a Windows 95-Style Portfolio?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✨ &lt;strong&gt;Stand Out&lt;/strong&gt;: Most portfolios look the same. A retro OS-themed site instantly grabs attention.&lt;/li&gt;
&lt;li&gt;🎓 &lt;strong&gt;Learn by Doing&lt;/strong&gt;: You’ll reinforce frontend concepts by recreating a desktop environment.&lt;/li&gt;
&lt;li&gt;🚀 &lt;strong&gt;Fun Factor&lt;/strong&gt;: It's just plain cool. And memorable.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What We'll Use
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React&lt;/strong&gt; for building component-based UIs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vite&lt;/strong&gt; for lightning-fast builds and hot reloading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript&lt;/strong&gt; for safety and scalability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pixel fonts&lt;/strong&gt; + 90s color palette for the retro feel&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom CSS&lt;/strong&gt; (your choice)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Features to Build
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ☑ Resume Window
&lt;/h3&gt;

&lt;p&gt;Your "About Me" as a draggable Win95 window with tabs like "My Saga" and "Tech Stack."&lt;/p&gt;

&lt;h3&gt;
  
  
  ☑ Chess Game or Minigame
&lt;/h3&gt;

&lt;p&gt;A simple board or Easter egg to show off creativity.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☑ Contact Window
&lt;/h3&gt;

&lt;p&gt;GitHub, LinkedIn, Email styled as Win95 UI.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☑ Start Menu
&lt;/h3&gt;

&lt;p&gt;Navigation styled like the classic Windows taskbar and start button.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☑ Clippy (Optional but amazing)
&lt;/h3&gt;

&lt;p&gt;Drop in a pixel-style Clippy that gives tooltips or reacts to user actions.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Structure the App
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-vite@latest my-win95-portfolio &lt;span class="nt"&gt;--template&lt;/span&gt; react-ts
&lt;span class="nb"&gt;cd &lt;/span&gt;my-win95-portfolio
npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Break your components like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/components
  Window.tsx
  Taskbar.tsx
  StartMenu.tsx
  Resume.tsx
  Contact.tsx
/assets
  clippy.gif
  retro-icons.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use absolute positioning and z-index to simulate draggable windows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Retro Styling Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use fonts like &lt;strong&gt;Perfect DOS VGA 437&lt;/strong&gt; or &lt;strong&gt;PixelOperator&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Stick to colors like teal, gray, and navy&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;box-shadow&lt;/code&gt; and &lt;code&gt;border&lt;/code&gt; to emulate Win95 bevels&lt;/li&gt;
&lt;li&gt;Add hover sounds or animations for realism&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;Host your finished site on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vercel&lt;/strong&gt; or &lt;strong&gt;Netlify&lt;/strong&gt; for free&lt;/li&gt;
&lt;li&gt;Use a custom domain like &lt;code&gt;ali95.dev&lt;/code&gt; for extra style&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Result
&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%2F1n66i8ss1rkkpk5uvwth.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%2F1n66i8ss1rkkpk5uvwth.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Want to see it in action?&lt;br&gt;
Watch the full tutorial → &lt;a href="https://www.youtube.com/watch?v=NXXw5sYg71I" rel="noopener noreferrer"&gt;YouTube Video&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Wrap Up
&lt;/h2&gt;

&lt;p&gt;This isn’t just a fun project. It’s a &lt;strong&gt;unique way to tell your story as a developer&lt;/strong&gt;. It shows creativity, technical skill, and a strong eye for design — all in one pixel-perfect package.&lt;/p&gt;

&lt;p&gt;If you're job hunting or just want to build something truly yours, go retro. Go bold.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build a Windows 95 portfolio.&lt;/strong&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Like this post?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Star the &lt;a href="https://github.com/alishirani1384/win95-portfolio" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Share the &lt;a href="https://www.youtube.com/watch?v=NXXw5sYg71I" rel="noopener noreferrer"&gt;YouTube tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Or connect with me on &lt;a href="https://x.com/AliXShirani" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/ali-shirani-145bb61a1" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://github.com/alishirani1384" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/NXXw5sYg71I"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>ai</category>
    </item>
    <item>
      <title>Stop Writing Spaghetti Code: An Illustrated Guide to the Design Patterns That Will Make You a Better Developer</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Wed, 23 Jul 2025 22:27:01 +0000</pubDate>
      <link>https://forem.com/alishirani/stop-writing-spaghetti-code-an-illustrated-guide-to-the-design-patterns-that-will-make-you-a-4bh1</link>
      <guid>https://forem.com/alishirani/stop-writing-spaghetti-code-an-illustrated-guide-to-the-design-patterns-that-will-make-you-a-4bh1</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Ai-XguDEUag"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
You’ve been there. Staring at a file so tangled with dependencies that you’re afraid to even breathe on it. A function so bloated it needs its own table of contents. Code that works, sure, but it &lt;em&gt;feels&lt;/em&gt; fragile, like a Jenga tower one pull away from collapsing.&lt;/p&gt;

&lt;p&gt;We all start there. But what separates a junior developer from a senior architect isn't just knowing more syntax; it's knowing the &lt;strong&gt;secret language of structure&lt;/strong&gt;. It's having a mental toolkit of legendary blueprints to solve common problems with elegance and foresight.&lt;/p&gt;

&lt;p&gt;These blueprints are &lt;strong&gt;Design Patterns&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;They aren't code you copy and paste. They are battle-tested &lt;em&gt;ideas&lt;/em&gt; for how to organize your code to make it flexible, understandable, and robust. Today, we're not just going to learn them; we're going to visualize them. This is the illustrated guide you've been looking for.&lt;/p&gt;
&lt;h2&gt;
  
  
  Part 1: Creational Patterns (The Art of Making Things)
&lt;/h2&gt;

&lt;p&gt;Creational patterns are all about how we create objects, giving us more flexibility than a simple &lt;code&gt;new MyClass()&lt;/code&gt; allows.&lt;/p&gt;
&lt;h3&gt;
  
  
  🏭 The Assembly Line: The Factory Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How do we create objects without specifying the exact class, and centralize the creation logic?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; Imagine a car factory. You don't build the car yourself piece by piece. You tell the factory, "I want a blue sedan." The factory handles all the complex steps—welding, painting, assembly—and delivers a finished car. A Factory function does the same for your objects.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; A single function that handles the business logic of creating and returning objects for you.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  When you need to create many simple, similar objects.&lt;/li&gt;
&lt;li&gt;  When the type of object you need to create might change depending on input or environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Watch Out:&lt;/strong&gt; For very complex objects where memory is a concern, a Class might be more efficient as it shares methods via the prototype.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  👑 The Most Controversial Pattern: The Singleton
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How do we ensure there is one—and &lt;em&gt;only&lt;/em&gt; one—instance of a class throughout our entire application?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; Think of it as the manager of a global power core. Different parts of your app can plug into it to draw power or check its status, but there is only one core. You can't just build another one.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; A class that can only be instantiated once and provides a global point of access to that instance.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  For managing a truly global state, like a user session or a master configuration object.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Watch Out:&lt;/strong&gt; This is often an &lt;strong&gt;anti-pattern&lt;/strong&gt; in JavaScript. It creates global state, which can be hard to test and debug. Often, a simple exported object from a module achieves the same goal with less ceremony. Use with extreme caution.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  🧬 The Master Blueprint: The Prototype Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How does JavaScript handle inheritance and share methods between objects efficiently without wasting memory?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; Imagine a master blueprint for a car. Instead of giving every car its own copy of the entire engine schematic, you give every car a live link &lt;em&gt;back&lt;/em&gt; to the master blueprint. When a car needs to know how the engine works, it just looks at the blueprint. ES6 Classes are just a beautiful syntax built on top of this native feature.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; Objects share methods through a live link to a central &lt;code&gt;prototype&lt;/code&gt; object, saving massive amounts of memory.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  You use it every time you write a JavaScript class!&lt;/li&gt;
&lt;li&gt;  Directly, with &lt;code&gt;Object.create&lt;/code&gt;, when you want one object to directly inherit from another without classes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Watch Out:&lt;/strong&gt; Understanding the prototype chain is fundamental to understanding JavaScript.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Part 2: Structural Patterns (The Art of Organizing Things)
&lt;/h2&gt;

&lt;p&gt;Structural patterns are about how we compose objects and classes into larger, flexible structures.&lt;/p&gt;
&lt;h3&gt;
  
  
  🛡️ The Gatekeeper: The Proxy Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How can we intercept and control interactions with an object?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; Imagine a celebrity (the target object) and their bodyguard (the Proxy). You don't talk to the celebrity directly. You talk to the bodyguard, who can decide whether to pass your message along, log it, or reject it entirely.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; A stand-in object that wraps another object and "traps" operations like getting or setting properties, allowing you to add logic.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Validation:&lt;/strong&gt; Rejecting invalid data before it touches your object.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Logging/Debugging:&lt;/strong&gt; Knowing every time a property is accessed or changed.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Reactivity:&lt;/strong&gt; The foundation of frameworks like Vue and MobX.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Watch Out:&lt;/strong&gt; Proxies add a performance overhead. Avoid them in hot paths or loops that run thousands of times per second.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  ♻️ The Ultimate Recycler: The Flyweight Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How can we manage millions of similar objects without running out of RAM?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; Think of a library. They don't have a unique, heavy, hard-cover book for every single copy. They have one master book object (the shared, intrinsic data like title/author) and many lightweight library cards (the unique, extrinsic data like checkout status).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; Share common data between many objects to save memory, storing only the unique state on each object.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Game development (particles, trees, enemies).&lt;/li&gt;
&lt;li&gt;  Rendering huge datasets (spreadsheet cells, map tiles).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Watch Out:&lt;/strong&gt; It adds complexity. It's a trade-off: you save RAM at the cost of slightly more CPU time to look up the shared data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  🦇 The Utility Belt: The Mixin Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How can we add reusable functionality to a class without using inheritance?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; Think of Batman's utility belt. You can give any character—Batman, Robin, a random police officer—the "grappling hook" ability by just giving them that piece of equipment. You don't need to make the police officer inherit from &lt;code&gt;Class Batman&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; An object containing methods that you can "mix in" by copying them onto another class's prototype.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  When you want to share a specific capability (like &lt;code&gt;toJSON()&lt;/code&gt; or &lt;code&gt;log()&lt;/code&gt;) across many unrelated classes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Watch Out:&lt;/strong&gt; Can be dangerous. Modifying prototypes directly can lead to "prototype pollution" and make it very unclear where a method is coming from. Modern JavaScript often prefers composition (like React Hooks) over mixins.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Part 3: Behavioral Patterns (The Art of Communication)
&lt;/h2&gt;

&lt;p&gt;Behavioral patterns are about how objects communicate and delegate responsibility.&lt;/p&gt;
&lt;h3&gt;
  
  
  📢 The Town Crier: The Observer Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How do we let multiple objects react to an event without coupling them to the object that &lt;em&gt;caused&lt;/em&gt; the event?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; A town crier (the Observable) rings a bell and shouts, "The ship has arrived!" He doesn't know or care who is listening. The baker, the merchant, and the candlestick maker (the Observers) all hear the news and react in their own way.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; An object (Observable) maintains a list of dependents (Observers) and notifies them automatically of any state changes.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  The foundation of event-driven programming.&lt;/li&gt;
&lt;li&gt;  Building UIs (a button click notifies anyone who's listening).&lt;/li&gt;
&lt;li&gt;  Reactive programming libraries like RxJS.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  ✈️ The Air Traffic Controller: The Mediator Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How can we simplify communication in a system with many interconnected components?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; In a busy airport, pilots don't talk to each other to coordinate landings. That would be chaos. They all talk to the air traffic controller (the Mediator), who manages the flow of communication.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; A central object that handles all communication between a set of related components, preventing them from having to know about each other.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Complex UI forms where changes in one input affect several others.&lt;/li&gt;
&lt;li&gt;  The &lt;strong&gt;Middleware&lt;/strong&gt; pattern in web servers (like Express.js) is a linear version of this.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  ✅ The To-Do List: The Command Pattern
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Core Question:&lt;/strong&gt; How can we turn a request or an action into a standalone object?&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The "Aha!" Analogy:&lt;/strong&gt; Instead of just &lt;em&gt;doing&lt;/em&gt; a task, you write it down on a to-do list sticky note. Now that the task is an &lt;em&gt;object&lt;/em&gt; (the sticky note), you can pass it around, put it in a queue, log it, or even add an "undo" instruction to the back of it.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;When to Use It:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Implementing undo/redo functionality.&lt;/li&gt;
&lt;li&gt;  Building task queues that need to be executed later.&lt;/li&gt;
&lt;li&gt;  Decoupling the object that invokes an operation from the one that knows how to perform it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The Architect's Mindset
&lt;/h2&gt;

&lt;p&gt;These patterns aren't rules. They are ideas. They are solutions waiting for you to find the right problem.&lt;/p&gt;

&lt;p&gt;Don't rush to implement a Singleton just because you can. Don't build a Factory when a simple object will do. The goal is not to use as many patterns as possible. The goal is to look at the tangled mess of your code and, with a calm clarity, recognize the shape of the problem.&lt;/p&gt;

&lt;p&gt;"Ah," you'll say. "This isn't chaos. This is just a communication problem that needs an Air Traffic Controller."&lt;/p&gt;

&lt;p&gt;And suddenly, you're not just a coder anymore. You're an architect. Now go build something amazing.&lt;br&gt;
  &lt;iframe src="https://www.youtube.com/embed/Ai-XguDEUag"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>From Zero to NPM: Building the React Component of My Dreams</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Wed, 16 Jul 2025 22:27:56 +0000</pubDate>
      <link>https://forem.com/alishirani/from-zero-to-npm-building-the-react-component-of-my-dreams-59ma</link>
      <guid>https://forem.com/alishirani/from-zero-to-npm-building-the-react-component-of-my-dreams-59ma</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/rPptiVegj5Q"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
Let's be real. We've all been there. You find a seemingly perfect component on NPM for that one specific feature you need—a date picker, a modal, a swipe button. You install it, you import it, and then the nightmare begins.&lt;/p&gt;

&lt;p&gt;You try to change a color, and you have to fight through five layers of CSS specificity. You want to move the icon just a &lt;em&gt;little&lt;/em&gt; to the left, but there's no prop for that. You end up writing hacky CSS, adding &lt;code&gt;!important&lt;/code&gt; everywhere, and silently cursing the developer who sealed their component in a black box.&lt;/p&gt;

&lt;p&gt;I hit this wall one too many times with swipe buttons. I wanted something that was both beautiful out of the box and completely, utterly customizable. So I decided to build my own.&lt;/p&gt;

&lt;p&gt;This is the story of how I built a zero-dependency, fully-themed, and ridiculously flexible swipe button, and how you can build and publish your own professional components, too.&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%2Fgflqsh7k24xsirlcv1qc.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%2Fgflqsh7k24xsirlcv1qc.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The Problem: The Monolithic Component
&lt;/h2&gt;

&lt;p&gt;My first instinct, like many developers, was to build a single, monolithic component. It looked something like this in theory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The "Black Box" approach&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;
  &lt;span class="na"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;railText&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Swipe Me"&lt;/span&gt;
  &lt;span class="na"&gt;overlayText&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Success!"&lt;/span&gt;
  &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;MyIcon&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;railStyle&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{...}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;sliderStyle&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{...}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;overlayStyle&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{...}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;// ...and a dozen more props&lt;/span&gt;
&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This seems convenient at first, but it's a trap. What if a user wants to add a subtle glow &lt;em&gt;inside&lt;/em&gt; the rail but &lt;em&gt;behind&lt;/em&gt; the text? What if they want to use Tailwind CSS classes instead of style objects? Every new requirement adds another prop, and the component's internal logic becomes a tangled mess.&lt;/p&gt;

&lt;p&gt;This approach offers poor Developer Experience (DX). It's rigid. It's not composable. It's not the "React way."&lt;/p&gt;

&lt;h2&gt;
  
  
  The "Aha!" Moment: The Compound Component Pattern
&lt;/h2&gt;

&lt;p&gt;The solution came from looking at how great APIs are built, both on the web and in other libraries. Think about the standard HTML &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;select&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;First&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Second&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don't configure options via a giant &lt;code&gt;options&lt;/code&gt; prop on the select element. You &lt;em&gt;compose&lt;/em&gt; the UI by placing &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; elements inside. This is the &lt;strong&gt;Compound Component Pattern&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Libraries like Radix UI and Vaul have mastered this. The core idea is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; A parent &lt;strong&gt;&lt;code&gt;&amp;lt;Root&amp;gt;&lt;/code&gt;&lt;/strong&gt; component manages all the state and logic.&lt;/li&gt;
&lt;li&gt; It uses &lt;strong&gt;React Context&lt;/strong&gt; to pass down that state and logic to its children.&lt;/li&gt;
&lt;li&gt; Child components (&lt;strong&gt;&lt;code&gt;&amp;lt;Slider&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;Rail&amp;gt;&lt;/code&gt;, etc.&lt;/strong&gt;) consume the context and render the UI, giving the developer full control over each part's placement and styling.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This was the path forward.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the Component
&lt;/h2&gt;

&lt;p&gt;Armed with this new pattern, I refactored the entire component.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. The Context
&lt;/h4&gt;

&lt;p&gt;First, I defined a React Context to be the "brain" of the operation. It holds all the shared state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;SwipeContextType&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;isSwiping&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;sliderPosition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// ... and other necessary state&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SwipeContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createContext&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SwipeContextType&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useSwipeContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... checks for context ... */&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. The &lt;code&gt;&amp;lt;Root&amp;gt;&lt;/code&gt; Component
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;SwipeButton.Root&amp;gt;&lt;/code&gt; component contains all the &lt;code&gt;useState&lt;/code&gt;, &lt;code&gt;useRef&lt;/code&gt;, and &lt;code&gt;useEffect&lt;/code&gt; hooks. It handles all the complex drag-and-drop logic. Crucially, it wraps its &lt;code&gt;children&lt;/code&gt; in the &lt;code&gt;SwipeContext.Provider&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It also does something magical: it injects a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tag with a beautiful, complete default theme.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Root&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;forwardRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLDivElement&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SwipeButtonRootProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ... all the state and drag logic ...&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;contextValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... state and functions ... */&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SwipeContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Provider&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;contextValue&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* It injects its own styles! No CSS file needed for the user. */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;defaultStyles&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"swipe-button__root"&lt;/span&gt; &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SwipeContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Provider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. The Child Components
&lt;/h4&gt;

&lt;p&gt;With the &lt;code&gt;Root&lt;/code&gt; doing all the heavy lifting, the child components became beautifully simple. For example, the &lt;code&gt;&amp;lt;Slider&amp;gt;&lt;/code&gt; component's only job is to get its position from the context and render a &lt;code&gt;div&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Slider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;forwardRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLDivElement&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HTMLAttributes&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLDivElement&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// It consumes the context to get what it needs&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;sliderPosition&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleDragStart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sliderRef&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useSwipeContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;
      &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;sliderRef&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"swipe-button__slider"&lt;/span&gt;
      &lt;span class="c1"&gt;// Applies the position via a smooth CSS transform&lt;/span&gt;
      &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`translateX(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;sliderPosition&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px)`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;onMouseDown&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleDragStart&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;onTouchStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleDragStart&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, I bundled them all into a single export:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SwipeButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Root&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Rail&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Overlay&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Slider&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Payoff: Ultimate Flexibility
&lt;/h2&gt;

&lt;p&gt;This new API is a dream to use. It works perfectly out of the box with zero configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SwipeButton&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@my-scope/react-swipe-button&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ChevronRight&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lucide-react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Root&lt;/span&gt; &lt;span class="na"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Success!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Rail&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Swipe to Unlock&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Rail&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Overlay&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Unlocked!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Overlay&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Slider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ChevronRight&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"black"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Slider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Root&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the real magic is customization. The entire default theme is built on &lt;strong&gt;CSS Variables&lt;/strong&gt;. Want to create a destructive "delete" button? You don't need new props. You just override the variables.&lt;/p&gt;

&lt;p&gt;Just add this to your CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.destructive-swipe-theme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--sw-background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;220&lt;/span&gt; &lt;span class="m"&gt;20%&lt;/span&gt; &lt;span class="m"&gt;15%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* A dark background */&lt;/span&gt;
  &lt;span class="py"&gt;--sw-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;220&lt;/span&gt; &lt;span class="m"&gt;20%&lt;/span&gt; &lt;span class="m"&gt;25%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--sw-slider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt; &lt;span class="m"&gt;95%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* A white slider */&lt;/span&gt;
  &lt;span class="py"&gt;--sw-success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;84.2%&lt;/span&gt; &lt;span class="m"&gt;60.2%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* A dangerous red */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And apply the class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Root&lt;/span&gt; &lt;span class="na"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleDelete&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"destructive-swipe-theme"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* ... child components ... */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SwipeButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Root&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. You get a completely different look without ever touching the component's internal logic. This is true separation of concerns.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Final Step: Publishing to the World
&lt;/h2&gt;

&lt;p&gt;Getting the component onto NPM was the final boss. I configured my &lt;code&gt;package.json&lt;/code&gt; with the necessary fields (&lt;code&gt;main&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt;, &lt;code&gt;types&lt;/code&gt;, &lt;code&gt;files&lt;/code&gt;, etc.), used a great tool called &lt;code&gt;tsup&lt;/code&gt; to bundle my TypeScript into standard JavaScript, and then ran the magic command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm publish --access public&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself!
&lt;/h2&gt;

&lt;p&gt;This journey taught me so much about component architecture, developer experience, and the power of open source. Building something out of personal frustration is one of the most rewarding things you can do as a developer.&lt;/p&gt;

&lt;p&gt;I invite you to check out the final product.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/alishirani1384/swipe-button" rel="noopener noreferrer"&gt;Link to your GitHub Repo&lt;/a&gt; (Stars are appreciated!)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;NPM Package:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/swipe-button" rel="noopener noreferrer"&gt;Link to your NPM page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://swipe-button.vercel.app/" rel="noopener noreferrer"&gt;Link to your deployed showcase&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What component have you always wished was better? Maybe it's time you built it yourself.&lt;/p&gt;

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

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>How To Become A World-Class Software Engineer (In 6 Months).</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Mon, 23 Jun 2025 19:35:56 +0000</pubDate>
      <link>https://forem.com/alishirani/how-to-become-a-world-class-software-engineer-in-6-months-133a</link>
      <guid>https://forem.com/alishirani/how-to-become-a-world-class-software-engineer-in-6-months-133a</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ZpGRyeVepBk"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Hey there, aspiring coding superstar! 🌟 Ever dreamed of transforming from a curious coder into a world-class software engineer—someone who builds robust systems, writes elegant code, and leads with confidence—all in just six months? It might sound like a tall order, but trust me, it’s within reach! This isn’t about quick fixes—it’s about a focused, practical journey blending hands-on projects with 12 powerhouse books. Ready to dive in and level up? Let’s go!&lt;/p&gt;




&lt;h2&gt;
  
  
  Why 6 Months? The Magic of Intentional Growth
&lt;/h2&gt;

&lt;p&gt;Let’s be honest—mastery takes time, but six months is the perfect sprint to kickstart your ascent to world-class status. It’s long enough to dig into the essentials, yet short enough to keep your momentum roaring. Our plan isn’t a shortcut; it’s a strategic blend of reading and doing. The key? Tackling 12 carefully chosen books (2 per month) while building real projects. Think of it like training for a marathon—you build skills step by step, and before you know it, you’re crossing the finish line as a tech titan.&lt;/p&gt;

&lt;p&gt;This approach isn’t just theory; it’s a proven path to stand out in a fast-moving industry. So, grab your laptop, a cup of coffee, and let’s map out your transformation!&lt;/p&gt;




&lt;h2&gt;
  
  
  The Golden Rule: Practice Fuels Theory
&lt;/h2&gt;

&lt;p&gt;Here’s the heart of Our wisdom: &lt;em&gt;reading should complement practice&lt;/em&gt;. Books are your guide, but projects are where you shine. You can’t become a world-class engineer by just reading—you need to code, break things, and fix them. This balance is your superpower.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build projects&lt;/strong&gt;: Start with a simple app (like a task manager) and scale up to something like a distributed system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read 2 books a month&lt;/strong&gt;: Set a rhythm—dedicate weekends to reading, weekdays to applying what you learn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synergy is everything&lt;/strong&gt;: Let each book inspire your next project. That’s how you turn knowledge into skill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine debugging a tricky feature and then opening a book to nail the solution. That’s the magic we’re chasing!&lt;/p&gt;




&lt;h2&gt;
  
  
  The 12 Books That Will Shape Your Future
&lt;/h2&gt;

&lt;p&gt;Now, let’s unveil the 12 books champions—each a treasure trove of wisdom from tech legends. I’ve included images to bring them to life, along with what you’ll gain from each. These aren’t just reads; they’re your mentors. Let’s dive in!&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;em&gt;The Pragmatic Programmer&lt;/em&gt; by Andrew Hunt and David Thomas
&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%2Fa148ymxfvie7sbvriweg.jpg" 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%2Fa148ymxfvie7sbvriweg.jpg" alt="The Pragmatic Programmer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: This classic is like a wise friend guiding you through the art of coding. It’s all about mindset and process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Core software development practices that set you up for success.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;em&gt;Designing Data-Intensive Applications&lt;/em&gt; by Martin Kleppmann
&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%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcRhltqjAIvETaV69iz2m2702bbjRHkkr1r28A%26s" 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%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcRhltqjAIvETaV69iz2m2702bbjRHkkr1r28A%26s" alt="Designing Data-Intensive Applications"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Ready to build systems for millions? This book unravels the secrets of distributed data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: How to design scalable, reliable architectures.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;em&gt;Clean Code&lt;/em&gt; by Robert C. Martin
&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%2Fthkz9kqqksp9o112qll5.jpg" 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%2Fthkz9kqqksp9o112qll5.jpg" alt="Clean Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Say goodbye to spaghetti code! Uncle Bob teaches you to craft readable, maintainable masterpieces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Refactoring techniques and clean coding principles.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. &lt;em&gt;The Mythical Man-Month&lt;/em&gt; by Frederick P. Brooks Jr.
&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%2Fz2bglgc2wkvaop122kb8.jpg" 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%2Fz2bglgc2wkvaop122kb8.jpg" alt="The Mythical Man-Month"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Ever seen a project spiral out of control? This book offers timeless lessons on managing complexity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Strategies for large-scale project success.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. &lt;em&gt;Refactoring&lt;/em&gt; by Martin Fowler
&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%2Fb9yw2yxke05ojjiurwv4.jpg" 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%2Fb9yw2yxke05ojjiurwv4.jpg" alt="Refactoring"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Turn messy code into gold with practical, step-by-step techniques.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: How to improve code structure without breaking it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. &lt;em&gt;Working Effectively with Legacy Code&lt;/em&gt; by Michael Feathers
&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%2Fp9ria0zhbqmy3c7xrh6b.jpg" 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%2Fp9ria0zhbqmy3c7xrh6b.jpg" alt="Working Effectively with Legacy Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Most real-world code is old and messy—learn to tame it like a pro.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Strategies to update and test legacy systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. &lt;em&gt;Software Architecture: The Hard Parts&lt;/em&gt; by Neal Ford, Mark Richards, Pramod Sadalage, and Zhamak Dehghani
&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%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcQtK8f_BZ-YHjbraYLPKELtpjKKRdkqa87hHg%26s" 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%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcQtK8f_BZ-YHjbraYLPKELtpjKKRdkqa87hHg%26s" alt="Software Architecture: The Hard Parts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Navigate the tricky trade-offs of system design with confidence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Better architectural decision-making.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  8. &lt;em&gt;Database Internals&lt;/em&gt; by Alex Petrov
&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%2Fqs9m52vbeo6gf45l1p1l.jpg" 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%2Fqs9m52vbeo6gf45l1p1l.jpg" alt="Database Internals"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Peek under the hood of databases to master their inner workings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Storage engines and distributed database systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9. &lt;em&gt;Staff Engineer&lt;/em&gt; by Will Larson
&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%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcRgKvPa2h5ytYHwAYi50_66-ORmnn6C22RkO2zYMcw-U_n9YABo2z6nVLYcYVTE8aImM5w%26usqp%3DCAU" 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%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcRgKvPa2h5ytYHwAYi50_66-ORmnn6C22RkO2zYMcw-U_n9YABo2z6nVLYcYVTE8aImM5w%26usqp%3DCAU" alt="Staff Engineer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Grow into a tech leader without leaving the coding trenches.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Leadership skills for senior engineers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  10. &lt;em&gt;Extreme Ownership&lt;/em&gt; by Jocko Willink and Leif Babin
&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%2Fm106nggtvrtadiveffth.jpg" 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%2Fm106nggtvrtadiveffth.jpg" alt="Extreme Ownership"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Borrow leadership principles from the military to own your projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Accountability and team success strategies.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11. &lt;em&gt;The Philosophy of Software Design&lt;/em&gt; by John Ousterhout
&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%2Fetlroi990iyb8o8vja5p.jpg" 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%2Fetlroi990iyb8o8vja5p.jpg" alt="Philosophy of Software Design"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Rethink how you design software for simplicity and scalability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Deep design principles and trade-offs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  12. &lt;em&gt;Why Programs Fail&lt;/em&gt; by Andreas Zeller
&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%2Frmuj6fpsdsrafd7yb4bh.jpg" 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%2Frmuj6fpsdsrafd7yb4bh.jpg" alt="Why Programs Fail"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it’s a game-changer&lt;/strong&gt;: Understand bugs at their core to prevent and fix them like a detective.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you’ll learn&lt;/strong&gt;: Debugging and error prevention techniques.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Your 6-Month Action Plan
&lt;/h2&gt;

&lt;p&gt;Let’s make this real with a month-by-month guide to keep you on track:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Month 1&lt;/strong&gt;: &lt;em&gt;The Pragmatic Programmer&lt;/em&gt; + &lt;em&gt;Designing Data-Intensive Applications&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;Project: Build a web app with a database backend.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Month 2&lt;/strong&gt;: &lt;em&gt;Clean Code&lt;/em&gt; + &lt;em&gt;The Mythical Man-Month&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;Project: Refactor an old project and document your process.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Month 3&lt;/strong&gt;: &lt;em&gt;Refactoring&lt;/em&gt; + &lt;em&gt;Working Effectively with Legacy Code&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;Project: Update a legacy codebase with tests.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Month 4&lt;/strong&gt;: &lt;em&gt;Software Architecture: The Hard Parts&lt;/em&gt; + &lt;em&gt;Database Internals&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;Project: Design a small distributed system.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Month 5&lt;/strong&gt;: &lt;em&gt;Staff Engineer&lt;/em&gt; + &lt;em&gt;Extreme Ownership&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;Project: Lead a mini-project or mentor someone.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Month 6&lt;/strong&gt;: &lt;em&gt;The Philosophy of Software Design&lt;/em&gt; + &lt;em&gt;Why Programs Fail&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;Project: Build a bug-free, well-designed app.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Aim for 5-10 hours a week per book, with equal time for coding. Join a community (like X or GitHub) to share your progress—accountability is your ally!&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Journey Is Worth It—and How to Start Today
&lt;/h2&gt;

&lt;p&gt;This isn’t just about landing a fancy job. It’s about creating technology that solves real problems, growing into a leader, and leaving a legacy in the tech world. These six months could be the pivot point of your career. The industry waits for no one, but with this plan, you’ll outpace the curve.&lt;/p&gt;

&lt;p&gt;So, what’s your first move? Grab &lt;em&gt;The Pragmatic Programmer&lt;/em&gt;, fire up your IDE, and start a project. Share your journey with me—I’m rooting for you! Ready to become world-class? Let’s do this! 🚀&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I Built Git in JavaScript… and You Can Too! (Step-by-Step Tutorial)</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Mon, 16 Jun 2025 20:09:27 +0000</pubDate>
      <link>https://forem.com/alishirani/i-built-git-in-javascript-and-you-can-too-step-by-step-tutorial-28k5</link>
      <guid>https://forem.com/alishirani/i-built-git-in-javascript-and-you-can-too-step-by-step-tutorial-28k5</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/sUR4PtOd1iE"&gt;
  &lt;/iframe&gt;
  &lt;/p&gt;

&lt;p&gt;You type &lt;code&gt;git commit&lt;/code&gt; a dozen times a day—but &lt;strong&gt;what actually happens&lt;/strong&gt; when you hit Enter?  &lt;/p&gt;

&lt;p&gt;What if I told you that &lt;strong&gt;you could domesticate version control forever&lt;/strong&gt;—by building your own modern Git clone from scratch?  &lt;/p&gt;

&lt;p&gt;Meet &lt;strong&gt;GITTY&lt;/strong&gt;—a simplified, beautiful Git clone we’re going to build together using &lt;strong&gt;Node.js&lt;/strong&gt;. By the end of this journey, you won’t just &lt;em&gt;use&lt;/em&gt; Git—you’ll &lt;strong&gt;finally understand how it works&lt;/strong&gt; under the hood.  &lt;/p&gt;

&lt;p&gt;Oh, and bonus? You’ll have an &lt;strong&gt;incredible project&lt;/strong&gt; for your portfolio.  &lt;/p&gt;

&lt;p&gt;Let’s dive in.  &lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;🛠️ Setting Up Our Project&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;First things first—let’s initialize our Node.js project:&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="nb"&gt;mkdir &lt;/span&gt;gitty &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;gitty  
npm init &lt;span class="nt"&gt;-y&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;key detail&lt;/strong&gt; here? Setting &lt;code&gt;"type": "module"&lt;/code&gt; in &lt;code&gt;package.json&lt;/code&gt; so we can use modern ES6 imports.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Installing Dependencies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We’ll need a few tools to make our CLI sleek and interactive:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Commander&lt;/strong&gt; – For a professional command structure.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inquirer&lt;/strong&gt; – For beautiful interactive prompts.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chalk &amp;amp; Figlet&lt;/strong&gt; – For some CLI flair.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;commander inquirer chalk figlet  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Project Structure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We’ll keep things clean with:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gitty.js&lt;/code&gt; (main executable)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;commands/&lt;/code&gt; (for modular logic)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;code&gt;package.json&lt;/code&gt;, we add a &lt;code&gt;"bin"&lt;/code&gt; field to make &lt;code&gt;gitty.js&lt;/code&gt; executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"bin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"gy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./gitty.js"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s scaffold our CLI in &lt;code&gt;gitty.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;program&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;commander&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;figlet&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;figlet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;chalk&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chalk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;figlet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;textSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GITTY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;

&lt;span class="nx"&gt;program&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;version&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.0.0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;description&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;A beautiful Git clone built with Node.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;init&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Initialize a new GITTY repository&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;add&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Stage files for commit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;commit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Create a new commit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;program&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this skeleton in place, we’re ready to build our &lt;strong&gt;first command&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🔨 Building &lt;code&gt;gitty init&lt;/code&gt; – The Brain of Our System&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The goal? Create a &lt;code&gt;.gitty&lt;/code&gt; directory—our &lt;strong&gt;version control database&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Inside &lt;code&gt;commands/init.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;chalk&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chalk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;init&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.gitty&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;red&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GITTY repository already exists!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// Create essential directories&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mkdirSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.gitty&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mkdirSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.gitty/objects&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Stores blobs, trees, commits&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mkdirSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.gitty/refs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;    &lt;span class="c1"&gt;// Stores branch pointers&lt;/span&gt;

  &lt;span class="c1"&gt;// Initialize HEAD (points to current branch)&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.gitty/HEAD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ref: refs/heads/main&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;green&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GITTY repository initialized!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;init&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What’s happening?&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.gitty/objects&lt;/code&gt; – Stores all file data (blobs) and commits.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.gitty/refs&lt;/code&gt; – Holds branch references (like &lt;code&gt;main&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.gitty/HEAD&lt;/code&gt; – Tracks the &lt;strong&gt;currently checked-out&lt;/strong&gt; branch.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, running &lt;code&gt;gitty init&lt;/code&gt; sets up our &lt;strong&gt;version control brain&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;📦 Implementing &lt;code&gt;gitty add&lt;/code&gt; – Staging Files Like a Pro&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Git doesn’t store duplicate files—it uses &lt;strong&gt;content-addressable storage&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;When you &lt;code&gt;add&lt;/code&gt; a file:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Its contents are &lt;strong&gt;hashed&lt;/strong&gt; (SHA-1).
&lt;/li&gt;
&lt;li&gt;The hash becomes the &lt;strong&gt;filename&lt;/strong&gt; inside &lt;code&gt;.gitty/objects&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;The mapping (filename → hash) is stored in the &lt;strong&gt;index&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here’s how we do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;chalk&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chalk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gyDir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.gitty&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;indexFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gyDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;indexFile&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;indexFile&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createHash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Save blob to objects&lt;/span&gt;
    &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gittyDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;objects&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Update index&lt;/span&gt;
    &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;indexFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;green&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Files staged!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, &lt;code&gt;gitty add file.txt&lt;/code&gt; &lt;strong&gt;stores the file forever&lt;/strong&gt; in &lt;code&gt;.gitty/objects&lt;/code&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;💾 The Magic of &lt;code&gt;gitty commit&lt;/code&gt; – Snapshotting History&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A commit is a &lt;strong&gt;permanent snapshot&lt;/strong&gt; with:&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Author&lt;/strong&gt; &amp;amp; &lt;strong&gt;timestamp&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Commit message&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Tree hash&lt;/strong&gt; (directory state)&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Parent hash&lt;/strong&gt; (previous commit)  &lt;/p&gt;

&lt;p&gt;Here’s how we build it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;inquirer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;inquirer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;chalk&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chalk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;commit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;inquirer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;message&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Enter commit message:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gittyDir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.gitty&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;indexFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gittyDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// 1. Build the tree object (represents directory structure)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;indexFile&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tree&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;treeHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createHash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tree&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gittyDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;objects&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;treeHash&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tree&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

  &lt;span class="c1"&gt;// 2. Find parent commit (if exists)&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;parentHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;headRef&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gittyDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;HEAD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;branchFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gittyDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;headRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;branchFile&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;parentHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;branchFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// 3. Create commit object&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;commit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;tree&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;treeHash&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;parentHash&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Your Name &amp;lt;you@example.com&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;commitHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createHash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gittyDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;objects&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;commitHash&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

  &lt;span class="c1"&gt;// 4. Update branch pointer&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;branchFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;commitHash&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;green&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Commit &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;commitHash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt; created!`&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, &lt;code&gt;gitty commit&lt;/code&gt; &lt;strong&gt;captures history forever&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🎉 The Grand Finale&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let’s test it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;link&lt;/span&gt;       &lt;span class="c"&gt;# Make `gitty` globally available&lt;/span&gt;
gitty init        &lt;span class="c"&gt;# Initialize repo&lt;/span&gt;
gitty add file.txt &lt;span class="c"&gt;# Stage a file&lt;/span&gt;
gitty commit      &lt;span class="c"&gt;# Create a commit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Boom!&lt;/strong&gt; You’ve just built a &lt;strong&gt;functional Git clone&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🔍 Key Takeaways&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;✔ &lt;strong&gt;Blobs&lt;/strong&gt; – Hashed file contents.&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;Trees&lt;/strong&gt; – Snapshots of directories.&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;Commits&lt;/strong&gt; – Immutable history points.&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;Branches&lt;/strong&gt; – Just pointers to commits.  &lt;/p&gt;

&lt;p&gt;Now, you &lt;strong&gt;understand Git deeply&lt;/strong&gt;—not just use it.  &lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;🚀 What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Want to extend Gitty? Try:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Branching&lt;/strong&gt; (&lt;code&gt;gitty branch&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checking out commits&lt;/strong&gt; (&lt;code&gt;gitty checkout&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remote repositories&lt;/strong&gt; (&lt;code&gt;gitty remote&lt;/code&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What feature should we add next?&lt;/strong&gt; Drop a comment below!  &lt;/p&gt;

&lt;p&gt;If you enjoyed this deep dive, smash that &lt;strong&gt;like button&lt;/strong&gt;, &lt;strong&gt;subscribe&lt;/strong&gt;, and &lt;strong&gt;share&lt;/strong&gt; with fellow devs.  &lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/sUR4PtOd1iE"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>ai</category>
    </item>
    <item>
      <title>How I Made GitHub Issues Hilarious! Build Your Own Github Bot.</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Wed, 11 Jun 2025 18:38:33 +0000</pubDate>
      <link>https://forem.com/alishirani/how-i-made-github-issues-hilarious-build-your-own-github-bot-4fj</link>
      <guid>https://forem.com/alishirani/how-i-made-github-issues-hilarious-build-your-own-github-bot-4fj</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/GJ3KNZ5VSck"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Okay, this is going to be FUN! Building a bot that slings GIFs into GitHub issues? Sign me up! Let's transform this awesome tutorial into a blog post that'll have developers everywhere scrambling to build their own GIF-slinging sidekick.&lt;/p&gt;

&lt;p&gt;Here we go!&lt;/p&gt;




&lt;h2&gt;
  
  
  Level Up Your GitHub Game: Build an Automated GIF Bot (From Scratch!) ✨🤖
&lt;/h2&gt;

&lt;p&gt;Ever been in a GitHub issue, deep in a technical discussion, and thought, "You know what this conversation &lt;em&gt;really&lt;/em&gt; needs? A perfectly timed GIF!" Of course, you have. We all have. Manually searching and pasting GIFs is so 2023. What if you could summon the perfect GIF with a simple command, right there in the issue?&lt;/p&gt;

&lt;p&gt;Well, buckle up, buttercup, because that's &lt;strong&gt;exactly&lt;/strong&gt; what we're building today! We're diving headfirst into creating a fully functional GitHub GIF Bot from scratch, leveraging the latest and greatest official GitHub libraries. By the end of this guide, you'll have your very own bot, ready to inject a healthy dose of fun and expression into any repository.&lt;/p&gt;

&lt;p&gt;Ready to become a GitHub legend? Let's get into it!&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 1: Birth Your Bot - Registering as a GitHub App 👶
&lt;/h3&gt;

&lt;p&gt;First things first, our bot needs an identity on GitHub. Think of it like getting its official GitHub passport.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Navigate to GitHub Apps:&lt;/strong&gt; Head to your GitHub &lt;code&gt;Settings&lt;/code&gt; &amp;gt; &lt;code&gt;Developer settings&lt;/code&gt; &amp;gt; &lt;code&gt;GitHub Apps&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;New GitHub App:&lt;/strong&gt; Click that shiny "New GitHub App" button.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Name Your Creation:&lt;/strong&gt; Give your bot a cool, memorable name. I'm calling mine "GiphyBot Deluxe," but you do you!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Homepage URL:&lt;/strong&gt; This can be anything for now – even your GitHub profile URL works.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The All-Important Webhook URL (with a Smee.io Detour!):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  This is CRITICAL. For local development, we need a public URL that tunnels requests to our local machine.&lt;/li&gt;
&lt;li&gt;  Open a new tab and go to &lt;a href="https://smee.io" rel="noopener noreferrer"&gt;smee.io&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Click "Start a new channel."&lt;/li&gt;
&lt;li&gt;  Copy the "Webhook Proxy URL" it gives you. It'll look something like &lt;code&gt;https://smee.io/YourUniqueChannel&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   Paste this Smee.io URL back into the "Webhook URL" field on GitHub.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Webhook Secret:&lt;/strong&gt; This is like a password for your webhooks, ensuring they're legit.

&lt;ul&gt;
&lt;li&gt;  Generate a strong, random string (use a password manager or online generator).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;SAVE THIS SECRET!&lt;/strong&gt; Put it in a secure note-taking app or password manager. We'll need it soon.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Permissions - The Need-to-Know Basis:&lt;/strong&gt; For security, our bot only needs two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Scroll to "Repository permissions."&lt;/li&gt;
&lt;li&gt;  Find &lt;strong&gt;Issues&lt;/strong&gt; and set it to &lt;strong&gt;Read &amp;amp; write&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  Just below that, find &lt;strong&gt;Pull requests&lt;/strong&gt; and also set it to &lt;strong&gt;Read &amp;amp; write&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Subscribe to Events:&lt;/strong&gt; We need to tell GitHub what our bot cares about.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Under "Subscribe to events," check the box for &lt;strong&gt;Issue comment&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create GitHub App:&lt;/strong&gt; Leave everything else as default and hit that glorious "Create GitHub App" button.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Phew! On the next page, take note of the &lt;strong&gt;App ID&lt;/strong&gt; (you'll need it). Scroll down and click &lt;strong&gt;"Generate a private key."&lt;/strong&gt; This will download a &lt;code&gt;.pem&lt;/code&gt; file.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;🚨 SECURITY ALERT! 🚨&lt;/strong&gt;&lt;br&gt;
Treat this &lt;code&gt;.pem&lt;/code&gt; file like the master key to your kingdom. &lt;strong&gt;NEVER, EVER&lt;/strong&gt; commit it to your repository. Keep it secret, keep it safe!&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Step 2: Unleash the GIFs - Getting Your Giphy API Key 🔑
&lt;/h3&gt;

&lt;p&gt;Our bot needs to talk to the GIF gods at Giphy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Head over to &lt;a href="https://developers.giphy.com/" rel="noopener noreferrer"&gt;developers.giphy.com&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt; Create an account or log in.&lt;/li&gt;
&lt;li&gt; Click on "Create an App."&lt;/li&gt;
&lt;li&gt; Choose the "API" option (not SDK).&lt;/li&gt;
&lt;li&gt; Give your Giphy app a name and description.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;BAM! You'll get an API Key. Copy it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add this Giphy API Key to your collection of secrets (with your App ID, Webhook Secret, and the path to your &lt;code&gt;.pem&lt;/code&gt; file).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Step 3: Setting Up Shop - Project &amp;amp; Dependencies 💻
&lt;/h3&gt;

&lt;p&gt;Alright, with our keys and secrets gathered, it's time to write some code!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create Your Project:&lt;/strong&gt; Open your favorite code editor and terminal. Make a new project directory:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;github-gif-bot
&lt;span class="nb"&gt;cd &lt;/span&gt;github-gif-bot
npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install the Magic (Packages):&lt;/strong&gt; We're using ESM syntax, so we need a few specific packages.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;express octokit @octokit/webhooks dotenv axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   `express`: For our web server.
*   `octokit`: The official GitHub client library.
*   `@octokit/webhooks`: To handle incoming GitHub webhooks.
*   `dotenv`: To manage our secrets from an environment file.
*   `axios`: To make HTTP requests to the Giphy API.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Create Your Files:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;index.js&lt;/code&gt;: This will be our main bot code.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;.env&lt;/code&gt;: This is where our precious secrets will live, safely outside our code.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;.gitignore&lt;/code&gt;: Add &lt;code&gt;.env&lt;/code&gt; and &lt;code&gt;node_modules/&lt;/code&gt; to this file!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Populate &lt;code&gt;.env&lt;/code&gt;:&lt;/strong&gt; Open your &lt;code&gt;.env&lt;/code&gt; file and add your secrets like this:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_ID=your_app_id_here
WEBHOOK_SECRET=your_webhook_secret_here
PRIVATE_KEY_PATH=./your_downloaded_private_key.pem  # Or the full path
GIPHY_API_KEY=your_giphy_api_key_here
PORT=3000 # Or any port you prefer
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;(Make sure your &lt;code&gt;.pem&lt;/code&gt; file is in the location you specify, or update the path).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Step 4: The Brains of the Operation - Code Breakdown 🧠
&lt;/h3&gt;

&lt;p&gt;Open up &lt;code&gt;index.js&lt;/code&gt;. Let's walk through the code that brings our bot to life.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// index.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;octokit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createNodeMiddleware&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@octokit/webhooks&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;dotenv&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dotenv&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// To read the private key&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// For Giphy API calls&lt;/span&gt;

&lt;span class="c1"&gt;// Load environment variables&lt;/span&gt;
&lt;span class="nx"&gt;dotenv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Read the private key&lt;/span&gt;
&lt;span class="c1"&gt;// Ensure your .env file has PRIVATE_KEY_PATH pointing to your .pem file&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;privateKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PRIVATE_KEY_PATH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Initialize our GitHub App instance&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;githubApp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;App&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;APP_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;webhooks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WEBHOOK_SECRET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// The heart of our bot: Listening for issue comments&lt;/span&gt;
&lt;span class="nx"&gt;githubApp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webhooks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;issue_comment.created&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;octokit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Received an issue_comment.created event&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;commentBody&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;commenter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;botUsername&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;octokit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;apps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAuthenticated&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[bot]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Gets the bot's username like "app-name[bot]"&lt;/span&gt;

  &lt;span class="c1"&gt;// 1. Check if the comment starts with /gif&lt;/span&gt;
  &lt;span class="c1"&gt;// 2. Check if the comment is NOT from the bot itself (to avoid infinite loops!)&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;commentBody&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/gif&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;commenter&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nx"&gt;botUsername&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`GIF command detected from &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;commenter&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;commentBody&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;searchQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;commentBody&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;substring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Get text after "/gif "&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Fetch GIF from Giphy&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;giphyResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://api.giphy.com/v1/gifs/search&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;api_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;GIPHY_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;q&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Get the top GIF&lt;/span&gt;
            &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="c1"&gt;// Get a bit of randomness&lt;/span&gt;
            &lt;span class="na"&gt;rating&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;g&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Keep it SFW&lt;/span&gt;
            &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;

        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;giphyResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;giphyResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gifUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;giphyResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;images&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;replyComment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Here's a GIF for "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;":\n\n![&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;](&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;gifUrl&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Replying with: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;replyComment&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

          &lt;span class="c1"&gt;// Post the GIF as a new comment&lt;/span&gt;
          &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;octokit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createComment&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;issue_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;replyComment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;});&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GIF comment posted successfully!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`No GIF found for "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;octokit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createComment&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;issue_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Sorry, I couldn't find a GIF for "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;". 😕`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error fetching from Giphy or posting to GitHub:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
         &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;octokit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createComment&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;issue_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Oops, something went wrong while I was fetching your GIF. Please try again!`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Empty search query after /gif&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
       &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;octokit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createComment&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;issue_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`You need to tell me what GIF to search for! Usage: &lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;/gif &amp;lt;search term&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Standard Express server setup&lt;/span&gt;
&lt;span class="c1"&gt;// Use the Octokit webhook middleware&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;createNodeMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;githubApp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webhooks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/github/webhooks&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Server listening for webhooks at http://localhost:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/api/github/webhooks`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Parts Explained:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Imports &amp;amp; Setup:&lt;/strong&gt; We grab &lt;code&gt;express&lt;/code&gt;, &lt;code&gt;App&lt;/code&gt; from &lt;code&gt;octokit&lt;/code&gt;, &lt;code&gt;createNodeMiddleware&lt;/code&gt;, &lt;code&gt;dotenv&lt;/code&gt;, &lt;code&gt;fs&lt;/code&gt; (for reading the private key file), and &lt;code&gt;axios&lt;/code&gt;. We initialize Express and load our &lt;code&gt;.env&lt;/code&gt; variables.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;GitHub App Initialization:&lt;/strong&gt; We create an instance of our &lt;code&gt;App&lt;/code&gt;, passing in the &lt;code&gt;appId&lt;/code&gt;, &lt;code&gt;privateKey&lt;/code&gt; (read from the file), and &lt;code&gt;webhookSecret&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;githubApp.webhooks.on('issue_comment.created', ...)&lt;/code&gt;:&lt;/strong&gt; This is the core listener.

&lt;ul&gt;
&lt;li&gt;  It triggers whenever a new issue comment is created on a repository where our app is installed.&lt;/li&gt;
&lt;li&gt;  It gives us:

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;octokit&lt;/code&gt;: A pre-authenticated Octokit client instance. This is how our bot performs actions (like posting comments) AS ITSELF. Magic!&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;payload&lt;/code&gt;: All the data about the event (who commented, what they said, where it happened, etc.).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Logic Inside the Listener:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt; We grab the &lt;code&gt;commentBody&lt;/code&gt; and the &lt;code&gt;commenter&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; We also fetch the bot's own username to prevent it from replying to its own GIF posts (crucial for avoiding infinite loops of GIF-ception!).&lt;/li&gt;
&lt;li&gt; We check if the comment &lt;code&gt;startsWith('/gif')&lt;/code&gt; AND if the commenter isn't our bot.&lt;/li&gt;
&lt;li&gt; We extract the &lt;code&gt;searchQuery&lt;/code&gt; (the text after &lt;code&gt;/gif&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt; We use &lt;code&gt;axios&lt;/code&gt; to hit the Giphy API with our search query.&lt;/li&gt;
&lt;li&gt; We construct a &lt;code&gt;replyComment&lt;/code&gt; using Markdown to embed the GIF image.&lt;/li&gt;
&lt;li&gt; Finally, we use &lt;code&gt;octokit.rest.issues.createComment({...})&lt;/code&gt; to post our GIF-laden reply back to the GitHub issue.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Express Server:&lt;/strong&gt; The rest is standard Express setup, telling our app to listen for incoming webhook requests on &lt;code&gt;/api/github/webhooks&lt;/code&gt; (or whatever path you configured in Smee/GitHub).&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  Step 5: Showtime! Running &amp;amp; Testing Your Bot 🚀
&lt;/h3&gt;

&lt;p&gt;The moment of truth! Let's bring our GIF-tastic creation to life.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Start the Smee.io Tunnel (Terminal 1):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Remember that Smee.io URL? We need to tell the Smee client to forward requests from that public URL to our local server.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;First, if you haven't already, install the Smee client globally:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; smee-client
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   Then run the client, replacing `YOUR_SMEE_CHANNEL_URL` with the URL Smee.io gave you, and `/api/github/webhooks` if you used a different path:
&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;    ```bash
    smee --url YOUR_SMEE_CHANNEL_URL --path /api/github/webhooks --port 3000
    ```
&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;    (Ensure the `--port` matches the port your Node.js app is listening on, and `--path` matches the webhook path in your `index.js` and GitHub App settings).
    You should see it connect and say "Forwarding `YOUR_SMEE_CHANNEL_URL`/api/github/webhooks to http://localhost:3000/api/github/webhooks". Perfect!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Start Your Bot Server (Terminal 2):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;In a new terminal window, navigate to your project directory and run:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node index.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   You should see "Server listening for webhooks at http://localhost:3000/api/github/webhooks".
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install Your App on a Repository:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Go back to your GitHub App's settings page on GitHub.&lt;/li&gt;
&lt;li&gt;  Click "Install App" in the left sidebar.&lt;/li&gt;
&lt;li&gt;  Choose a test repository (or create a new one) to install your bot on. Grant access.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test Drive!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Go to the repository where you just installed the app.&lt;/li&gt;
&lt;li&gt;  Create a new issue, or open an existing one.&lt;/li&gt;
&lt;li&gt;  In a comment, type: &lt;code&gt;/gif happy cat&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  Hit "Comment."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If all goes well...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You'll see activity in your Smee client terminal (a webhook being received).&lt;/li&gt;
&lt;li&gt;  You'll see logs in your &lt;code&gt;node index.js&lt;/code&gt; terminal (event received, talking to Giphy, posting back).&lt;/li&gt;
&lt;li&gt;  And then... &lt;strong&gt;BOOM!&lt;/strong&gt; Your bot should post a comment with a happy cat GIF!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🎉 You Did It! Your GitHub Is Now More Awesome! 🎉
&lt;/h3&gt;

&lt;p&gt;How cool is that? You've just built a fully automated GitHub bot that brings joy, laughter, and a whole lotta GIFs to the often-serious world of software development.&lt;/p&gt;

&lt;p&gt;This is just the beginning. You can expand this bot to do all sorts of cool things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Add more commands.&lt;/li&gt;
&lt;li&gt;  Integrate with other APIs.&lt;/li&gt;
&lt;li&gt;  Help automate repository tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for building along, and happy coding! See you in the next one!&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/GJ3KNZ5VSck"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>10 Design Patterns Every Developer Should Know</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Wed, 28 May 2025 13:52:06 +0000</pubDate>
      <link>https://forem.com/alishirani/10-design-patterns-every-developer-should-know-3a83</link>
      <guid>https://forem.com/alishirani/10-design-patterns-every-developer-should-know-3a83</guid>
      <description>&lt;p&gt;Okay, this is going to be FUN! We're diving into the secret sauce that transforms code from a tangled mess into a work of art (or at least, something your colleagues won't curse you for). Get ready to level up your developer game!&lt;/p&gt;

&lt;h2&gt;
  
  
  From Play-Doh Snakes to Architectural Marvels: 10 Design Patterns You NEED to Know!
&lt;/h2&gt;

&lt;p&gt;Ever feel like your early code resembled those colorful, slightly lumpy Play-Doh snakes we all proudly made as kids? You're not alone! We've all been there. Then, as you journey towards becoming a seasoned developer, you start hearing whispers of "design patterns." Suddenly, your code begins to take on the elegance and structure of the Sistine Chapel.&lt;/p&gt;

&lt;p&gt;But here's a little secret from the trenches: sometimes, when you reach that principal engineer peak, you realize maintaining a digital Sistine Chapel for every simple website is... overkill. And you find a new appreciation for the elegant simplicity of well-crafted Play-Doh snakes.&lt;/p&gt;

&lt;p&gt;The truth lies somewhere in between. Today, we're unlocking &lt;strong&gt;10 essential software design patterns&lt;/strong&gt; – powerful, battle-tested solutions to common problems you'll face every single day. We'll explore their pros, their cons (yes, they have them!), and when to whip them out of your coding toolkit.&lt;/p&gt;

&lt;p&gt;This isn't just about memorizing syntax; it's about understanding &lt;em&gt;how&lt;/em&gt; to solve problems effectively. Think of these patterns not as rigid rules, but as blueprints from the legendary "Gang of Four" (the authors of the seminal "Design Patterns" book) and beyond, categorized into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Creational Patterns:&lt;/strong&gt; How objects get made.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Structural Patterns:&lt;/strong&gt; How objects connect and relate.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Behavioral Patterns:&lt;/strong&gt; How objects talk to each other.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Word of Caution:&lt;/strong&gt; These patterns are like power tools. In the right hands, they build masterpieces. Used carelessly, they can add unnecessary complexity. The goal isn't to sprinkle them everywhere, but to recognize when they genuinely simplify and strengthen your code.&lt;/p&gt;

&lt;p&gt;Alright, let's roll up our sleeves and get to it!&lt;/p&gt;




&lt;h3&gt;
  
  
  1. The Singleton Pattern: The "One Ring to Rule Them All"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; Ensures a class has only &lt;em&gt;one&lt;/em&gt; instance and provides a global point of access to it. Think of it like the main settings object for your app – you only need one!&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;How it Works (Conceptually):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  The constructor is made private, so you can't just &lt;code&gt;new&lt;/code&gt; it up willy-nilly.&lt;/li&gt;
&lt;li&gt;  A static method (&lt;code&gt;getInstance()&lt;/code&gt;) checks if an instance already exists. If yes, it returns it. If not, it creates one, stores it, and then returns it.
&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%2Fpw65a5bdbs0w4efzch8k.png" alt="Image description" width="800" height="533"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;The Catch in JavaScript:&lt;/strong&gt; JavaScript's object literals and module system often give you Singleton-like behavior out of the box. A simple global object or a module exporting an object can achieve the same thing with less boilerplate.
&amp;gt; &lt;strong&gt;Key Takeaway:&lt;/strong&gt; "Lean on your language's built-in features before implementing a fancy design pattern." – Wise words from the video!&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. The Prototype Pattern: The "Clone Machine"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; Creates new objects by copying an existing object (the prototype), rather than instantiating a new one from a class in the traditional sense. It's like cloning sheep!&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Why Bother?&lt;/strong&gt; It can be an alternative to complex class inheritance hierarchies, especially in dynamic languages. You create a base object, and then new objects "inherit" from it by being cloned and then customized.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;In JavaScript:&lt;/strong&gt; JavaScript has prototypal inheritance built-in! &lt;code&gt;Object.create()&lt;/code&gt; is your friend here. You pass it the object you want to clone (the prototype), and it gives you a new object linked to the original.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Super simplified concept&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;zombiePrototype&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;eatBrains&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Yummy brains!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;steveTheZombie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;zombiePrototype&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;steveTheZombie&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Steve&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;steveTheZombie&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;eatBrains&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Works!&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;steveTheZombie&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Steve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&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%2Fvzo8yk4emcohk7yr8413.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%2Fvzo8yk4emcohk7yr8413.png" alt="Image description" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interesting Tidbit:&lt;/strong&gt; When you access a property on a JavaScript object, if it's not found, JavaScript walks up the "prototype chain" looking for it on its parent objects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. The Builder Pattern: The "Custom Sandwich Order"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; Separates the construction of a complex object from its representation, allowing you to create different variations of an object step-by-step. Think of ordering a custom Subway sandwich – you pick the bread, then the meat, then the veggies, one step at a time.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Problem Solved:&lt;/strong&gt; Avoids constructors with a million parameters (telescoping constructors) and makes object creation more readable and flexible.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How it Looks:&lt;/strong&gt; Often uses method chaining. Each method sets a part of the object and returns &lt;code&gt;this&lt;/code&gt; (the instance itself), so you can chain the next call.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual hotdog stand&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HotDog&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toppings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;addKetchup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toppings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ketchup&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;addMustard&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toppings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mustard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;addRelish&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toppings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;relish&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;serve&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Serving hotdog with: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toppings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;, &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;HotDog&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;addKetchup&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;addMustard&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;serve&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&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%2Flo3kq8eo8sc1fpr0k8dp.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%2Flo3kq8eo8sc1fpr0k8dp.png" alt="Image description" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Relevance:&lt;/strong&gt; You've seen this in libraries like jQuery. While still useful, it's sometimes seen as a bit "last season" in modern JS, but the core idea of constructing objects step-by-step is timeless.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. The Factory Pattern: The "Component Vending Machine"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist:&lt;/strong&gt; Instead of directly using the &lt;code&gt;new&lt;/code&gt; keyword to create objects, you call a dedicated function or method (the "factory") to do it for you.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Why?&lt;/strong&gt; It decouples your code from concrete classes. The factory can decide &lt;em&gt;which&lt;/em&gt; specific type of object to create based on some logic (e.g., environment, user input).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Practical Example:&lt;/strong&gt; Imagine a cross-platform app. You need a button. Instead of &lt;code&gt;if (isIOS) new IOSButton() else new AndroidButton()&lt;/code&gt;, you have a &lt;code&gt;ButtonFactory.createButton()&lt;/code&gt; that handles that logic internally.
&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%2Fpdzj5t3rgjwxkhx8fk80.png" alt="Image description" width="800" height="436"&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Benefit:&lt;/strong&gt; Makes your code more maintainable and easier to extend with new types of objects without changing the client code that uses the factory.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  5. The Facade Pattern: The "Simple Remote Control"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist (Structural):&lt;/strong&gt; Provides a simplified, higher-level interface to a complex subsystem of components. It's like the clean, simple face of a building that hides all the messy plumbing, electrical, and structural shenanigans inside.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Problem Solved:&lt;/strong&gt; Hides complexity. Makes a complex system easier to use by providing a "good enough" interface for most common tasks.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Analogy:&lt;/strong&gt; Think of jQuery. It provided a much simpler way to interact with the often-clunky browser DOM APIs. You didn't need to know all the low-level details; jQuery gave you a friendly facade.
&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%2F6zscvfmh0by5nz8v2oos.png" alt="Image description" width="800" height="436"&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Key Idea:&lt;/strong&gt; You're not &lt;em&gt;preventing&lt;/em&gt; access to the underlying systems, just offering an easier entry point.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  6. The Proxy Pattern: The "Bodyguard" or "Substitute"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist (Structural):&lt;/strong&gt; Provides a surrogate or placeholder for another object to control access to it. Like a substitute teacher filling in for the real one, or a bodyguard controlling who gets to see the VIP.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Why Use It?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Lazy Loading:&lt;/strong&gt; Only load a large object when it's actually needed.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Access Control:&lt;/strong&gt; Check permissions before allowing an operation.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Logging/Caching:&lt;/strong&gt; Intercept calls to add logging or cache results.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Reactivity (like in Vue.js):&lt;/strong&gt; When you change data on a proxy object, Vue's reactivity system can intercept that change (via &lt;code&gt;get&lt;/code&gt; and &lt;code&gt;set&lt;/code&gt; handlers) and update the UI.
&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%2Fog3nlek195i1uzqojlcj.png" alt="Image description" width="800" height="436"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;In JavaScript:&lt;/strong&gt; The &lt;code&gt;Proxy&lt;/code&gt; object is a native feature, perfect for implementing this!&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  7. The Iterator Pattern: The "Guided Tour"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist (Behavioral):&lt;/strong&gt; Provides a way to access the elements of an aggregate object (like an array or list) sequentially without exposing its underlying representation. Think of a "Next" button on a music player.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Already Familiar:&lt;/strong&gt; If you've used a &lt;code&gt;for...of&lt;/code&gt; loop in JavaScript to go through an array, you've used the Iterator pattern!&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Custom Iterators:&lt;/strong&gt; You can create your own! For example, the video mentions creating a &lt;code&gt;range&lt;/code&gt; iterator in JavaScript to iterate a certain number of times at a specific interval. This involves defining an object with a &lt;code&gt;next()&lt;/code&gt; method that returns an object with &lt;code&gt;value&lt;/code&gt; and &lt;code&gt;done&lt;/code&gt; properties.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual: How a for...of loop might work with an iterator&lt;/span&gt;
&lt;span class="c1"&gt;// const myArray = [1, 2, 3];&lt;/span&gt;
&lt;span class="c1"&gt;// for (const item of myArray) { /* ... */ }&lt;/span&gt;
&lt;span class="c1"&gt;// myArray must have a [Symbol.iterator]() method that returns an iterator object.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&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%2Fi9ep02yoebxs3cy5k6n5.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%2Fi9ep02yoebxs3cy5k6n5.png" alt="Image description" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Core Idea:&lt;/strong&gt; Separates the traversal logic from the collection itself. It's a "pull-based" system – you ask for the next item.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  8. The Observer Pattern: The "News Subscription"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist (Behavioral):&lt;/strong&gt; Defines a one-to-many dependency between objects so that when one object (the "subject" or "publisher") changes state, all its dependents ("observers" or "subscribers") are notified and updated automatically.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Real-World Analogy:&lt;/strong&gt; Subscribing to a YouTube channel. When the creator posts a new video (state change), all subscribers get a notification.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Use Cases:&lt;/strong&gt; Event handling, UI updates (like Firebase data syncing to clients), reactive programming (RxJS is a prime example).
&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%2Fifr1685ei6e4a9aam5c2.png" alt="Image description" width="800" height="436"&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Key Idea:&lt;/strong&gt; It's a "push-based" system. The subject pushes updates to its observers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  9. The Mediator Pattern: The "Air Traffic Controller"
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist (Behavioral):&lt;/strong&gt; Defines an object (the "mediator") that encapsulates how a set of objects interact. Instead of objects talking directly to each other (a messy many-to-many web), they all talk to the mediator, which coordinates their actions.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Analogy:&lt;/strong&gt; An air traffic controller. Airplanes don't talk directly to all other airplanes and runways; they communicate with the controller, who manages landings and takeoffs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Problem Solved:&lt;/strong&gt; Reduces coupling between objects. Makes it easier to change the interaction logic because it's centralized in the mediator.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Example:&lt;/strong&gt; Express.js middleware. An incoming request (airplane) goes through middleware (the mediator system) which can transform it before it reaches its final handler (the runway).
&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%2F8551m6i4qg76xxjlxhev.png" alt="Image description" width="800" height="436"&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Benefit:&lt;/strong&gt; Promotes looser coupling and better separation of concerns.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  10. The State Pattern: The "Mood Ring" Object
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Gist (Behavioral):&lt;/strong&gt; Allows an object to alter its behavior when its internal state changes. The object will appear to change its class.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Problem Solved:&lt;/strong&gt; Avoids massive &lt;code&gt;if/else if/else&lt;/code&gt; or &lt;code&gt;switch&lt;/code&gt; statements based on an object's state. Instead, you encapsulate state-specific behavior in separate "state" objects.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;How it Works:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt; Define a base "state" interface/class.&lt;/li&gt;
&lt;li&gt; Create concrete state classes that implement this interface, each with its own behavior for the methods.&lt;/li&gt;
&lt;li&gt; The main object (the "context") holds a reference to a current state object.&lt;/li&gt;
&lt;li&gt; When a method is called on the context, it delegates the call to its current state object.&lt;/li&gt;
&lt;li&gt; The context or the state objects can transition the context to a new state.
&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%2Fjrd1ln0xfhhlly2x7xi4.png" alt="Image description" width="800" height="436"&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Example:&lt;/strong&gt; A &lt;code&gt;Human&lt;/code&gt; object whose &lt;code&gt;think()&lt;/code&gt; method behaves differently based on its &lt;code&gt;mood&lt;/code&gt; (HappyState, SadState, AngryState). Instead of a switch statement in &lt;code&gt;Human.think()&lt;/code&gt;, the &lt;code&gt;Human&lt;/code&gt; object delegates to &lt;code&gt;this.mood.think()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Benefit:&lt;/strong&gt; Makes an object's behavior predictable and easier to manage as the number of states grows. Related to the concept of Finite State Machines (FSMs).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Beyond the Blueprints: Making Patterns Work for YOU
&lt;/h2&gt;

&lt;p&gt;Phew! That was a whirlwind tour. Remember, these design patterns are tools, not commandments carved in stone. The real skill lies in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Recognizing&lt;/strong&gt; when a problem you're facing has a known pattern-based solution.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Understanding&lt;/strong&gt; the trade-offs of applying a particular pattern.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Adapting&lt;/strong&gt; the pattern to fit your specific context and programming language.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Becoming a proficient software engineer isn't just about knowing a language's syntax; it's about wielding these powerful problem-solving techniques to build robust, maintainable, and elegant software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now, over to you! Which of these design patterns do you find yourself using most often? Are there any others you think every developer should know? Share your thoughts in the comments below!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to OVER Engineer a Website // What is a Tech Stack?</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Tue, 27 May 2025 13:17:20 +0000</pubDate>
      <link>https://forem.com/alishirani/how-to-over-engineer-a-website-what-is-a-tech-stack-26g9</link>
      <guid>https://forem.com/alishirani/how-to-over-engineer-a-website-what-is-a-tech-stack-26g9</guid>
      <description>&lt;p&gt;Okay, let's slice into this juicy topic! You've got that billion-dollar startup idea bouncing around your brain, ready to disrupt industries and make Zuck sweat. But hold your horses, aspiring tech mogul! Before you can even think about IPOs and private jets, you need to choose your &lt;strong&gt;Tech Stack&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And trust me, choosing your tech stack is like picking the ingredients for a gourmet sandwich. Get it right, and you've got a masterpiece. Get it wrong, and well... you're left with a soggy, unappetizing mess that's a &lt;em&gt;real&lt;/em&gt; pain to remake.&lt;/p&gt;

&lt;p&gt;Today, we're not just making any sandwich; we're learning how to build a &lt;strong&gt;technology sandwich&lt;/strong&gt; – from the ridiculously over-engineered Dagwood to the elegantly simple gourmet slider. We'll peek at famous stacks like LAMP, MEAN, MERN, and even the fanciest custom creations. By the end, you'll be a connoisseur of tech stacks, ready to architect (or over-architect) like a seasoned pro.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, What Exactly IS a Tech Stack? The Anatomy of Your Digital Sandwich 🥪
&lt;/h2&gt;

&lt;p&gt;There's no single, universally agreed-upon definition, but think of it as all the software technologies used to build and run one application. I like to break it down into three delicious layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Front-End (The "Presentation" Bread &amp;amp; Pretty Lettuce):&lt;/strong&gt;&lt;br&gt;
This is everything your user sees and interacts with. For web apps, this almost always means &lt;strong&gt;JavaScript&lt;/strong&gt; and its powerful frameworks (React, Angular, Vue, Svelte, etc.). For mobile, you're looking at Swift/Objective-C (iOS), Kotlin/Java (Android), or cross-platform heroes like Flutter or React Native.&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%2Fiip5is2pj6ygkk9jpm6c.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%2Fiip5is2pj6ygkk9jpm6c.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Back-End (The "Engine Room" Meat &amp;amp; Cheese):&lt;/strong&gt;&lt;br&gt;
This is the server-side magic. It includes your server-side programming language and framework (Node.js, Python with Django/Flask, Ruby on Rails, Java with Spring, PHP with Laravel), your &lt;strong&gt;database&lt;/strong&gt; (where all that precious user data lives), and the cloud infrastructure (AWS, Google Cloud, Azure) that hosts it all.&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%2Fd03sbnyg3ly7lrfxao6v.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%2Fd03sbnyg3ly7lrfxao6v.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;APIs (The "Special Sauce" Connecting it All &amp;amp; Adding Flavor):&lt;/strong&gt;&lt;br&gt;
Application Programming Interfaces are the messengers. This includes how your front-end talks to your back-end (think REST or GraphQL). Crucially, it also includes essential &lt;strong&gt;third-party services&lt;/strong&gt; that you'd be crazy to build yourself: Stripe for payments, Twilio for SMS, SendGrid for emails, and so on.&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%2Ffrqo2vsv6af31fmdr2g9.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%2Ffrqo2vsv6af31fmdr2g9.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A Quick Trip Down Memory Lane: The OG - LAMP Stack
&lt;/h2&gt;

&lt;p&gt;Back in the digital stone age of the late '90s, building web apps was a complex, often expensive affair. Then came &lt;strong&gt;LAMP&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;L&lt;/strong&gt;inux (Operating System)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;A&lt;/strong&gt;pache (Web Server)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;M&lt;/strong&gt;ySQL (Database)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;P&lt;/strong&gt;HP (Programming Language)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was free, open-source, and powered a revolution, leading to giants like WordPress and Joomla. Simpler times, perhaps, but tech stacks have evolved... a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Acronym Game: Why MEAN, MERN, and MEVN Sound So Catchy
&lt;/h2&gt;

&lt;p&gt;The tech world &lt;em&gt;loves&lt;/em&gt; a good acronym. It makes you sound like you know what you're doing, even if you just picked it because it rolls off the tongue.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;MEAN:&lt;/strong&gt; MongoDB, Express.js, Angular, Node.js&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;MERN:&lt;/strong&gt; MongoDB, Express.js, React, Node.js&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;MEVN:&lt;/strong&gt; MongoDB, Express.js, Vue.js, Node.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fireship.io even cooked up &lt;strong&gt;FANCY&lt;/strong&gt;: Firebase, Angular, Node.js, Cloud Functions (implied), Stripe, Express.js. (Okay, maybe I improvised a bit on the 'F' and 'C', but you get the idea!) The truth is, these catchy names rarely capture the &lt;em&gt;full&lt;/em&gt; picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Build a Monster! Architecting the "Next MySpace" with Maximum Overkill 🚀
&lt;/h2&gt;

&lt;p&gt;Alright, let's pretend we're building the next social media behemoth. We need user authentication, a massive database for user content, and global scalability. Our guiding principle? &lt;strong&gt;"If it's hot, new, or adds complexity, throw it in!"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 1: The Front-End Extravaganza&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Language:&lt;/strong&gt; We're targeting the web (with a side of potential mobile). So, JavaScript it is. But not just any JavaScript! We need &lt;strong&gt;TypeScript&lt;/strong&gt; for that sweet, sweet type safety. Because more types = fewer bugs, right? (Spoiler: sometimes.)&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;UI Framework:&lt;/strong&gt; So many choices! We'll go with &lt;strong&gt;React&lt;/strong&gt;. Not necessarily because it's the &lt;em&gt;best&lt;/em&gt;, but because it's the &lt;em&gt;most popular&lt;/em&gt;. This means a bigger hiring pool later. Plus, &lt;strong&gt;React Native&lt;/strong&gt; for that eventual mobile app. Sorry, Svelte, maybe next time.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;State Management:&lt;/strong&gt; Our app is gonna be HUGE. We need state management. Enter &lt;strong&gt;Redux&lt;/strong&gt;. Everyone loves to hate it, but it allows for &lt;em&gt;so much boilerplate code&lt;/em&gt;. And more code is always better, obviously.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Styling:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Vanilla CSS? Please. We need &lt;strong&gt;Tailwind CSS&lt;/strong&gt; for utility classes that make our HTML look like an alien artifact but let us style things "quickly."&lt;/li&gt;
&lt;li&gt;  And because that's not enough, let's add a CSS pre-processor like &lt;strong&gt;Sass&lt;/strong&gt; for more efficient styling syntax.&lt;/li&gt;
&lt;li&gt;  Oh, and &lt;strong&gt;PostCSS&lt;/strong&gt; to purge unused styles and prep for production. Can't be too careful.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Module Bundler:&lt;/strong&gt; All that JavaScript needs to be bundled for the browser. &lt;strong&gt;Webpack&lt;/strong&gt; it is! Notoriously frustrating to configure, but hey, it's popular!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Layer 2: The Back-End Behemoth&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Primary Database:&lt;/strong&gt; We need to store user data and their relationships (it's a social network!). While NoSQL (like MongoDB) is tempting for flexibility, a relational database like &lt;strong&gt;MySQL&lt;/strong&gt; (the gold standard) is better for those complex relationships.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Caching Database:&lt;/strong&gt; MySQL might get slow at scale. So, let's add &lt;strong&gt;Redis&lt;/strong&gt; as an in-memory cache. Data in RAM is way faster to read!&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Server-Side Runtime &amp;amp; Framework:&lt;/strong&gt; As JavaScript fans, &lt;strong&gt;Node.js&lt;/strong&gt; is our runtime. We'll pair it with &lt;strong&gt;NestJS&lt;/strong&gt;, a framework that plays nice with TypeScript.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;ORM (Object-Relational Mapper):&lt;/strong&gt; Writing raw SQL is for peasants. We'll use &lt;strong&gt;TypeORM&lt;/strong&gt; to interact with our database using JavaScript/TypeScript objects.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Web Server:&lt;/strong&gt; To actually serve our app to the internet, we'll throw in &lt;strong&gt;Nginx&lt;/strong&gt; (or Apache).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Deployment &amp;amp; Orchestration:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Docker:&lt;/strong&gt; To containerize our app, creating a standard environment.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Kubernetes (K8s):&lt;/strong&gt; To orchestrate our legion of Docker containers as we scale.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Cloud Provider:&lt;/strong&gt; &lt;strong&gt;Amazon Web Services (AWS)&lt;/strong&gt;. Why? For the most beautifully complex user experience, of course!&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Infrastructure as Code:&lt;/strong&gt; We're not clicking buttons in AWS like savages. &lt;strong&gt;Terraform&lt;/strong&gt; will let us define our infrastructure programmatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Source Code &amp;amp; CI/CD:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub:&lt;/strong&gt; To host our precious code.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;GitHub Actions:&lt;/strong&gt; For a continuous integration/continuous deployment (CI/CD) pipeline. Every push automatically tests and redeploys!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Layer 3: The API Cornucopia&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Front-End to Back-End Communication:&lt;/strong&gt; REST is old news. We're using &lt;strong&gt;GraphQL&lt;/strong&gt; with &lt;strong&gt;Apollo Client/Server&lt;/strong&gt; to let our front-end request &lt;em&gt;exactly&lt;/em&gt; the data it needs.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Payments:&lt;/strong&gt; We're not building a payment gateway. &lt;strong&gt;Stripe&lt;/strong&gt; it is.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;User Authentication:&lt;/strong&gt; Definitely not rolling our own. &lt;strong&gt;Auth0&lt;/strong&gt; will handle logins, signups, and security.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Content Moderation:&lt;/strong&gt; We don't want... &lt;em&gt;unwanted images&lt;/em&gt;. &lt;strong&gt;Amazon Rekognition&lt;/strong&gt; and its deep learning "uh-oh" detection capabilities will keep things clean.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Text Messages:&lt;/strong&gt; How else will users get 2FA codes? &lt;strong&gt;Twilio&lt;/strong&gt; to the rescue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Phew!&lt;/em&gt; Look at that magnificent, over-engineered beast!&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%2F9u2qm5fiaukqo9bydlex.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%2F9u2qm5fiaukqo9bydlex.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Reality Check: Your Users Don't Give a Damn About Your Kubernetes Cluster
&lt;/h2&gt;

&lt;p&gt;Here's the kicker: &lt;strong&gt;your end-users don't care about your tech stack.&lt;/strong&gt; They will never know, nor should they need to know, what wizardry powers your app. They just want a good experience. If your app is slow, buggy, or hard to use because you spent six months configuring Kubernetes instead of talking to users, you'll never &lt;em&gt;get&lt;/em&gt; to the point where you actually &lt;em&gt;need&lt;/em&gt; Kubernetes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"It's important to keep in mind that your end users don't care and will never know what technology you use to build the application. They just want to have a good experience."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Let's Hit Reset: The "Keep It Simple, Startup" (KISS) Approach 💋
&lt;/h2&gt;

&lt;p&gt;Okay, let's throw that glorious monstrosity in the virtual garbage can and start fresh, this time with a focus on speed, simplicity, and actually shipping something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Front-End, Simplified:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Framework:&lt;/strong&gt; Instead of React's complexity, let's try &lt;strong&gt;Petite Vue&lt;/strong&gt;. It's Vue-compatible, tiny, and you can drop it in with a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag. No module bundler needed (initially)!&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;CSS:&lt;/strong&gt; &lt;strong&gt;Bootstrap&lt;/strong&gt;. It might be a bit "cookie-cutter," but it's arguably the fastest way to a decent-looking UI.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Mobile (If Needed Later):&lt;/strong&gt; &lt;strong&gt;Ionic&lt;/strong&gt;. It can wrap your web app in a native shell, letting you ship to iOS and Android quickly.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Back-End &amp;amp; APIs, Radically Simplified:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;All-in-One Platform:&lt;/strong&gt; &lt;strong&gt;Firebase&lt;/strong&gt; (from Google).

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Database:&lt;/strong&gt; Firestore (a NoSQL document database that scales beautifully).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Authentication:&lt;/strong&gt; Built-in user auth.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Hosting:&lt;/strong&gt; Static hosting for your front-end.&lt;/li&gt;
&lt;li&gt;  All included by adding a script tag!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Server-Side Code (If You &lt;em&gt;Really&lt;/em&gt; Need It):&lt;/strong&gt; &lt;strong&gt;Firebase Cloud Functions&lt;/strong&gt;. Write serverless functions in Node.js, Python, or Go. Deploy with a single command. No Docker, no Kubernetes, no Terraform to worry about. It scales automatically.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;CI/CD:&lt;/strong&gt; For now? Let's skip it. Unless you're deploying multiple times a day, it's probably overkill for an early-stage product.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;GraphQL:&lt;/strong&gt; Not needed. Firebase's SDKs handle data fetching just fine for most initial use cases.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Third-Party APIs:&lt;/strong&gt; Still use Stripe for payments, etc., but integrate them directly or via Cloud Functions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And just like that, we have the &lt;strong&gt;"Petite Fire" Stack&lt;/strong&gt; (Petite Vue + Firebase). It's lean, mean, and lets you build a full-stack web application incredibly quickly.&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%2F1o43yqv2bb6zix1ax1kh.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%2F1o43yqv2bb6zix1ax1kh.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Moral of the Sandwich Story 🥪
&lt;/h2&gt;

&lt;p&gt;Building a tech stack is a journey of choices and trade-offs. While it's fun to dream about using all the latest and greatest technologies, remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Complexity is a cost:&lt;/strong&gt; It costs time, money, and mental energy.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Start simple:&lt;/strong&gt; Get your product in front of users ASAP. You can always evolve your stack later if (and when) you achieve the scale that demands it.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Focus on user value:&lt;/strong&gt; That's the only thing that truly matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, before you build that 12-layer tech sandwich with artisanal everything, maybe start with a classic PB&amp;amp;J. It might just be delicious enough to get you funded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's in your dream tech stack? Or what's the most over-engineered setup you've ever seen? Share your thoughts in the comments below!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How Programmers Flex On Each Other</title>
      <dc:creator>Ali Shirani</dc:creator>
      <pubDate>Mon, 26 May 2025 10:47:39 +0000</pubDate>
      <link>https://forem.com/alishirani/how-programmers-flex-on-each-other-2jd3</link>
      <guid>https://forem.com/alishirani/how-programmers-flex-on-each-other-2jd3</guid>
      <description>&lt;p&gt;Okay, this is GOLD. Programmers flexing on each other? It's a tale as old as &lt;code&gt;malloc&lt;/code&gt;. Let's turn this comedic genius into a blog post that'll have developers nodding, laughing, and maybe even feeling a little called out.&lt;/p&gt;

&lt;p&gt;Here we go!&lt;/p&gt;




&lt;h2&gt;
  
  
  The Unspoken Art of the Programmer Flex: 10 Hilarious Ways We Secretly (or Not-So-Secretly) Judge Each Other 🧐
&lt;/h2&gt;

&lt;p&gt;Ever been peacefully coding, minding your own &lt;code&gt;//TODOs&lt;/code&gt;, when a colleague saunters over, glances at your screen, and drops a comment so subtly condescending it leaves you questioning your entire career?&lt;/p&gt;

&lt;p&gt;Picture this: you're rocking your favorite VS Code theme (Synthwave '84 with Power Mode, obviously 🔥). A Staff Engineer strolls by. "Cute theme," he smirks. Before you can elaborate on its aesthetic and productivity-boosting virtues, he leans in, "You see that bug on line 234?"&lt;/p&gt;

&lt;p&gt;"Impossible!" you declare, "100% test coverage, sir!"&lt;/p&gt;

&lt;p&gt;He just chuckles. "Gonna pull it up in &lt;strong&gt;NeoVim on my Arch desktop&lt;/strong&gt;. I'll send you a PR." Five minutes later, Slack dings. PR received. Tests passing. &lt;strong&gt;469 lines of code GONE&lt;/strong&gt;. Commit message: &lt;code&gt;optimize suboptimal code&lt;/code&gt;. As he peels out of the parking lot in his Tesla, it hits you. You've been flexed upon. Hard.&lt;/p&gt;

&lt;p&gt;If you're a programmer, you know the two states of being: &lt;strong&gt;crippling Imposter Syndrome&lt;/strong&gt; or a &lt;strong&gt;God-Tier Superiority Complex&lt;/strong&gt;. There's rarely an in-between. Today, we're diving into the latter. Let's explore 10 practical (and hilarious) ways programmers flex, so you too can achieve peak "best programmer in your own mind" status.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Complexity Flex: "You Wouldn't Get It, It's Clean Code™"
&lt;/h3&gt;

&lt;p&gt;The old adage says, "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." But where's the fun in that?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Move:&lt;/strong&gt; Take a perfectly functional, simple JavaScript function.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Level Up:&lt;/strong&gt; Slap TypeScript on it. Preach about "end-to-end type safety" like you're delivering a sermon from the Mount of Compilation.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ascend:&lt;/strong&gt; Refactor it into an Abstract Factory Singleton Adapter Decorator Proxy.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Clincher:&lt;/strong&gt; When your teammates stare blankly, sigh dramatically and mutter, "Guess you haven't read the Gang of Four. This is &lt;em&gt;clean code&lt;/em&gt;."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CTO (who secretly still thinks Java is a type of coffee) will be so impressed by the buzzwords, you'll get a raise. Genius!&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%2Fqudbpsuz3p2r9kcsejz4.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%2Fqudbpsuz3p2r9kcsejz4.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Money Flex: From Arby's to Altcoins 💰
&lt;/h3&gt;

&lt;p&gt;Ah, the universal language of status. The amount of money you make is &lt;em&gt;directly&lt;/em&gt; proportional to the value you bring... or so the LinkedIn gurus tell us.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Level 1:&lt;/strong&gt; Junior Dev (50k/year) casually mentions their salary to old colleagues still slinging roast beef (45k/year).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Level 2:&lt;/strong&gt; The cubicle mate who negotiated better (225k/year) silently judges Level 1.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Level 3:&lt;/strong&gt; Their cousin at Netflix (900k/year) makes Level 2 feel like a peasant.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Level 4:&lt;/strong&gt; The landlord, an early Uber engineer (25M net worth), posts "inspiring" threads on X about "value creation."&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Boss Level:&lt;/strong&gt; The billionaire crypto bro, who rug-pulled all the Level 1-3 flexors, posts from his yacht.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The circle of life is truly beautiful. Subscribe for more financial advice!&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%2Fcsr7j7mwevjpw1hnqrad.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%2Fcsr7j7mwevjpw1hnqrad.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Vim Flex: &lt;code&gt;:wq&lt;/code&gt; is for Winners (Who Know How to Exit)
&lt;/h3&gt;

&lt;p&gt;Using Vim doesn't just make you a programmer; it elevates you to a higher plane of existence. From this enlightened perch, you can look down upon the poor, lost souls fumbling with VS Code, IntelliJ, or (gasp) Emacs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Mark of a True Disciple:&lt;/strong&gt; No mouse. Anywhere. The trackpad is covered in duct tape.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Unspoken Truth:&lt;/strong&gt; We've all struggled to exit Vim. But admitting it? Never. (Honestly, how &lt;em&gt;do&lt;/em&gt; you close VS Code without clicking the 'X'?)&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%2F6ebhxnngp1weyetb133m.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%2F6ebhxnngp1weyetb133m.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The OS Flex: "I Use Arch, BTW" 🐧
&lt;/h3&gt;

&lt;p&gt;Your operating system isn't just a tool; it's a personality test.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Macintosh:&lt;/strong&gt; "I'm rich." Add an Apple Vision Pro, and it becomes, "I'm rich AND a clown." 🤡&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ubuntu:&lt;/strong&gt; "I'm a real developer, and I like things to mostly work." (Impresses normies).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Red Hat Enterprise Linux:&lt;/strong&gt; "I pay IBM a lot of money. I'm a &lt;em&gt;corporate&lt;/em&gt; baller."&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Urinal Encounter:&lt;/strong&gt; You're minding your business. A figure appears. A knowing glance. Three whispered words: "I use Arch, btw." Instant ego deflation. Your distro feels... inadequate.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Real Ultimate Distro: Windows.&lt;/strong&gt; Why? It screams, "I have a life! Maybe even a girlfriend! Outside of programming!" Shocking, I know.&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%2F1zk4vgb1pmmyxlzun6zx.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%2F1zk4vgb1pmmyxlzun6zx.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. The GitHub Flex: Green Squares Are My Love Language 🟩
&lt;/h3&gt;

&lt;p&gt;If your GitHub commit history doesn't look like a perfectly manicured lawn of green squares, are you even a real programmer? Do you even &lt;em&gt;care&lt;/em&gt; about open source?&lt;/p&gt;

&lt;p&gt;Your profile should have more badges and awards than a North Korean General. How to achieve this? By flexing on other open source projects, of course!&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%2Fcmskfft6g243zgngu04x.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%2Fcmskfft6g243zgngu04x.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. The Chainsaw PR Flex: "Optimized Your Suboptimal Code" 🔪
&lt;/h3&gt;

&lt;p&gt;This one's for the Top G's of JavaScript (or any language, really).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Strategy:&lt;/strong&gt; Find new, small projects from young, enthusiastic developers.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Execution:&lt;/strong&gt; Fork their code. Remove &lt;em&gt;every single line possible&lt;/em&gt; while ensuring all tests still pass.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Coup de Grâce:&lt;/strong&gt; Send a vague pull request: "Cleaned up the code to use best practices."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If done correctly, the original project will soon be abandoned. No programmer can withstand that level of flexing. We're losing them!&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%2Ffcmjmbu973ushgs2fd3k.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%2Ffcmjmbu973ushgs2fd3k.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7. The Influencer Flex: Hot Takes &amp;amp; Elon Replies 🔥
&lt;/h3&gt;

&lt;p&gt;Can't code? Become an influencer! It's the natural progression.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Step 1:&lt;/strong&gt; Pay your $8 for X (formerly Twitter).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Step 2:&lt;/strong&gt; Post outrageous hot takes that &lt;em&gt;nobody&lt;/em&gt; could possibly agree with. "JavaScript's &lt;code&gt;this&lt;/code&gt; keyword is perfectly intuitive." "CSS is easy." "Tabs are superior to spaces."&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Dream:&lt;/strong&gt; If your advice is egregiously bad enough, you might even get a reply from Elon Musk himself! You can then flex about this on your YouTube channel. (Yes, that was a real tweet. Elon and I are basically best friends now.)&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%2Fe9vsk6i7udi0dvj17u11.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%2Fe9vsk6i7udi0dvj17u11.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  8. The FAANG Flex: "As An Ex-[Insert Tech Giant Here] Engineer..." 🏅
&lt;/h3&gt;

&lt;p&gt;Working at a FAANG (or MANGA, or whatever acronym is cool now) company grants you a lifelong privilege: starting every sentence with, "As an ex-[Facebook/Amazon/Apple/Netflix/Google] engineer, I recommend you make X bad decision."&lt;/p&gt;

&lt;p&gt;It's like a special club everyone &lt;em&gt;wants&lt;/em&gt; to be in, even if they say they don't because their "moral compass is too well-calibrated." (Translation: They didn't grind LeetCode enough.) If I ever got a job at FAANG, I'd tattoo it on my forehead.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. The Domain Hoarding Flex: My GoDaddy &amp;gt; Your Robinhood 🌐
&lt;/h3&gt;

&lt;p&gt;Your GoDaddy account isn't just a graveyard of failed side projects; it's an &lt;em&gt;investment portfolio&lt;/em&gt;. These domains will one day be heirlooms for your grandkids.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Best-SEO-Backlink-Tool.net&lt;/code&gt;? &lt;code&gt;Amazing-Crypto-AI-Startup.io&lt;/code&gt;? &lt;code&gt;MyCoolSaaSApp-v2.dev&lt;/code&gt;? These aren't just names; they're valuable digital real estate. Any developer would kill for such assets.&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%2F2kqewa00npsbeaspiags.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%2F2kqewa00npsbeaspiags.png" alt="Image description" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10. The Ultimate Flex: Trading Code for Cows 🧑‍🌾🐄
&lt;/h3&gt;

&lt;p&gt;The programmer who blows up their meticulously curated mechanical keyboard collection, smashes their ergonomic chair, and joins the Amish is invincible.&lt;/p&gt;

&lt;p&gt;As they milk their cow and tend their crops, their identity is no longer tied to code quality, GitHub stars, likes, followers, or even money. They look at a spiderweb, glistening with morning dew, and it reminds them of a silicon chip. They recognize the inherent intelligence permeating all of nature. Its beauty is overwhelming. They begin to cry.&lt;/p&gt;

&lt;p&gt;In that moment, connected to all who lived and died before, they realize their own insignificance – terrifying and liberating.&lt;/p&gt;

&lt;p&gt;And then it hits them. The spider, with its perfectly engineered web, its intricate design, its flawless execution... &lt;strong&gt;the spider was just flexing on them.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;So, there you have it. The programmer's unofficial guide to ego management. Whether you're delivering a Chainsaw PR or simply admiring your own Arch setup, remember: we're all just trying to feel a little less like imposters in this crazy, beautiful world of code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the biggest flex you've ever witnessed or perpetrated? Share your war stories in the comments below! Let the flexing continue!&lt;/strong&gt; 👇&lt;/p&gt;

</description>
      <category>devto</category>
      <category>webdev</category>
      <category>programming</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
