<?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: Spicy</title>
    <description>The latest articles on DEV Community by Spicy (@spicykim).</description>
    <link>https://dev.to/spicykim</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3930300%2Ff80e2e97-ebe7-4ee3-b2cb-d70ff6eac7bc.png</url>
      <title>DEV Community: Spicy</title>
      <link>https://dev.to/spicykim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/spicykim"/>
    <language>en</language>
    <item>
      <title>Post-quantum TLS is basically one config line now</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Tue, 10 Nov 2026 12:24:25 +0000</pubDate>
      <link>https://dev.to/spicykim/post-quantum-tls-is-basically-one-config-line-now-5f5a</link>
      <guid>https://dev.to/spicykim/post-quantum-tls-is-basically-one-config-line-now-5f5a</guid>
      <description>&lt;p&gt;"Post-quantum migration" sounds like a multi-year project, and at the org level it is. But the part most backend devs actually touch, post-quantum key exchange on your TLS, is now almost anticlimactically simple. OpenSSL 3.5 ships the hybrid groups natively. It's closer to one config line than a migration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why bother now (the one honest reason)
&lt;/h2&gt;

&lt;p&gt;"Harvest now, decrypt later." An attacker can record your encrypted traffic today and decrypt it years from now once quantum hardware catches up. So anything with a long secrecy lifetime, health data, credentials, anything regulated, is effectively exposed in transit if you're on classic X25519/RSA alone. PQC key exchange closes that one specific hole.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check what you've got
&lt;/h2&gt;

&lt;p&gt;The post-quantum groups landed in OpenSSL 3.5:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl version
&lt;span class="c"&gt;# you want 3.5.0 or newer&lt;/span&gt;

openssl list -kem-algorithms &lt;span class="o"&gt;|&lt;/span&gt; grep -i mlkem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Test any server for PQC support
&lt;/h2&gt;

&lt;p&gt;You can probe a server right now. Cloudflare's edge has done hybrid PQC for a while:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl s_client -groups X25519MLKEM768 -connect cloudflare.com:443 &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;/dev/null 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -i &lt;span class="s2"&gt;"Negotiated TLS1.3 group"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it prints &lt;code&gt;X25519MLKEM768&lt;/code&gt;, that handshake used post-quantum key exchange. Point it at your own host to see where you stand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn it on (nginx example)
&lt;/h2&gt;

&lt;p&gt;With an OpenSSL 3.5+ build, you just tell it which groups to offer, hybrid first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;ssl_protocols&lt;/span&gt; &lt;span class="nc"&gt;TLSv1&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="n"&gt;ssl_ecdh_curve&lt;/span&gt; &lt;span class="no"&gt;X25519MLKEM768&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;X25519&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;X25519MLKEM768&lt;/code&gt; is the hybrid: it runs classic X25519 and ML-KEM-768 together. If a client doesn't support the PQC half, it falls back to plain X25519. So turning it on costs you nothing in compatibility, modern clients get PQC, older ones get exactly what they got before.&lt;/p&gt;

&lt;p&gt;Reload, then re-run the &lt;code&gt;s_client&lt;/code&gt; test against your own server to confirm.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one real gotcha: signatures are the hard part
&lt;/h2&gt;

&lt;p&gt;Key exchange (ML-KEM) is the cheap, high-value win, and it's what stops harvest-now-decrypt-later. Post-quantum &lt;em&gt;signatures&lt;/em&gt; (ML-DSA) are the heavy lift: the keys and signatures are much larger, which bloats handshakes and certificates, and the CA/cert ecosystem is still catching up. So the pragmatic 2026 move is to enable hybrid PQC key exchange now (cheap, safe) and watch the signature side rather than forcing it early.&lt;/p&gt;

&lt;p&gt;I wrote up the full server-migration picture, the FIPS 203/204 standards, the performance tradeoffs, and a staged rollout plan, here: &lt;a href="https://lucas8.com/pqc-server-migration-guide-2026-ml-kem/" rel="noopener noreferrer"&gt;Beyond RSA: The 2026 Server Migration Guide to Post-Quantum Cryptography&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyone flipped on hybrid PQC in prod yet? Curious whether you've seen any real handshake-size or latency impact.&lt;/p&gt;

</description>
      <category>security</category>
      <category>cryptography</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Copilot vs Cursor isn't really a pricing question</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Sat, 07 Nov 2026 04:18:41 +0000</pubDate>
      <link>https://dev.to/spicykim/copilot-vs-cursor-isnt-really-a-pricing-question-3b90</link>
      <guid>https://dev.to/spicykim/copilot-vs-cursor-isnt-really-a-pricing-question-3b90</guid>
      <description>&lt;p&gt;Everyone frames it as "$10 Copilot vs $20 Cursor," like it's a budgeting call. It isn't. You're choosing between two different ideas about where the AI should live, and that matters far more than the ten bucks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual choice
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Copilot is a plugin.&lt;/strong&gt; It drops into the editor you already use, VS Code, JetBrains, Neovim, Xcode, and makes it smarter. Nothing about your setup changes. Your keybinds, extensions, and muscle memory all stay intact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cursor is a whole editor.&lt;/strong&gt; It's a VS Code fork rebuilt around the AI. The assistant isn't bolted on; the editor is designed around it, which is why its multi-file and agent features feel a step ahead.&lt;/p&gt;

&lt;p&gt;So the real question is simple: do you want AI &lt;em&gt;inside your current editor&lt;/em&gt;, or are you willing to &lt;em&gt;switch editors&lt;/em&gt; to get a more aggressive AI?&lt;/p&gt;

&lt;h2&gt;
  
  
  When Copilot is the right call
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You live in JetBrains, Neovim, or Xcode. Cursor can't follow you there, Copilot can.&lt;/li&gt;
&lt;li&gt;You want help without changing your workflow at all.&lt;/li&gt;
&lt;li&gt;You mainly want strong autocomplete and inline chat, not an agent rewriting ten files.&lt;/li&gt;
&lt;li&gt;You're deep in the GitHub ecosystem (PRs, Actions, the CLI). That's Copilot's home turf.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When Cursor earns the extra $10
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You want the agent to actually do multi-file work: refactors, "change this across the whole codebase," not just the next line.&lt;/li&gt;
&lt;li&gt;You're fine adopting a new editor, which, being a VS Code fork, is a soft landing rather than a real migration.&lt;/li&gt;
&lt;li&gt;You use it daily, so the time saved on big edits pays back $20 almost immediately.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The honest tie-breaker
&lt;/h2&gt;

&lt;p&gt;If picking Cursor means leaving an editor you love (JetBrains especially), stay on Copilot. The switching cost isn't worth it. If you're already in VS Code and you want the most capable agent experience available, Cursor is the upgrade, and the price gap is noise next to what an hour of your time costs.&lt;/p&gt;

