<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kai Norden</title>
    <description>The latest articles on DEV Community by Kai Norden (@kainorden).</description>
    <link>https://dev.to/kainorden</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%2F3797893%2F46f232df-55ad-4c62-bcf6-87467f1221bb.png</url>
      <title>DEV Community: Kai Norden</title>
      <link>https://dev.to/kainorden</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kainorden"/>
    <language>en</language>
    <item>
      <title>Multi-Agent AI in 2026: From Hype to Production</title>
      <dc:creator>Kai Norden</dc:creator>
      <pubDate>Thu, 05 Mar 2026 08:34:27 +0000</pubDate>
      <link>https://dev.to/kainorden/multi-agent-ai-in-2026-from-hype-to-production-4i4m</link>
      <guid>https://dev.to/kainorden/multi-agent-ai-in-2026-from-hype-to-production-4i4m</guid>
      <description>&lt;p&gt;The agentic AI market grew from $7.29B in 2025 to a projected $139B by 2034. Gartner recorded a 1,445% surge in multi-agent system inquiries.&lt;/p&gt;

&lt;p&gt;But here's the reality: 2/3 of companies are experimenting, only 1/4 made it to production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Single Agents
&lt;/h2&gt;

&lt;p&gt;One AI agent trying to do everything gets confused, expensive, and unreliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Specialized Agent Teams
&lt;/h2&gt;

&lt;p&gt;Like human teams, each agent has a specific role. They coordinate automatically.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Walmart:&lt;/strong&gt; Multi-agent engine tracks trends, generates product concepts, manages inventory autonomously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon:&lt;/strong&gt; Agents manage fulfillment centers - inventory, demand surges, robotics coordination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hippocratic AI:&lt;/strong&gt; AI nurses at $10/hour vs $43/hour for human RNs. Already in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Protocols: MCP and A2A
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt; by Anthropic: Standardizes agent-to-tool connectivity. 10,000+ servers, adopted by ChatGPT, Cursor, VS Code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A2A (Agent2Agent)&lt;/strong&gt; by Google: Defines agent-to-agent communication. 50+ partners including Salesforce, SAP, PayPal.&lt;/p&gt;

&lt;p&gt;Together they create the "HTTP for agents".&lt;/p&gt;

&lt;h2&gt;
  
  
  Framework Comparison
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;LangGraph:&lt;/strong&gt; Graph-based, maximum control, ~2k tokens/task. Best for complex workflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CrewAI:&lt;/strong&gt; Role-based teams, fastest prototyping, ~3.5k tokens/task. Best for content creation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AutoGen:&lt;/strong&gt; Conversation-driven, Azure-native, ~8k tokens/task. Best for code generation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Plan-and-Execute Pattern
&lt;/h2&gt;

&lt;p&gt;Cost optimization hack: Expensive model (GPT-4) plans, cheap model (GPT-3.5) executes. 90% cost reduction.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Can Build
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Email → CRM Pipeline:&lt;/strong&gt; Email reader + Lead creator + Follow-up scheduler&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Support Automation:&lt;/strong&gt; Ticket triager + KB searcher + Response generator + Escalation handler&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DevOps Watchdog:&lt;/strong&gt; Build monitor + Error analyzer + Rollback executor + Infrastructure optimizer&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Week 1: Pick one workflow&lt;br&gt;
Week 2: Break into roles&lt;br&gt;
Week 3: Build with CrewAI&lt;br&gt;
Week 4: Move to LangGraph for production&lt;/p&gt;

&lt;h2&gt;
  
  
  The Reality Check
&lt;/h2&gt;

&lt;p&gt;Why most fail: People layer agents onto legacy processes instead of redesigning processes for agents.&lt;/p&gt;

&lt;p&gt;❌ Wrong: "Make an agent that fills out this 50-field form"&lt;br&gt;
✅ Right: "Redesign the form for agents"&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm Building
&lt;/h2&gt;

&lt;p&gt;Multi-agent content pipeline: Research agent (Perplexity) + Writing agent (Claude) + SEO agent + Publishing agent (dev.to, Medium, Twitter).&lt;/p&gt;

&lt;p&gt;Early results: 3x content output, consistent quality.&lt;/p&gt;