&lt;p&gt;Don't overthink the $10. Both are cheap compared to the time they save. Choose on "plugin vs new editor," not the sticker price.&lt;/p&gt;

&lt;p&gt;I did the full feature-by-feature breakdown, pricing tiers, privacy and enterprise notes, and where each one falls short, here: &lt;a href="https://lucas8.com/copilot-vs-cursor-ai-2026-pricing/" rel="noopener noreferrer"&gt;GitHub Copilot vs Cursor AI: Worth the Price?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which camp are you in, and did you switch editors for the AI or refuse to?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What a 32GB GPU actually lets you run locally</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Mon, 02 Nov 2026 16:34:58 +0000</pubDate>
      <link>https://dev.to/spicykim/what-a-32gb-gpu-actually-lets-you-run-locally-4bgc</link>
      <guid>https://dev.to/spicykim/what-a-32gb-gpu-actually-lets-you-run-locally-4bgc</guid>
      <description>&lt;p&gt;The jump to 32GB of VRAM on consumer cards (hello, 5090) is a bigger deal for local AI than the gaming benchmarks suggest. The 24GB ceiling on the 3090/4090 was the thing quietly capping what you could run without brutal quantization. So the real question isn't "is it fast," it's "what can I actually load now, and how do I do it." Here's the practical version.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fastest path: Ollama
&lt;/h2&gt;

&lt;p&gt;If you just want models running in five minutes, Ollama is the easiest on-ramp.&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="c"&gt;# Linux / macOS&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://ollama.com/install.sh | sh

&lt;span class="c"&gt;# then pull and run (these are 4-bit quantized by default)&lt;/span&gt;
ollama run llama3.1:8b      &lt;span class="c"&gt;# ~5 GB, runs on almost anything&lt;/span&gt;
ollama run qwen2.5:32b      &lt;span class="c"&gt;# ~20 GB, comfortable on a 32 GB card&lt;/span&gt;
ollama run llama3.3:70b     &lt;span class="c"&gt;# ~40 GB, tight; will spill to system RAM&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's genuinely it for a working local chat model. The interesting part is knowing &lt;em&gt;which&lt;/em&gt; line your card can actually handle.&lt;/p&gt;

&lt;h2&gt;
  
  
  The VRAM math (so you stop guessing)
&lt;/h2&gt;

&lt;p&gt;The rough rule for how much memory a model needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VRAM ≈ (parameters in billions) × (bytes per parameter) + KV cache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bytes per parameter depends on quantization:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FP16&lt;/strong&gt; = 2 bytes → an 8B model ≈ 16 GB&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Q8&lt;/strong&gt; (8-bit) ≈ 1 byte → 8B ≈ 8 GB&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Q4&lt;/strong&gt; (4-bit) ≈ 0.5 byte → 70B ≈ ~35 GB, 32B ≈ ~16 GB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So on a 32 GB card, the sweet spot is a &lt;strong&gt;32B model at 4-bit&lt;/strong&gt; with plenty of headroom, or a &lt;strong&gt;70B at 4-bit&lt;/strong&gt; if you keep the context modest. That 70B-at-home case is exactly what 24 GB couldn't do cleanly.&lt;/p&gt;

&lt;p&gt;Two things people forget:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context eats VRAM too.&lt;/strong&gt; The KV cache grows with your context length. A big context window on a big model can add several GB on top of the weights, which is what pushes a "should fit" model into offloading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offloading isn't failure, it's just slower.&lt;/strong&gt; Tools will put the overflow layers in system RAM. It runs, it's just not full-speed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When you want more control: llama.cpp
&lt;/h2&gt;

&lt;p&gt;Ollama is great until you want to tune quantization, context, or GPU layer offload by hand. Then go to llama.cpp with a GGUF model:&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="c"&gt;# build with CUDA, then:&lt;/span&gt;
./llama-cli &lt;span class="nt"&gt;-m&lt;/span&gt; model-Q4_K_M.gguf &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-ngl&lt;/span&gt; 99 &lt;span class="se"&gt;\ &lt;/span&gt;       &lt;span class="c"&gt;# offload all layers to GPU&lt;/span&gt;
  &lt;span class="nt"&gt;-c&lt;/span&gt; 8192 &lt;span class="se"&gt;\ &lt;/span&gt;       &lt;span class="c"&gt;# context length&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Explain KV cache like I'm five"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;-ngl&lt;/code&gt; (number of GPU layers) is the dial that matters: push it as high as your VRAM allows, drop it if you run out. The &lt;code&gt;Q4_K_M&lt;/code&gt; quant is usually the best quality-to-size tradeoff for local use; go smaller (Q3) only if you're desperate for space, since logic degrades fast below 4-bit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest takeaway
&lt;/h2&gt;

&lt;p&gt;32 GB doesn't make you a data center, but it moves the line from "8B toys and heavily-crippled 70Bs" to "comfortable 32B models and usable 70Bs." For building agents or fine-tuning locally, that's the difference between prototyping on your own machine and renting cloud GPUs by the hour.&lt;/p&gt;

&lt;p&gt;I wrote up why the architecture (not just the VRAM) makes this shift real, including Blackwell's FP4 support, here: &lt;a href="https://lucas8.com/rtx-5090-blackwell-local-llm-performance/" rel="noopener noreferrer"&gt;RTX 5090 Blackwell: Why Local AI Developers Can't Ignore It&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What's the biggest model you're running locally, and on what card? Curious where people are drawing the cloud-vs-local line now.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>llm</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Federated learning in 40 lines: training a model without ever moving the data</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Thu, 29 Oct 2026 10:55:22 +0000</pubDate>
      <link>https://dev.to/spicykim/federated-learning-in-40-lines-training-a-model-without-ever-moving-the-data-47bc</link>
      <guid>https://dev.to/spicykim/federated-learning-in-40-lines-training-a-model-without-ever-moving-the-data-47bc</guid>
      <description>&lt;p&gt;The usual way to train a model on sensitive data is to pile it all into one place first. Dump every user's records into a central store, train, done. That central pile is also a single, searchable honeypot, which is exactly why security teams have started pushing back on it.&lt;/p&gt;

&lt;p&gt;Federated learning flips the idea: instead of bringing the data to the model, you send the model to the data. Each device or site trains on its own local data and sends back only the resulting weights. The raw data never moves.&lt;/p&gt;

&lt;p&gt;That sounds abstract until you see it in code. Here's a complete, runnable example of the core algorithm (FedAvg) in plain NumPy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The whole thing
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="c1"&gt;# Each client has its OWN data. This never leaves the client.
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;make_client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;true_w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;noise&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;X&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&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;true_w&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt; &lt;span class="o"&gt;@&lt;/span&gt; &lt;span class="n"&gt;true_w&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;noise&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&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;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;

&lt;span class="n"&gt;true_w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mf"&gt;2.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;3.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;make_client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;true_w&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;_&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;5&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;local_train&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;steps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# One client runs gradient descent on ITS data only.
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&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="n"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;grad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="o"&gt;@&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt; &lt;span class="o"&gt;@&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&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;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;lr&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;grad&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;

&lt;span class="c1"&gt;# Federated averaging
&lt;/span&gt;&lt;span class="n"&gt;global_w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;zeros&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;for&lt;/span&gt; &lt;span class="n"&gt;rnd&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;10&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;local_weights&lt;/span&gt; &lt;span class="o"&gt;=&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;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Server sends global_w out; client trains locally;
&lt;/span&gt;        &lt;span class="c1"&gt;# only the trained weights come back.
&lt;/span&gt;        &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;local_train&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;global_w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="n"&gt;local_weights&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Server averages the weights. It never touched any client's X or y.
&lt;/span&gt;    &lt;span class="n"&gt;global_w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;local_weights&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;round &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;rnd&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: w = &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;global_w&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="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;true w:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;true_w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it and you'll watch &lt;code&gt;global_w&lt;/code&gt; converge toward &lt;code&gt;[2, -3, 0.5]&lt;/code&gt; without the server ever seeing a single row of &lt;code&gt;X&lt;/code&gt; or &lt;code&gt;y&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one line that is the whole point
&lt;/h2&gt;

&lt;p&gt;This one:&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;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;local_train&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;global_w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="n"&gt;local_weights&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The client gets the current global model, trains it on data that stays on the client, and returns &lt;strong&gt;only the weights&lt;/strong&gt;. The server averages those weights into a new global model and sends it back out. Repeat. At no point does raw data cross the network. That's the entire privacy pitch in two lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the real world gets harder
&lt;/h2&gt;

&lt;p&gt;This toy version hides three things you'd deal with in production:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Weights can leak too.&lt;/strong&gt; Gradients and weight updates can be reverse-engineered to reveal training data. The fix is &lt;strong&gt;differential privacy&lt;/strong&gt;: add calibrated noise to the updates so no single record can be recovered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clients disagree.&lt;/strong&gt; Real clients have different data distributions (non-IID), so naive averaging can stall or wobble. Weighting by dataset size and smarter aggregation help.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stragglers and scale.&lt;/strong&gt; Thousands of phones that drop mid-round need handling. That's what frameworks like Flower, TensorFlow Federated, and NVIDIA FLARE exist for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the mental model is exactly the 40 lines above: move the model, not the data, and only ever share what you learned, never what you saw.&lt;/p&gt;

&lt;p&gt;I wrote up why this is quietly replacing "shove everything into a vector DB" for sensitive enterprise data, and what that means for data sovereignty, here: &lt;a href="https://lucas8.com/federated-learning-vs-vector-db-privacy-2026/" rel="noopener noreferrer"&gt;The Great Data Recall: Why Federated Learning Beats Vector DB Leakage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyone running FL in production yet? Curious what you're using for the differential-privacy layer.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>privacy</category>
      <category>ai</category>
    </item>
    <item>
      <title>4 small code changes that cut our LLM bill</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Tue, 27 Oct 2026 10:53:00 +0000</pubDate>
      <link>https://dev.to/spicykim/4-small-code-changes-that-cut-our-llm-bill-3ci1</link>
      <guid>https://dev.to/spicykim/4-small-code-changes-that-cut-our-llm-bill-3ci1</guid>
      <description>&lt;p&gt;Short answer: no, not really, and constantly swiping them away can actually make things slightly worse.&lt;/p&gt;

&lt;p&gt;This is one of the most stubborn phone myths out there. Here's what's actually going on.&lt;/p&gt;

&lt;p&gt;Modern iPhones and Androids don't leave closed apps "running" in the background the way a PC does. When you switch away, the app gets mostly frozen. It sits in memory doing almost nothing and using almost no battery. Leaving it there is basically free.&lt;/p&gt;

&lt;p&gt;Now when you force-close it and open it again later, the phone has to reload the whole thing from storage. That cold start uses more CPU and more battery than if you'd just left it frozen. So the habit of clearing all your apps every hour is quietly costing you a little, not saving you anything.&lt;/p&gt;

&lt;p&gt;So what actually drains battery in the background? Not the frozen apps. It's specific behaviors: location tracking, constant syncing, push-heavy apps, and the occasional buggy app misbehaving.&lt;/p&gt;

&lt;p&gt;What I'd do instead of mass-swiping:&lt;/p&gt;

&lt;p&gt;• Go to Settings &amp;gt; Battery and look at what's actually using power. Your phone spells it out.&lt;br&gt;
• For any app near the top that doesn't need to run constantly, turn off its Background App Refresh or location access.&lt;br&gt;
• Only force-close an app when it's genuinely acting up (frozen, overheating the phone, draining fast). That's the one time closing actually helps.&lt;/p&gt;

&lt;p&gt;Short version: stop clearing your apps out of habit. It doesn't help and slightly hurts. Just fix the one or two real culprits in your battery settings instead.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>llm</category>
      <category>performance</category>
    </item>
    <item>
      <title>Adding passkeys to your app is way less code than you think</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Mon, 26 Oct 2026 10:11:26 +0000</pubDate>
      <link>https://dev.to/spicykim/adding-passkeys-to-your-app-is-way-less-code-than-you-think-3f2k</link>
      <guid>https://dev.to/spicykim/adding-passkeys-to-your-app-is-way-less-code-than-you-think-3f2k</guid>
      <description>&lt;p&gt;Passwords are the problem, not the user. Over 80% of hacking-related breaches still involve stolen or weak credentials, and that number refuses to go down because the whole model is broken: breaches leak them, phishing steals them, people reuse them. (I wrote up the why, for non-developers, separately. Linked at the bottom.)&lt;/p&gt;

&lt;p&gt;Passkeys fix this at the root. There's no shared secret to steal, and they literally can't be phished because the credential is bound to your domain. The part most devs don't realize: adding them is surprisingly little code, especially if you lean on a library instead of wrestling raw WebAuthn ArrayBuffers.&lt;/p&gt;

&lt;p&gt;Here's a minimal flow using &lt;a href="https://simplewebauthn.dev/" rel="noopener noreferrer"&gt;SimpleWebAuthn&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Registration (creating a passkey)
&lt;/h2&gt;