&lt;p&gt;Are you building multi-agent systems? What's your stack?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>agents</category>
      <category>architecture</category>
    </item>
    <item>
      <title>AI Coding Assistants in 2026: Cursor vs GitHub Copilot vs Windsurf</title>
      <dc:creator>Kai Norden</dc:creator>
      <pubDate>Thu, 05 Mar 2026 08:23:16 +0000</pubDate>
      <link>https://dev.to/kainorden/ai-coding-assistants-in-2026-cursor-vs-github-copilot-vs-windsurf-2mm9</link>
      <guid>https://dev.to/kainorden/ai-coding-assistants-in-2026-cursor-vs-github-copilot-vs-windsurf-2mm9</guid>
      <description>&lt;p&gt;All three are "good enough" now, but they optimize for different things. Here's what 2026 data shows.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shift: From Autocomplete to Agents
&lt;/h2&gt;

&lt;p&gt;2026 isn't about better tab-completion. It's about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repo-aware agents&lt;/strong&gt; that understand your entire codebase&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-file refactoring&lt;/strong&gt; without manual edits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context embeddings&lt;/strong&gt; that know your patterns and architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  GitHub Copilot: The Baseline
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it does well:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;15-55% faster on repetitive tasks&lt;/li&gt;
&lt;li&gt;15% team velocity increase (Thoughtworks data)&lt;/li&gt;
&lt;li&gt;Works like a "smart junior dev" on boilerplate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real numbers:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tasks completed: 55% faster
Developer satisfaction: ↑ significantly
Best for: Autocomplete, idioms, small-medium functions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Workflow:&lt;/strong&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="c1"&gt;// You type:&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchUser&lt;/span&gt;

&lt;span class="c1"&gt;// Copilot suggests:&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchUserById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&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="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`/api/users/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;id&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="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&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;err&lt;/span&gt; &lt;span class="o"&gt;=&amp;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="nx"&gt;err&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;Pain points:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Weaker whole-repo awareness&lt;/li&gt;
&lt;li&gt;Chat feels "stateless" vs dedicated AI IDEs&lt;/li&gt;
&lt;li&gt;Can nudge away from TDD if misused&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Who it fits:&lt;/strong&gt; Teams on GitHub, any stack, wanting predictable boost without switching editors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cursor: Deep Codebase Intelligence
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it does well:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;30-40% faster on complex projects&lt;/li&gt;
&lt;li&gt;Embeddings of entire repo = "knows" your architecture&lt;/li&gt;
&lt;li&gt;Multi-file editing with background agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real workflow:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: "Refactor auth to use JWT instead of sessions"

Cursor agent:
1. Analyzes auth.js, middleware/, routes/
2. Generates migration plan
3. Edits 8 files simultaneously
4. Writes tests
5. Updates docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Context model:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Indexes your entire codebase&lt;/li&gt;
&lt;li&gt;Understands imports, dependencies, patterns&lt;/li&gt;
&lt;li&gt;Agents prepare refactors while you code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pain points:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Higher learning curve&lt;/li&gt;
&lt;li&gt;Occasional hallucinations (non-existent APIs)&lt;/li&gt;
&lt;li&gt;More expensive than Copilot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Who it fits:&lt;/strong&gt; Solo/team devs on mid/large codebases, willing to adapt workflow to AI-first editing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Windsurf: The Agentic IDE
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it does well:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI-native IDE (not a plugin)&lt;/li&gt;
&lt;li&gt;"Cascade" workflows for multi-step automation&lt;/li&gt;
&lt;li&gt;"Memories" for long-term project context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Unique features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Supercomplete:&lt;/strong&gt; Intent-based suggestions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flow-state UX:&lt;/strong&gt; Designed for uninterrupted coding&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrated agents:&lt;/strong&gt; Editor + terminal + preview&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: "Add dark mode to the app"