&lt;p&gt;Server side, you hand the browser a challenge:&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;generateRegistrationOptions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;verifyRegistrationResponse&lt;/span&gt;&lt;span class="p"&gt;,&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;@simplewebauthn/server&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;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/register/options&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;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&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;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateRegistrationOptions&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;rpName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My App&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;rpID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;example.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;userName&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;email&lt;/span&gt;&lt;span class="p"&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;saveChallenge&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;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;challenge&lt;/span&gt;&lt;span class="p"&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="nx"&gt;options&lt;/span&gt;&lt;span class="p"&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;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/register/verify&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;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&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;verification&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verifyRegistrationResponse&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&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="na"&gt;expectedChallenge&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;getChallenge&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;id&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;expectedOrigin&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://example.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;expectedRPID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;example.com&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;verified&lt;/span&gt;&lt;span class="p"&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;savePasskey&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;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;verification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;registrationInfo&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&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="na"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;verification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;verified&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;Browser side is almost nothing:&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;startRegistration&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;@simplewebauthn/browser&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;registerPasskey&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;options&lt;/span&gt; &lt;span class="o"&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="s1"&gt;/register/options&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;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&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;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;r&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;attResp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;startRegistration&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;optionsJSON&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;options&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;verified&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="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="s1"&gt;/register/verify&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;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;headers&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="s1"&gt;Content-Type&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;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&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;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;attResp&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;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;r&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verified&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;Passkey registered&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;startRegistration&lt;/code&gt; call is what pops the Face ID / fingerprint / PIN prompt. The browser and OS handle the scary crypto. You never touch a private key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Login (using the passkey)
&lt;/h2&gt;

&lt;p&gt;Same shape, mirror image:&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;startAuthentication&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;@simplewebauthn/browser&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loginWithPasskey&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;options&lt;/span&gt; &lt;span class="o"&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="s1"&gt;/login/options&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;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&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;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;r&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;asseResp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;startAuthentication&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;optionsJSON&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;options&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;verified&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="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="s1"&gt;/login/verify&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;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;headers&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="s1"&gt;Content-Type&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;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&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;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;asseResp&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;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;r&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/dashboard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the server, &lt;code&gt;generateAuthenticationOptions&lt;/code&gt; and &lt;code&gt;verifyAuthenticationResponse&lt;/code&gt; do the matching counterparts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three things that trip people up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;rpID must match your domain.&lt;/strong&gt; It's the registrable domain (&lt;code&gt;example.com&lt;/code&gt;), not a URL, no &lt;code&gt;https://&lt;/code&gt;, no path. On localhost, use &lt;code&gt;localhost&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;expectedOrigin must be exact,&lt;/strong&gt; including the scheme and port. A mismatch here is the number one "it works locally but not in prod" bug.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The challenge is single-use.&lt;/strong&gt; Generate it server-side, store it, verify against it once, throw it away. Don't let the client send its own.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's genuinely most of it. You can ship passkeys as an &lt;em&gt;option&lt;/em&gt; alongside passwords first, let users opt in, and watch your account-takeover numbers drop. No rip-and-replace required.&lt;/p&gt;

&lt;p&gt;If you want the non-technical version to send to your less-nerdy coworkers (or your boss who keeps asking "are passwords really that bad"), I wrote that up here: &lt;a href="https://lucas8.com/passkeys-vs-passwords-security/" rel="noopener noreferrer"&gt;The Password You've Been Using Just Got You Hacked&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyone shipped passkeys to real users yet? Curious how the opt-in rates have looked.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Give Claude a read-only straw to your SQLite DB: a tiny MCP server in Python</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Sun, 25 Oct 2026 05:43:19 +0000</pubDate>
      <link>https://dev.to/spicykim/give-claude-a-read-only-straw-to-your-sqlite-db-a-tiny-mcp-server-in-python-42fg</link>
      <guid>https://dev.to/spicykim/give-claude-a-read-only-straw-to-your-sqlite-db-a-tiny-mcp-server-in-python-42fg</guid>
      <description>&lt;p&gt;RAG was always a bit of a hack. Chunk your files, embed them, cross your fingers the right snippet comes back. Fine for fuzzy "what did this doc say" questions. Terrible for structured data, where you don't want a summary, you want the exact number.&lt;/p&gt;

&lt;p&gt;If your data lives in a database, there's a cleaner move in 2026: skip the vectors and let the model query the database directly through MCP (Model Context Protocol). The model writes SQL, your local server runs it, you get the real answer back. Nothing gets uploaded to anyone's cloud.&lt;/p&gt;

&lt;p&gt;Here's a minimal, working MCP server that does exactly that for SQLite. About 30 lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  The server
&lt;/h2&gt;

&lt;p&gt;​&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="c1"&gt;# server.py
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sqlite3&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;mcp.server.fastmcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastMCP&lt;/span&gt;

&lt;span class="n"&gt;mcp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastMCP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local-sqlite&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;DB_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;app.db&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="nd"&gt;@mcp.tool&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;list_tables&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;List the tables in the database.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;con&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sqlite3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DB_PATH&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="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;con&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT name FROM sqlite_master WHERE type=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;table&lt;/span&gt;&lt;span class="sh"&gt;'"&lt;/span&gt;
        &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fetchall&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="n"&gt;r&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="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;con&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nd"&gt;@mcp.tool&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run_query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Run a read-only SQL query and return the rows.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lstrip&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;lower&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;select&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Only SELECT queries are allowed.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;con&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sqlite3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DB_PATH&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;con&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;row_factory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sqlite3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Row&lt;/span&gt;
    &lt;span class="k"&gt;try&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="nf"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&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;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;con&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fetchall&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt;
    &lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;con&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&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;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;mcp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="sb"&gt;``&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endraw&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="n"&gt;Install&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;dependency&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;that&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s it:

​
{% raw %}
```bash
pip install &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mcp[cli]&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;
​```



## Wiring it into Claude Desktop

Drop this into your `claude_desktop_config.json`:

​

```json
{
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mcpServers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: {
    &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local-sqlite&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: {
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;command&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;python&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;args&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: [&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/absolute/path/to/server.py&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;]
    }
  }
}
​```



Restart Claude Desktop and you can now ask &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;which five customers spent the most last month?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; The model calls `list_tables`, works out the schema, writes the SQL, calls `run_query`, and answers with real rows. Not a guess pulled from an embedded chunk. The actual data.

## The one line that matters most

This one:

​

```python
if not sql.lstrip().lower().startswith(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;select&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;):
    raise ValueError(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Only SELECT queries are allowed.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;)
​```



You&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="n"&gt;re&lt;/span&gt; &lt;span class="n"&gt;handing&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;LLM&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;ability&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt; &lt;span class="n"&gt;SQL&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;Without&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;guard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;creative&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="n"&gt;injection&lt;/span&gt; &lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="n"&gt;inside&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;own&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;could&lt;/span&gt; &lt;span class="n"&gt;talk&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="n"&gt;into&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;`DROP TABLE`&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endraw&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}.&lt;/span&gt; &lt;span class="n"&gt;Keeping&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;cheapest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;most&lt;/span&gt; &lt;span class="n"&gt;important&lt;/span&gt; &lt;span class="n"&gt;rail&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;If&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;need&lt;/span&gt; &lt;span class="n"&gt;writes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt; &lt;span class="n"&gt;them&lt;/span&gt; &lt;span class="n"&gt;behind&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;separate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;explicit&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;its&lt;/span&gt; &lt;span class="n"&gt;own&lt;/span&gt; &lt;span class="n"&gt;checks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;Never&lt;/span&gt; &lt;span class="n"&gt;through&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="n"&gt;few&lt;/span&gt; &lt;span class="n"&gt;things&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;d add before trusting this with anything real:

- Open the connection read-only at the driver level too, not just by string-checking the query.
- Enforce a row limit so a `SELECT *` on a huge table doesn&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;flood&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;Log&lt;/span&gt; &lt;span class="n"&gt;every&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="n"&gt;runs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;so&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;see&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="n"&gt;actually&lt;/span&gt; &lt;span class="n"&gt;did&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="n"&gt;That&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s the whole idea. The model gets a straw to the data, not a copy of it, and your database never leaves the machine.