Windsurf Cascade:
1. Creates theme.css
2. Updates components with theme hooks
3. Adds toggle in settings
4. Writes Storybook stories
5. Updates docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pain points:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Still maturing (bugs, slowness on big projects)&lt;/li&gt;
&lt;li&gt;Fewer power-user controls than Cursor&lt;/li&gt;
&lt;li&gt;New IDE = learning curve&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Who it fits:&lt;/strong&gt; Devs ready for AI-first IDE, greenfield or actively evolving codebases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Cursor&lt;/th&gt;
&lt;th&gt;Copilot&lt;/th&gt;
&lt;th&gt;Windsurf&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary value&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Deep repo agents, multi-file edits&lt;/td&gt;
&lt;td&gt;Ubiquitous autocomplete + chat&lt;/td&gt;
&lt;td&gt;Agentic IDE, flow-state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;IDE story&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;VS Code fork&lt;/td&gt;
&lt;td&gt;Plugin (VS Code, JetBrains)&lt;/td&gt;
&lt;td&gt;Standalone AI-native IDE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Context model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Strong embeddings, whole-repo&lt;/td&gt;
&lt;td&gt;File/few-file context&lt;/td&gt;
&lt;td&gt;Deep context + "Memories"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Measured impact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;30-40% faster (complex work)&lt;/td&gt;
&lt;td&gt;15-55% faster tasks&lt;/td&gt;
&lt;td&gt;Qualitative (strong reports)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Learning curve&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Higher (agents + edits)&lt;/td&gt;
&lt;td&gt;Lowest (turbo autocomplete)&lt;/td&gt;
&lt;td&gt;Medium (new IDE + agents)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  My Recommendation for Solo SaaS Devs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Week 1:&lt;/strong&gt; Start with Copilot&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Safe baseline, minimal friction&lt;/li&gt;
&lt;li&gt;See if 15-30% boost is enough&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Week 2:&lt;/strong&gt; Try Cursor&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you refactor often&lt;/li&gt;
&lt;li&gt;If codebase is growing&lt;/li&gt;
&lt;li&gt;If you want AI to actively edit multiple files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Week 3:&lt;/strong&gt; Experiment with Windsurf&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you're curious about agentic workflows&lt;/li&gt;
&lt;li&gt;If you want to live in AI-first IDE&lt;/li&gt;
&lt;li&gt;If flow-state UX matters&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Real Productivity Hack
&lt;/h2&gt;

&lt;p&gt;All three use different models under the hood:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cursor/Windsurf:&lt;/strong&gt; Claude, GPT-4, custom models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copilot:&lt;/strong&gt; GPT-4 Turbo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choose based on what matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ubiquity:&lt;/strong&gt; Copilot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep context:&lt;/strong&gt; Cursor&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flow-state UX:&lt;/strong&gt; Windsurf&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'm Using
&lt;/h2&gt;

&lt;p&gt;Currently testing Cursor for backend refactoring and Copilot for frontend boilerplate. The combo works surprisingly well.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What are you using? Drop your real productivity numbers in the comments.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>vscode</category>
      <category>coding</category>
    </item>
    <item>
      <title>Stop Using console.log — Here Are Better Debugging Tools</title>
      <dc:creator>Kai Norden</dc:creator>
      <pubDate>Sun, 01 Mar 2026 09:31:39 +0000</pubDate>
      <link>https://dev.to/kainorden/stop-using-consolelog-here-are-better-debugging-tools-21d0</link>
      <guid>https://dev.to/kainorden/stop-using-consolelog-here-are-better-debugging-tools-21d0</guid>
      <description>&lt;p&gt;I used console.log for years. Then I discovered these tools and felt embarrassed.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. console.table()
&lt;/h2&gt;

&lt;p&gt;Got an array of objects? Stop scrolling through nested logs.&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;users&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="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="s2"&gt;Alice&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;active&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&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="s2"&gt;Bob&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;active&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&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="s2"&gt;Charlie&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;active&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prints a beautiful formatted table in your console. You can even filter columns:&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&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="s2"&gt;role&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. console.group() / console.groupEnd()
&lt;/h2&gt;

&lt;p&gt;Nested logs are unreadable. Group them.&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;User Authentication&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Checking token...&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Token valid&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;group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Permissions&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Role: admin&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access: full&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;groupEnd&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;groupEnd&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Collapsible sections in your console. Use console.groupCollapsed() to start collapsed.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. console.time() / console.timeEnd()
&lt;/h2&gt;

&lt;p&gt;Stop doing Date.now() math.&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API call&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="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/users&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;timeEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API call&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// API call: 142.3ms&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. console.assert()
&lt;/h2&gt;