I wrote up the bigger picture, the zero-trust angle and why this beats RAG for structured data, here: [The Local Data Architect: Connecting Your Private Database to AI via MCP](https://lucas8.com/mcp-local-data-architect-guide-postgresql-sqlite/)

Anyone else ripping out a RAG pipeline for direct MCP access? Curious what guardrails you&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="n"&gt;re&lt;/span&gt; &lt;span class="n"&gt;putting&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>database</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Windsurf vs Cursor vs Cline: how I'd actually pick one in 2026</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Fri, 23 Oct 2026 13:51:19 +0000</pubDate>
      <link>https://dev.to/spicykim/windsurf-vs-cursor-vs-cline-how-id-actually-pick-one-in-2026-4ekg</link>
      <guid>https://dev.to/spicykim/windsurf-vs-cursor-vs-cline-how-id-actually-pick-one-in-2026-4ekg</guid>
      <description>&lt;p&gt;The autocomplete era is over. Nobody serious is still writing functions off ghost-text suggestions. The real question in 2026 isn't "should I use an AI coding tool," it's "which agent do I hand the keys to." And honestly, Windsurf, Cursor, and Cline are built for three genuinely different kinds of developer.&lt;/p&gt;

&lt;p&gt;Here's how I'd choose, minus the marketing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick Cursor if you want "it just works"
&lt;/h2&gt;

&lt;p&gt;Cursor is the safe default, and I mean that as a compliment. It's a VS Code fork, so there's no new environment to learn, your extensions and keybinds come along, and the whole thing is fast and polished.&lt;/p&gt;

&lt;p&gt;Its real strength is the multi-file refactor (Composer). Point it at a change that spans a dozen files and it handles the plumbing without going rogue. It's "half-agentic" on purpose: it does a lot, but still asks before it touches your terminal. For teams nervous about letting an AI run commands unsupervised, that restraint is the feature.&lt;/p&gt;

&lt;p&gt;Choose Cursor when you want capability without having to think about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick Windsurf if you want flow
&lt;/h2&gt;

&lt;p&gt;Windsurf feels different the moment you use it. Instead of a chat panel bolted onto an editor, the editor itself seems to understand your whole stack. You give it a goal and it chains the file edits and terminal steps together in a way that feels like delegation, not prompting.&lt;/p&gt;

&lt;p&gt;The tradeoff is trust. Windsurf wins when you're comfortable giving an agent more rope on multi-step tasks. If you like describing the outcome and letting the tool find the path, this is the one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick Cline if you want control and cheap tokens
&lt;/h2&gt;

&lt;p&gt;Cline is for people who don't want to be locked into a $20/month seat. It's an open-source extension with bring-your-own-key, so you plug in your own Claude (or whatever) API and pay for exactly what you use. Heavy users often come out cheaper, and you see every action it takes.&lt;/p&gt;

&lt;p&gt;The catch is it's more hands-on. You're trading polish for transparency and control. If that sounds like a feature instead of a chore, Cline is your tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual decision
&lt;/h2&gt;

&lt;p&gt;Strip the hype and it's almost this simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Want safe and familiar?&lt;/strong&gt; Cursor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want to delegate whole tasks?&lt;/strong&gt; Windsurf.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want control and your own API bill?&lt;/strong&gt; Cline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's no universal winner, which is the honest and slightly annoying truth. The best one is whichever matches how much autonomy you're actually comfortable handing over.&lt;/p&gt;

&lt;p&gt;I went deeper on each tool's context engine, pricing, and where they break down in the full comparison here: &lt;a href="https://lucas8.com/best-ai-coding-agents-windsurf-cursor-cline/" rel="noopener noreferrer"&gt;Best AI Coding Agents 2026: Windsurf vs Cursor vs Cline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What are you running day to day? Curious whether people are sticking with Cursor or jumping to the fully agentic tools.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why HIPAA Doesn't Cover the Health Data Your API Just Pulled</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Sat, 04 Jul 2026 12:10:45 +0000</pubDate>
      <link>https://dev.to/spicykim/why-hipaa-doesnt-cover-the-health-data-your-api-just-pulled-3bjk</link>
      <guid>https://dev.to/spicykim/why-hipaa-doesnt-cover-the-health-data-your-api-just-pulled-3bjk</guid>
      <description>&lt;p&gt;If you're building anything on top of HealthKit, Google Fit, or a direct wearable API integration, there's a compliance assumption worth checking before you ship: HIPAA almost certainly doesn't apply to the data you're pulling.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Covered Entity Problem
&lt;/h2&gt;

&lt;p&gt;HIPAA only regulates "covered entities" — hospitals, doctors, health insurers, and their direct business associates. A consumer wearable API (Apple HealthKit, Google Fit, Fitbit Web API, Oura API, Whoop API) doesn't make your app a covered entity just because it's handling heart rate or sleep data. Unless you're building specifically for a healthcare provider under a signed business associate agreement, you're outside HIPAA's scope entirely, according to a &lt;a href="https://www.halllawgroup.com/love-your-wearable-technology-know-what-youre-sharing/" rel="noopener noreferrer"&gt;legal breakdown from the Law Office of Jeffrey Hall&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That means the usual HIPAA checklist — encryption at rest, audit logs, minimum necessary access — is good practice, but it's not a legal requirement for most consumer-facing health apps. Nobody is going to fine you under HIPAA for over-collecting sleep data. That's the trap, not the reassurance.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Regulates This Data
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Regulation&lt;/th&gt;
&lt;th&gt;Applies to consumer wearable apps?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HIPAA&lt;/td&gt;
&lt;td&gt;No (unless working with a covered entity)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GDPR (EU users)&lt;/td&gt;
&lt;td&gt;Yes, as sensitive personal data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CCPA (California users)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Washington My Health My Data Act&lt;/td&gt;
&lt;td&gt;Yes, if any WA users&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;App store health data policies&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The most interesting one for engineers is Washington's My Health My Data Act (RCW 19.373), passed in 2023. It's the first US state law written specifically to close the HIPAA gap for consumer health data, and it applies to any business with Washington users, not just Washington-based companies. If your app has any US user base, you likely have Washington users. The Act requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A separate, prominently linked Consumer Health Data Privacy Policy (not folded into your general privacy policy)&lt;/li&gt;
&lt;li&gt;Explicit opt-in consent before collection or sharing, not just a terms-of-service checkbox&lt;/li&gt;
&lt;li&gt;A functioning deletion request path across all systems, including backups&lt;/li&gt;
&lt;li&gt;Written authorization retained for six years if you ever sell health data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full text is at &lt;a href="https://www.atg.wa.gov/protecting-washingtonians-personal-health-data-and-privacy" rel="noopener noreferrer"&gt;RCW 19.373&lt;/a&gt; if you're scoping compliance work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Implementation Notes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data retention.&lt;/strong&gt; If your backend keeps synced health metrics after a user deletes their account, you're not just accumulating liability, you're likely violating deletion-right requirements in at least one jurisdiction your users touch. Build a real deletion pipeline that hits backups, not just the primary table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third-party SDKs.&lt;/strong&gt; If you're piping HealthKit data into an analytics SDK, an ad network, or a crash reporter, check that SDK's data handling terms specifically. "Anonymized" health data has been shown to be re-identifiable at high accuracy when cross-referenced with other datasets, which is a real risk if you're forwarding granular biometric streams anywhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consent UX.&lt;/strong&gt; A single "Allow Health Access" iOS permission prompt is not equivalent to the affirmative, specific consent required under Washington's law or GDPR. If you're monetizing health data in any way (even aggregated), build a separate consent flow for that specific use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Employer/insurer integrations.&lt;/strong&gt; If you're building a wellness-program integration that feeds data to an employer or insurer, treat that data flow as high-risk by default. There's no HIPAA wall preventing that data from eventually informing risk decisions, and the legal exposure sits with whoever built the pipe.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Actually Found
&lt;/h2&gt;

&lt;p&gt;Most developer documentation for these APIs focuses entirely on the technical integration and barely mentions the regulatory landscape. Apple's HealthKit guidelines are the exception — they're genuinely strict about app review for health data access. Google Fit and most third-party wearable APIs leave compliance almost entirely up to you.&lt;/p&gt;

&lt;p&gt;If I were architecting a new wearable-data feature today, I'd default to treating every user as if they were covered by Washington's My Health My Data Act, since it's currently the strictest applicable standard and building to it covers most other jurisdictions by default.&lt;/p&gt;

&lt;p&gt;Full write-up with the consumer-facing angle and more on the legal background: &lt;a href="https://lucas8.com/wearable-health-data-hipaa-gap" rel="noopener noreferrer"&gt;https://lucas8.com/wearable-health-data-hipaa-gap&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>security</category>
    </item>
    <item>
      <title>The Solar Tax Credit Died in 2026. Here's the Decision Tree.</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Sat, 04 Jul 2026 12:09:41 +0000</pubDate>
      <link>https://dev.to/spicykim/the-solar-tax-credit-died-in-2026-heres-the-decision-tree-3pd9</link>
      <guid>https://dev.to/spicykim/the-solar-tax-credit-died-in-2026-heres-the-decision-tree-3pd9</guid>
      <description>&lt;p&gt;If you priced out solar before 2026 and priced it out again this year, the numbers probably look worse. That's not a sales tactic or a market shift. The 30% federal residential solar tax credit (Section 25D) ended on December 31, 2025, with zero phase-down period. No grandfathering, no partial credit for contracts signed in 2025 but installed in 2026.&lt;/p&gt;

&lt;p&gt;That said, the credit's disappearance created a fork in the decision tree rather than a dead end. Here's the breakdown, without the sales pitch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Ended
&lt;/h2&gt;

&lt;p&gt;Section 25D let homeowners deduct 30% of system cost directly from federal taxes, with no cap and no income limit. It was legislated to run through 2034. The One Big Beautiful Bill Act, signed July 2025, moved the termination date to the end of 2025 instead — a nearly decade-early sunset. If your system was placed in service on or before December 31, 2025, you still claim the credit on that year's return. If it goes live in 2026 or later, the credit doesn't apply, full stop.&lt;/p&gt;

&lt;p&gt;The mechanism that survived is ownership structure. Section 25D covered direct ownership only. Section 48E, the commercial/business investment credit, is still active for entities that own solar equipment and lease or sell power from it. That single distinction is why "no tax credit" isn't accurate for every path to solar in 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Remaining Paths
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Third-party ownership (lease/PPA).&lt;/strong&gt; A company owns the panels on your roof; you buy the electricity. That company can still claim the Section 48E credit and typically passes savings through as a lower monthly rate instead of a lump-sum deduction on your return. You lose equity-building and any ownership-dependent state incentives, but if your tax liability was too small to use 30% anyway, this closes most of the gap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. State-level programs, independent of federal policy.&lt;/strong&gt; These never depended on 25D and mostly survived untouched:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;State income tax credits (a minority of states)&lt;/li&gt;
&lt;li&gt;Sales tax exemptions on solar equipment (CA, FL, AZ, CO, NY, and others)&lt;/li&gt;
&lt;li&gt;Property tax exemptions so added home value doesn't raise your tax bill (30+ states)&lt;/li&gt;
&lt;li&gt;Production-based payments like New Jersey's SuSI program, which pays per kWh for 15 years&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check your specific state through the &lt;a href="https://dsireusa.org/" rel="noopener noreferrer"&gt;Database of State Incentives for Renewables &amp;amp; Efficiency&lt;/a&gt;, the DOE-funded clearinghouse — coverage is wildly inconsistent state to state, so a generic "solar incentives still exist" claim is close to useless without checking your own address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Net metering and community solar.&lt;/strong&gt; Net metering — getting credited for excess power sent back to the grid — is a utility mechanism, not a tax credit, so it wasn't touched by the OBBBA at all. Community solar (buying a share of an off-site array instead of installing your own panels) extends this to renters and shaded-roof homes with zero upfront installation cost.&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;Path&lt;/th&gt;
&lt;th&gt;Who claims the credit&lt;/th&gt;
&lt;th&gt;You own the system&lt;/th&gt;
&lt;th&gt;Works if you have low tax liability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cash/loan purchase&lt;/td&gt;
&lt;td&gt;No one (credit gone)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No benefit either way&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lease / PPA&lt;/td&gt;
&lt;td&gt;Third-party owner&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes — savings via lower rate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State credit + exemptions&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Depends on state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Net metering / community solar&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;td&gt;Optional&lt;/td&gt;
&lt;td&gt;Yes — utility-side, not tax-side&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What I Actually Found
&lt;/h2&gt;

&lt;p&gt;Most coverage treats this as one national story: "credit's gone, solar's still worth it long-term." That framing skips the part that actually matters — the size of the gap left behind depends entirely on your state's net metering rules and exemption stack, not on a national average payback period.&lt;/p&gt;

&lt;p&gt;If I were running these numbers for myself, I'd ask an installer for two quotes side by side: total cost with zero incentives applied, and total cost after every program that applies specifically to my address. If an installer can't produce both numbers without a follow-up call, they're probably still quoting off a pre-2026 script.&lt;/p&gt;

&lt;p&gt;The federal credit for direct ownership isn't coming back this cycle. But state programs, net metering, and lease structures are still on the table for most of the country, and stacking even two of them gets you closer to 2025's numbers than most headlines suggest.&lt;/p&gt;

&lt;p&gt;Full breakdown with a state-by-state incentive walkthrough: &lt;a href="https://lucas8.com/solar-tax-credit-alternatives-2026" rel="noopener noreferrer"&gt;https://lucas8.com/solar-tax-credit-alternatives-2026&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Nutrition Label That Software Always Lacked</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Fri, 03 Jul 2026 16:45:31 +0000</pubDate>
      <link>https://dev.to/spicykim/the-nutrition-label-that-software-always-lacked-213</link>
      <guid>https://dev.to/spicykim/the-nutrition-label-that-software-always-lacked-213</guid>
      <description>&lt;p&gt;On December 9, 2021, a security researcher posted a proof-of-concept exploit for a vulnerability in a Java library called Log4j. Within 72 hours, hundreds of millions of systems were at risk. The chaos that followed wasn't primarily about the vulnerability's severity. It was about something more fundamental: most organizations had no way to quickly search their own software to find out whether Log4j was buried somewhere inside it.&lt;/p&gt;

&lt;p&gt;That moment made the software bill of materials — SBOM — go from a niche compliance topic to a board-level conversation almost overnight.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is an SBOM?
&lt;/h2&gt;

&lt;p&gt;A software bill of materials is a structured, machine-readable inventory of every component inside a piece of software. Think of it as the nutrition label on a food package, applied to code. It tells you which open-source libraries, third-party packages, and internal components make up a given application — along with their versions, licenses, and any known vulnerabilities.&lt;/p&gt;

&lt;p&gt;Modern software is rarely written entirely from scratch. A typical commercial application might contain 500 to 1,500 third-party dependencies by the time all transitive relationships are counted. Without an SBOM, tracking all of those relationships manually is effectively impossible.&lt;/p&gt;

&lt;p&gt;Two open standards dominate today:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SPDX (Software Package Data Exchange)
  Origin: Linux Foundation
  Primary focus: License compliance
  Best for: Teams where legal is the main concern

CycloneDX
  Origin: OWASP
  Primary focus: Security and vulnerability tracking
  Best for: DevSecOps and security-focused teams
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Log4Shell Made This Non-Negotiable
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://nvd.nist.gov/vuln/detail/CVE-2021-44228" rel="noopener noreferrer"&gt;The Log4Shell vulnerability — CVE-2021-44228&lt;/a&gt; affected an estimated 3 billion devices. But the more instructive part of the story was the response time gap.&lt;/p&gt;

&lt;p&gt;Companies that had SBOMs — even rough, incomplete ones — could run an automated search and know within hours whether they were affected. Companies without them spent weeks manually auditing every application, tracing every dependency tree, and waiting on vendor responses.&lt;/p&gt;

&lt;p&gt;The 2024 XZ Utils backdoor reinforced the same point. An attacker spent nearly two years contributing to an open-source project before inserting a hidden backdoor into a widely used compression library. Most organizations still had no automated way to know whether that library was in their stack. Supply chain attacks exploit exactly the visibility gap that an SBOM closes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who Requires SBOM Now
&lt;/h2&gt;

&lt;p&gt;Compliance pressure has moved faster than most timelines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;US Executive Order 14028 (May 2021)
  → Federal software vendors must provide SBOMs
  → Status: Active

FDA Medical Device Guidance (Oct 2023)
  → SBOM required with every premarket submission
  → Status: Active

EU Cyber Resilience Act (Dec 2027)
  → Covers all software and connected devices sold in the EU
  → SBOM documentation explicitly required
  → Status: Full enforcement December 2027
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;According to ENISA's 2026 figures, 78% of enterprises have begun SBOM adoption. A DigiCert survey found that 43% of companies expect to face explicit SBOM requirements within 24 months. The gap between "starting adoption" and "production-ready compliance" remains substantial for most of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Get Started
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.cisa.gov/sbom" rel="noopener noreferrer"&gt;CISA maintains a comprehensive SBOM resource library&lt;/a&gt; covering formats, tooling, and implementation guidance. For most teams, the practical starting point looks 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;Step 1: Pick a standard
  → Security-first team: CycloneDX
  → License compliance priority: SPDX

Step 2: Integrate automated generation
  → Open source: Syft (Anchore) — generates from container images and filesystems
  → Open source: Grype — vulnerability scanning against generated SBOMs
  → Commercial: FOSSA, Snyk, Black Duck — CI/CD pipeline integration

Step 3: Connect to a vulnerability database
  → NIST NVD
  → OSV (Open Source Vulnerabilities)
  → Commercial feeds from vendors above

Step 4: Establish update cadence
  → Tie SBOM generation to every build, not a quarterly audit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start with a single application. Attempting to retrofit SBOM generation across an entire portfolio at once is where most programs stall.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Actually Found
&lt;/h2&gt;

&lt;p&gt;The framing that dominates most SBOM coverage — "generate an SBOM, know what's in your software, fix vulnerabilities faster" — is accurate but incomplete in a way that matters practically.&lt;/p&gt;

&lt;p&gt;Most organizations that invest in SBOM tooling discover the same thing in the first few months: the SBOM reveals a dependency tree that's far messier than anyone expected, and the organizational process for responding to what it reveals doesn't exist yet.&lt;/p&gt;

&lt;p&gt;An SBOM is a diagnostic tool. It tells you what's there. But knowing your application has 847 dependencies, 23 of which have known CVEs, doesn't automatically generate a prioritization framework, a patch ownership model, or a vendor communication process.&lt;/p&gt;

&lt;p&gt;The companies that responded fastest to Log4Shell weren't the ones with the most sophisticated tooling. They were the ones that had already answered "who owns this dependency when something goes wrong?" before the crisis hit. The SBOM tells you what you have. The harder question it surfaces is whether your organization is structured to act on it.&lt;/p&gt;




&lt;p&gt;Full piece with more detail and external sources: &lt;a href="https://lucas8.com/what-is-sbom-software-bill-of-materials/" rel="noopener noreferrer"&gt;lucas8.com/what-is-sbom-software-bill-of-materials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>security</category>
    </item>
    <item>
      <title>Is AI to Blame for Your Rising Electric Bill?</title>
      <dc:creator>Spicy</dc:creator>
      <pubDate>Wed, 01 Jul 2026 15:06:30 +0000</pubDate>
      <link>https://dev.to/spicykim/is-ai-to-blame-for-your-rising-electric-bill-1kd</link>
      <guid>https://dev.to/spicykim/is-ai-to-blame-for-your-rising-electric-bill-1kd</guid>
      <description>&lt;p&gt;In January 2026, a Virginia man received an electric bill for $281 — nearly triple the $100 he had paid the previous month. He had lived in the same house for 40 years. Nothing in his home had changed. What had changed was what surrounded it: Northern Virginia's "Data Center Alley," the largest concentration of AI data centers on the planet.&lt;/p&gt;

&lt;p&gt;The question he started asking has become one of the defining consumer issues of 2026: are AI data centers genuinely responsible for rising electric bills? The honest answer is more nuanced than most headlines suggest. But the short version is: yes, partly, and the share is growing.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Much Electricity Do AI Data Centers Actually Use?
&lt;/h2&gt;

&lt;p&gt;The numbers are genuinely staggering. According to the IEA, data centers accounted for roughly half of all new electricity demand growth in the US last year — a share the agency expects to hold through 2030.&lt;/p&gt;

&lt;p&gt;Total US data center energy demand is projected to nearly double between 2025 and 2028, jumping from 80 to 150 gigawatts. That 70-gigawatt addition is roughly equivalent to the entire annual electricity consumption of Spain added to the US grid in just three years.&lt;/p&gt;

&lt;p&gt;Virginia alone now hosts nearly 600 data centers, with facilities accounting for close to 40 percent of all electricity used in the state in 2024. The race to find enough power for this demand has pushed the energy industry toward nuclear and other alternative energy sources, turning what was once a tech industry concern into a kitchen-table issue for millions of American households.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Connection to Your Bill Is Real
&lt;/h2&gt;

&lt;p&gt;The mechanism isn't a direct surcharge. But the path from data center construction to higher household costs is real, and it runs through the utility infrastructure system.&lt;/p&gt;

&lt;p&gt;When a data center connects to the grid, utilities must upgrade infrastructure to handle the added load — new transmission lines, transformers, generation capacity. Those investments get approved by state regulators and recovered through rate increases spread across all customers in the service territory, including residential ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.cnbc.com/2026/02/12/electricity-price-data-center-ai-inflation-goldman.html" rel="noopener noreferrer"&gt;Goldman Sachs reported&lt;/a&gt; that US electricity prices jumped 6.9% in 2025 — more than double the headline inflation rate — and forecasts an additional 6% increase through 2027. In areas with heavy data center concentrations, Bloomberg found electricity costs rose 267% over the past five years.&lt;/p&gt;

&lt;p&gt;A &lt;a href="https://advocacy.consumerreports.org/press_release/consumer-reports-new-survey-finds-americans-are-skeptical-of-big-techs-pledge-to-pay-for-all-ai-data-center-energy-costs" rel="noopener noreferrer"&gt;Consumer Reports survey from May 2026&lt;/a&gt; found that 78% of Americans are concerned that data centers will continue raising their household energy bills. And when told about the "Ratepayer Protection Pledge" — a White House-sponsored agreement signed by Amazon, Google, Meta, Microsoft, OpenAI, Oracle, and xAI pledging to cover their full energy costs — 75% said they were not confident companies would follow through.&lt;/p&gt;

&lt;h2&gt;
  
  
  But Is AI the Only Culprit?
&lt;/h2&gt;

&lt;p&gt;Here's where the honest answer gets complicated.&lt;/p&gt;

&lt;p&gt;US residential electricity prices rose more than 30% between 2021 and early 2026 — a trend that began well before ChatGPT launched. Aging grid infrastructure, climate change, coal and natural gas plant closures, and structural issues in regional electricity markets were already pushing bills upward before hyperscalers started adding hundreds of gigawatts of demand.&lt;/p&gt;

&lt;p&gt;SemiAnalysis published a detailed analysis arguing that an obscure capacity auction mechanism in the PJM market — covering 13 mid-Atlantic and Midwest states — accounts for much of the electricity price surge, with data center load playing an amplifying but not singular role.&lt;/p&gt;

&lt;p&gt;The most accurate framing: AI data centers are a real and growing contributor to higher bills, but they're landing on top of a system that was already struggling with affordability. Your bills would be lower without the data center boom. They wouldn't be cheap regardless.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Actually Found
&lt;/h2&gt;

&lt;p&gt;What surprised me wasn't the scale of the numbers — those are well documented. It was how clearly the politics had already shifted by mid-2026.&lt;/p&gt;

&lt;p&gt;In 2023 and 2024, criticism of data center energy use came mostly from environmental advocates and local communities. By 2026, it had become a mainstream voter concern: bipartisan calls in Congress, gubernatorial campaigns in Virginia and New Jersey fought partly on utility affordability, a Maine moratorium on new data center construction, and a White House pledge that would not have existed if this weren't a live political issue at the presidential level.&lt;/p&gt;

&lt;p&gt;The practical implication for a household is limited — there's no individual action that fully insulates you from regional rate increases driven by infrastructure decisions made at the utility and regulatory level. The most effective lever is engagement with state public utility commission proceedings, where rate increase requests are actually approved or rejected.&lt;/p&gt;

&lt;p&gt;The Virginia man with the $281 bill was right to ask the question. The full answer is complicated, but it starts with the same honest admission: the data centers that run the AI tools we use every day are not free, and someone is paying for them.&lt;/p&gt;




&lt;p&gt;Full piece with more detail and sources: &lt;a href="https://lucas8.com/ai-data-center-electric-bill/" rel="noopener noreferrer"&gt;lucas8.com/ai-data-center-electric-bill&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