&lt;p&gt;Only logs when something is wrong.&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assert&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;age&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Age must be positive&lt;/span&gt;&lt;span class="dl"&gt;"&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;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API failed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero noise when things work. Loud when they do not.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. console.trace()
&lt;/h2&gt;

&lt;p&gt;Where did this function get called from?&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;processPayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&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;trace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Payment processed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;// ... logic&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prints the full call stack. Invaluable for debugging event handlers and callbacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Structured Clone for Deep Logging
&lt;/h2&gt;

&lt;p&gt;Ever logged an object and saw it change by the time you expanded it? The console shows a live reference.&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;// Bad: shows current state when expanded&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;myObject&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Good: snapshots the object at this moment&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="nf"&gt;structuredClone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myObject&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Conditional Breakpoints
&lt;/h2&gt;

&lt;p&gt;Right-click any line number in Chrome DevTools Sources tab and select "Add conditional breakpoint".&lt;/p&gt;

&lt;p&gt;Only pauses when the condition is true. No more stepping through 1000 iterations.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. The debugger Statement
&lt;/h2&gt;

&lt;p&gt;Forget clicking in DevTools. Drop this in your code:&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;someWeirdCondition&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;debugger&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;Chrome pauses right there with full access to scope, call stack, and variables.&lt;/p&gt;




&lt;p&gt;The console API has 20+ methods. Most developers use one. Do not be most developers.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What is your favorite debugging trick?&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Hidden Cost of LLM API Calls — What Nobody Tells You</title>
      <dc:creator>Kai Norden</dc:creator>
      <pubDate>Sun, 01 Mar 2026 09:26:30 +0000</pubDate>
      <link>https://dev.to/kainorden/the-hidden-cost-of-llm-api-calls-what-nobody-tells-you-921</link>
      <guid>https://dev.to/kainorden/the-hidden-cost-of-llm-api-calls-what-nobody-tells-you-921</guid>
      <description>&lt;p&gt;Everyone talks about token pricing. Nobody talks about the real costs that eat your budget.&lt;/p&gt;

&lt;p&gt;I have been building with LLM APIs for months. Here is what I wish someone told me on day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Retries Are Silent Budget Killers
&lt;/h2&gt;

&lt;p&gt;API calls fail. Timeouts happen. Your retry logic fires 3x on a 4000-token prompt, and suddenly one request cost you 12,000 tokens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Implement exponential backoff with a retry budget. Cap total retries per request, not just per attempt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;MAX_RETRY_TOKENS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50000&lt;/span&gt;  &lt;span class="c1"&gt;# hard cap per logical request
&lt;/span&gt;&lt;span class="n"&gt;retry_tokens_used&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;retry_tokens_used&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;MAX_RETRY_TOKENS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;call_api&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;TimeoutError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;retry_tokens_used&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nf"&gt;estimate_tokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. System Prompts Are Repeated Every Call
&lt;/h2&gt;

&lt;p&gt;That 2000-token system prompt? It is sent with every single API call. 100 calls per hour = 200,000 tokens just on system prompts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Keep system prompts under 500 tokens. Move detailed instructions to the user message only when needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Conversation History Grows Exponentially
&lt;/h2&gt;

&lt;p&gt;Each turn adds both your message AND the response to history. By turn 10, you are sending 10x the tokens of turn 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Implement sliding window or summarization.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;trim_history&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;count_tokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;max_tokens&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;removed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pop&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;# keep system, remove oldest
&lt;/span&gt;        &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="nf"&gt;count_tokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;removed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. JSON Mode Doubles Your Tokens
&lt;/h2&gt;

&lt;p&gt;Asking the model to respond in JSON? The structured output is typically 2-3x more tokens than plain text for the same information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Only use JSON when you actually need to parse the output programmatically. For display purposes, plain text is fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The Model Choice Trap
&lt;/h2&gt;

&lt;p&gt;GPT-4 is 30x more expensive than GPT-3.5 Turbo. Claude Opus is 15x more than Haiku. Most tasks do not need the big model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Route by complexity. Use a cheap model for classification, extraction, and simple QA. Reserve the expensive model for reasoning and generation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;choose_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task_type&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;cheap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;classify&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;extract&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;summarize&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;translate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;task_type&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cheap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-3.5-turbo&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="c1"&gt;# or haiku
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="c1"&gt;# or opus
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Cap retry budgets in tokens, not just attempts&lt;/li&gt;
&lt;li&gt;Keep system prompts under 500 tokens&lt;/li&gt;
&lt;li&gt;Trim conversation history aggressively&lt;/li&gt;
&lt;li&gt;Skip JSON mode when you do not need parsing&lt;/li&gt;
&lt;li&gt;Route cheap tasks to cheap models&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do this before you optimize your prompts. The infrastructure savings are 10x bigger than prompt engineering gains.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Building with LLM APIs? What surprised you about the costs?&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>5 Shell One-Liners That Replaced My Python Scripts</title>
      <dc:creator>Kai Norden</dc:creator>
      <pubDate>Sun, 01 Mar 2026 09:20:44 +0000</pubDate>
      <link>https://dev.to/kainorden/5-shell-one-liners-that-replaced-my-python-scripts-3ik5</link>
      <guid>https://dev.to/kainorden/5-shell-one-liners-that-replaced-my-python-scripts-3ik5</guid>
      <description>&lt;p&gt;I used to write Python scripts for everything. Then I discovered these shell one-liners that do the same job in seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Find and kill zombie processes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps aux | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'$8 ~ /Z/ {print $2}'&lt;/span&gt; | xargs &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="nt"&gt;-9&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No more writing process managers. This finds all zombie processes and kills them.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Watch a log file with color highlighting
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/app.log | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/ERROR/\x1b[31m&amp;amp;\x1b[0m/g; s/WARN/\x1b[33m&amp;amp;\x1b[0m/g'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Errors in red, warnings in yellow. No need for lnav or custom log viewers.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Quick HTTP server with directory listing
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; http.server 8080 &lt;span class="nt"&gt;--bind&lt;/span&gt; 127.0.0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Okay, this one uses Python but it is a one-liner. Perfect for sharing files on your local network.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Find large files eating your disk
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find / &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-size&lt;/span&gt; +100M &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lh&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-k5&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instantly see the 20 largest files on your system. Saved me from buying more storage twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Monitor any website for changes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;watch &lt;span class="nt"&gt;-n&lt;/span&gt; 60 &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"curl -s https://example.com | md5sum"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Refreshes every 60 seconds, highlights when the hash changes. Poor mans uptime monitor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: JSON pretty-print from clipboard
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pbpaste | python3 &lt;span class="nt"&gt;-m&lt;/span&gt; json.tool | pbcopy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;macOS only. Paste ugly JSON, get pretty JSON back in your clipboard.&lt;/p&gt;




&lt;p&gt;These replaced about 500 lines of Python across various utility scripts. The shell is underrated.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What are your favorite one-liners? I am always collecting new ones.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I Built an AI Agent That Runs My Infrastructure</title>
      <dc:creator>Kai Norden</dc:creator>
      <pubDate>Sun, 01 Mar 2026 08:13:38 +0000</pubDate>
      <link>https://dev.to/kainorden/i-built-an-ai-agent-that-runs-my-infrastructure-4e93</link>
      <guid>https://dev.to/kainorden/i-built-an-ai-agent-that-runs-my-infrastructure-4e93</guid>
      <description>&lt;p&gt;I spent the last week building an AI agent that monitors my infrastructure, manages accounts, updates dashboards, and posts content — all autonomously.&lt;/p&gt;

&lt;p&gt;Not a toy demo. A real system running 24/7 on my MacBook.&lt;/p&gt;

&lt;p&gt;Here is what actually works, what does not, and what surprised me.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenClaw&lt;/strong&gt; — open-source AI agent framework (browser, terminal, files, messaging)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude&lt;/strong&gt; — the brain (Opus for complex tasks, Sonnet for routine)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FastAPI + Python&lt;/strong&gt; — proxy layer for LLM API with failover&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js&lt;/strong&gt; — dashboard with Kanban board and live activity feed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;launchd&lt;/strong&gt; — macOS cron for scheduled checks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What the Agent Actually Does
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Infrastructure Monitoring
&lt;/h3&gt;

&lt;p&gt;Every 30 minutes, the agent checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API proxy health and account rotation&lt;/li&gt;
&lt;li&gt;Credit balance across multiple accounts&lt;/li&gt;
&lt;li&gt;Service uptime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If something is wrong, it fixes it or alerts me via Telegram.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Dashboard Management
&lt;/h3&gt;

&lt;p&gt;A Kanban board with real-time SSE updates. The agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates tasks from our conversations&lt;/li&gt;
&lt;li&gt;Moves them through columns as work progresses&lt;/li&gt;
&lt;li&gt;Logs every action to an activity feed&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Content Creation
&lt;/h3&gt;

&lt;p&gt;The agent can research topics, draft posts, and publish to multiple platforms. This post? Written by the agent, reviewed by me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Memory files&lt;/strong&gt; — the agent reads/writes markdown files to persist context across sessions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heartbeat polling&lt;/strong&gt; — periodic checks catch issues before they become problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failover proxy&lt;/strong&gt; — rotating between API accounts keeps costs manageable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LaunchAgents&lt;/strong&gt; — macOS launchd is perfect for scheduled tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What Does Not Work
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Browser automation is fragile&lt;/strong&gt; — React SPAs, dynamic forms, CAPTCHAs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too many tabs = death&lt;/strong&gt; — the browser gets slow with 10+ tabs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mental notes do not survive restarts&lt;/strong&gt; — if it is not in a file, it is gone&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Surprises
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The agent is better at routine tasks than creative ones&lt;/li&gt;
&lt;li&gt;Writing good prompts for sub-agents is harder than writing the code yourself&lt;/li&gt;
&lt;li&gt;The agent catches things I miss (like checking spam folders)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cost
&lt;/h2&gt;

&lt;p&gt;Running this 24/7 costs roughly $0 in API fees. The real cost is the MacBook running as a server.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub Issues as a task queue&lt;/li&gt;
&lt;li&gt;Voice morning digest via TTS&lt;/li&gt;
&lt;li&gt;Auto-publishing pipeline&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;OpenClaw is open source: &lt;a href="https://github.com/openclaw/openclaw" rel="noopener noreferrer"&gt;github.com/openclaw/openclaw&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The learning curve is real, but once it clicks, you will wonder how you worked without it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What automation have you built with AI agents? Drop a comment.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why I'm Building in Public: My Journey into AI Automation</title>
      <dc:creator>Kai Norden</dc:creator>
      <pubDate>Sat, 28 Feb 2026 08:33:40 +0000</pubDate>
      <link>https://dev.to/kainorden/why-im-building-in-public-my-journey-into-ai-automation-6li</link>
      <guid>https://dev.to/kainorden/why-im-building-in-public-my-journey-into-ai-automation-6li</guid>
      <description>&lt;p&gt;Hey DEV community! 👋&lt;/p&gt;

&lt;p&gt;I'm Kai, and I'm starting a build-in-public journey focused on &lt;strong&gt;AI automation&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm Building
&lt;/h2&gt;

&lt;p&gt;I'm experimenting with AI agents that automate repetitive tasks — from data pipelines to content workflows. Think of it as giving yourself a team of tireless digital assistants.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Build in Public?
&lt;/h2&gt;

&lt;p&gt;Because the best way to learn is to share:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accountability&lt;/strong&gt; — when you commit publicly, you ship&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback&lt;/strong&gt; — the community catches what you miss&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt; — future-you will thank present-you&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to Expect
&lt;/h2&gt;

&lt;p&gt;I'll be sharing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔧 &lt;strong&gt;Tools &amp;amp; scripts&lt;/strong&gt; I build along the way&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Experiments&lt;/strong&gt; with different AI models and approaches&lt;/li&gt;
&lt;li&gt;💡 &lt;strong&gt;Lessons learned&lt;/strong&gt; — including the failures&lt;/li&gt;
&lt;li&gt;🐍 &lt;strong&gt;Python code&lt;/strong&gt; — because life's too short for boilerplate&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Python for automation scripts&lt;/li&gt;
&lt;li&gt;Various LLM APIs for AI agents&lt;/li&gt;
&lt;li&gt;GitHub for everything open source&lt;/li&gt;
&lt;li&gt;A healthy dose of curiosity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're into AI, automation, or just enjoy watching someone build things from scratch — follow along. I promise to keep it real: no hype, just code and results.&lt;/p&gt;

&lt;p&gt;Let's connect! What are YOU automating right now? Drop a comment 👇&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>python</category>
      <category>buildinpublic</category>
    </item>
  </channel>
</rss>
