<?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: Puneet Khandelwal</title>
    <description>The latest articles on DEV Community by Puneet Khandelwal (@puneet_khandelwal_429a72e).</description>
    <link>https://dev.to/puneet_khandelwal_429a72e</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%2F3886902%2F3e24c2b3-9760-4020-a068-aa6c1890278d.png</url>
      <title>DEV Community: Puneet Khandelwal</title>
      <link>https://dev.to/puneet_khandelwal_429a72e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/puneet_khandelwal_429a72e"/>
    <language>en</language>
    <item>
      <title>Why Our Open Government Spending Dashboard Completely Stalled</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Tue, 24 Nov 2026 18:28:41 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/why-our-open-government-spending-dashboard-completely-stalled-21m9</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/why-our-open-government-spending-dashboard-completely-stalled-21m9</guid>
      <description>&lt;p&gt;When we built a local spending dashboard for our municipal district, we made a classic engineering blunder. We assumed the hard part meant writing frontend queries. We pictured a sleek interface where residents tracked tax dollars down to the exact pothole fix or library book. We spent early weekends architecting a pristine relational database schema, building automated ingestion pipelines, and designing a reactive dashboard that looked ready for venture backing. &lt;/p&gt;

&lt;p&gt;Reality hit when the finance department handed us a thumb drive with three years of quarterly budget reports stored as nested Excel files. Each department head used custom naming conventions. A road repair project appeared under four different titles depending on funding sources. Our ingestion script choked on merged cells, footer notes, and missing header rows. &lt;/p&gt;

&lt;p&gt;Civic transparency fails because of mismatched data semantics, not a lack of technical chops. Engineers want to normalize and enforce strict types. Government accounting relies on historical precedent and legal compliance. A line item brings regulatory context, multi-year encumbrances, and legislative amendments that resist clean JSON payloads. By forcing raw civic data into rigid database models, we stripped away the context people actually needed. &lt;/p&gt;

&lt;p&gt;Our first try stalled because we built for an idealized user instead of reality. We tore down our ingestion engine and treated data cleaning as the core product. We sat with municipal clerks to learn why funds get segregated and how capital projects span fiscal boundaries. We rewrote parsers to keep human annotations instead of treating them as noise. &lt;/p&gt;

&lt;p&gt;Before writing database migration code, go understand the organizational friction that generated the record. Clean architecture means nothing if it isolates you from public administration.&lt;/p&gt;

</description>
      <category>technology</category>
      <category>civic</category>
      <category>community</category>
      <category>policy</category>
    </item>
    <item>
      <title>Why LLMs Are Finally Winning at Legacy Refactoring</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Mon, 23 Nov 2026 18:26:48 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/why-llms-are-finally-winning-at-legacy-refactoring-lha</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/why-llms-are-finally-winning-at-legacy-refactoring-lha</guid>
      <description>&lt;p&gt;Every engineering team eventually hits a wall with a legacy codebase. Someone suggests a full rewrite. It sounds clean, modern, and morally satisfying. Six months later, the project bleeds budget, misses critical edge cases, and the original developers are gone. The standard failure mode isn't technical incompetence. It's a complete misunderstanding of implicit business logic.&lt;/p&gt;

&lt;p&gt;Legacy code isn't just code. It's an archaeological record of every production fire, weird client request, and database quirk your company survived over the last decade. A human team staring at a messy five-thousand-line function often misses why a seemingly redundant null check exists. They strip it out, ship the clean new version, and instantly break billing for enterprise clients.&lt;/p&gt;

&lt;p&gt;This is where developer tools actually matter now. We're moving past simple code completion into systems that ingest entire repositories and trace execution paths against documentation, commit histories, and test suites. Instead of translating syntax line by line, modern LLM workflows let teams query the intent behind the implementation.&lt;/p&gt;

&lt;p&gt;When you ask an engineer to refactor a messy module, they get defensive. They see risk. When you point a well-contextualized model at that same module, you can ask a specific question. Why does this function mutate the global state before returning? The model scans three years of git blame, spots an old bug ticket reference in a commit message, and explains the exact production failure that forced that ugly design.&lt;/p&gt;

&lt;p&gt;This changes the economics of legacy maintenance. The goal of using AI on old code isn't to generate shiny new abstractions. The goal is archaeology at scale. You use the model to extract the hidden rule set from the spaghetti code before you touch a single line of production.&lt;/p&gt;

&lt;p&gt;Here's a practical way to approach this in your own stack. Don't feed a single file to a chat interface and ask it to modernize the code. Build a retrieval pipeline over your entire repository, including closed pull requests and architectural decision records. Run static analysis to map the dependency graph, then use the model to generate integration tests based on current behavior. Only after those tests lock down the existing quirks should you begin refactoring.&lt;/p&gt;

&lt;p&gt;The non-obvious implication here is that documentation is no longer something humans write. It's something we mine. Your legacy codebase is the ultimate source of truth for how your business actually operates, far more accurate than any Notion page or Confluence wiki. Treat the old code as a database of tribal knowledge. Query it, test it, and refactor around its constraints instead of pretending they don't exist.&lt;/p&gt;

</description>
      <category>coding</category>
      <category>developertools</category>
      <category>llm</category>
      <category>saas</category>
    </item>
    <item>
      <title>Querying your own life: parsing Apple Health XML with Python</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Sun, 22 Nov 2026 15:23:50 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/querying-your-own-life-parsing-apple-health-xml-with-python-4clc</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/querying-your-own-life-parsing-apple-health-xml-with-python-4clc</guid>
      <description>&lt;p&gt;Apple Health holds every step, sleep cycle, and workout you've generated for years, yet the native app insists on hiding your trends behind rigid weekly rings and vague bar charts. &lt;/p&gt;

&lt;p&gt;Like many engineers staring at a black box of personal data, I grew tired of guessing whether my sleep hygiene actually correlated with my deep work output. The export function in the Apple Health app spits out a massive XML file called export.xml. It's a stubborn, nested beast that will choke standard text editors instantly. If you want to understand your own body, you have to treat that export like any other messy data source. You need to write a pipeline, spin up a local database, and query your own life.&lt;/p&gt;

&lt;p&gt;The real challenge with the Apple Health export is its sheer scale and flat structure. Records are stored as flat attributes on XML elements, meaning a single file can contain millions of rows of heart rate samples, workouts, and environmental audio exposures. Loading this into memory all at once is a fast track to an out-of-memory crash. &lt;/p&gt;

&lt;p&gt;Instead of trying to parse the entire tree into RAM, stream the XML file node by node using Python and the standard library module xml.etree.ElementTree in an iterative parse mode. Extract the specific record attributes you care about, batch them up, and dump them straight into a local PostgreSQL database using psycopg.&lt;/p&gt;

&lt;p&gt;Here's a stripped-down version of the parser loop I run locally whenever I update my health archive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;etree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ElementTree&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="no"&gt;ET&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;psycopg&lt;/span&gt;

&lt;span class="c1"&gt;# Connect to your local database&lt;/span&gt;
&lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;psycopg&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="s2"&gt;"dbname=health_data user=postgres"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;cursor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Stream through the giant export file without loading it all into RAM&lt;/span&gt;
&lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;ET&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;iterparse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"export.xml"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"end"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;elem&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;context&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;elem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tag&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"Record"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
 &lt;span class="n"&gt;record_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;elem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;elem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="n"&gt;start_date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;elem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"startDate"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

 &lt;span class="c1"&gt;# Filter for metrics you actually care about&lt;/span&gt;
 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;record_type&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"HKQuantityTypeIdentifierStepCount"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"HKQuantityTypeIdentifierHeartRate"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
 &lt;span class="n"&gt;cursor&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="s2"&gt;"INSERT INTO health_records (type, value, start_date) VALUES (%s, %s, %s)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;record_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

 &lt;span class="c1"&gt;# Clear the element from memory to keep RAM usage flat&lt;/span&gt;
 &lt;span class="n"&gt;elem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;cursor&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="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;conn&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="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once that data lands in Postgres, the shift in perspective is immediate. You stop asking what your daily average is, and you start writing complex window functions to find out how your sleep duration fluctuates across different phases of the month. You can join your step counts with your calendar database, or run regression analysis on your resting heart rate against your commit history.&lt;/p&gt;

&lt;p&gt;Building custom infrastructure for your personal data changes how you interact with wellness tools. When you own the pipeline, you stop consuming health as a passive product and start treating it as an engineering problem worth solving.&lt;/p&gt;

</description>
      <category>fitness</category>
      <category>health</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Parsing 50 Gigabytes of Municipal Data on a Single Core</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Sat, 21 Nov 2026 15:18:01 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/parsing-50-gigabytes-of-municipal-data-on-a-single-core-mg7</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/parsing-50-gigabytes-of-municipal-data-on-a-single-core-mg7</guid>
      <description>&lt;p&gt;When a city dumps 50 gigabytes of raw zoning and expenditure CSVs onto a public portal, your first instinct is to spin up a massive cluster. My team did that. Then we watched the memory graphs spike, the cloud bills multiply, and the node kernel panic right before the aggregation finished. The infrastructure was fighting the data instead of listening to it. We realized that loading flat files into memory was a habit born of convenience, not necessity. Municipal transparency projects stall out not because governments hide data, but because the tooling we build to read it demands enterprise-grade iron just to parse a local budget.&lt;/p&gt;

&lt;p&gt;We had to strip our pipeline down to the metal. The breakthrough came when we stopped treating CSVs as tables and started treating them as byte streams. Instead of relying on high-level dataframe libraries that eagerly load entire datasets into RAM, we dropped back to basic streaming primitives. We wrote a lightweight parser in Go that reads files line by line, evaluating a sliding window of bytes rather than allocating string objects for every single cell. By bypassing standard garbage collection overhead and recycling byte slices through a custom sync pool, memory consumption flatlined at under 50 megabytes. A task that previously required a dedicated server now ran comfortably on a standard developer workstation, completing in minutes instead of hours.&lt;/p&gt;

&lt;p&gt;This matters beyond clean benchmarks. When data processing is cheap and accessible, oversight democratizes. You don't need a multi-thousand-dollar cloud budget to audit local municipal spending or track zoning variances in your ward. By optimizing our code to respect hardware limits, we lower the barrier for civic watchdogs, local journalists, and neighborhood associations who want to hold institutions accountable. Technology serves the public best when it removes friction from the truth, proving that efficient code acts as a powerful form of civic participation.&lt;/p&gt;

</description>
      <category>technology</category>
      <category>community</category>
      <category>civic</category>
    </item>
    <item>
      <title>Stop Fearing Prototype Tech Debt</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Fri, 20 Nov 2026 12:27:31 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/stop-fearing-prototype-tech-debt-438i</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/stop-fearing-prototype-tech-debt-438i</guid>
      <description>&lt;p&gt;Every codebase dies a slow death by purity. We write code as if it will live for decades, static and immutable, while the market pivots under our feet every two weeks. When building new software products, speed kills the architecture, but slowness kills the company. The real engineering sin is not shipping messy code to win a market window. The sin is shipping messy code without a map back to reality.&lt;/p&gt;

&lt;p&gt;AI code generation tools and rapid prototyping cycles have accelerated this dynamic. You can scaffold an entire full-stack application in an afternoon using an LLM. The resulting code works, but it's a dense black box of tight coupling and implicit state. Senior engineers look at it and shudder, demanding a rewrite from scratch. That reaction is a trap. Rewriting a prototype because it lacks enterprise elegance is the fastest way to miss product market fit.&lt;/p&gt;

&lt;p&gt;The pragmatic approach accepts the debt upfront. If you need to hardcode a database schema or bypass the type system to ship a feature today, do it. But you must leave an escape hatch. An escape hatch is an explicit comment or small test detailing why the shortcut was taken and what breaks when the scale changes.&lt;/p&gt;

&lt;p&gt;Consider a typical API route generated by a coding assistant that bypasses proper service layers to hit the database directly. Instead of deleting it, mark it clearly with the exact query limit and the point of failure.&lt;/p&gt;

&lt;h1&gt;
  
  
  ESCAPE HATCH: Direct DB hit for rapid iteration.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Breaks at ~500 concurrent requests due to connection pooling.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Refactor to use the async repository pattern before Q3.
&lt;/h1&gt;

&lt;p&gt;@app.route("/api/quick-report")&lt;br&gt;
def quick_report():&lt;br&gt;
 return db.execute("SELECT * FROM massive_table").fetchall()&lt;/p&gt;

&lt;p&gt;This documentation transforms unconscious debt into a managed risk. When the system starts slowing down under real load, you don't need to audit the entire repository. You grep for the escape hatches and refactor only the paths that are actually burning CPU cycles or developer hours.&lt;/p&gt;

&lt;p&gt;Most teams treat technical debt as a moral failure. It isn't. It's a financial instrument. You are borrowing speed today against engineering time tomorrow. Like any loan, the terms matter. Taking a high-interest loan without knowing how to pay it off will bankrupt the project.&lt;/p&gt;

&lt;p&gt;Here's the non-obvious implication of this mindset shift. As AI tools get better at generating code, the bottleneck of software engineering moves completely away from writing syntax and toward debt management. The engineers who thrive won't be the ones who write pristine architecture on day one. They'll be the ones who orchestrate rapid prototypes while systematically cataloging where the foundations will eventually crack. Stop trying to write code that lasts forever. Write code that moves fast, and leave clear instructions on how to rebuild it when the time comes.&lt;/p&gt;

</description>
      <category>developertools</category>
      <category>coding</category>
      <category>saas</category>
    </item>
    <item>
      <title>Profiling My Laptop for Mental Peace</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Thu, 19 Nov 2026 12:19:24 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/profiling-my-laptop-for-mental-peace-3ai3</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/profiling-my-laptop-for-mental-peace-3ai3</guid>
      <description>&lt;p&gt;Your CPU fan roaring at nine in the morning is not just a hardware problem. It's a direct tax on your attention span.&lt;/p&gt;

&lt;p&gt;I spent most of last week wondering why my afternoon energy flatlined long before five o'clock. I blamed complex code reviews and heavy architecture diagrams. Then I opened my system monitor out of sheer frustration, and the truth hit me. A half-dozen background utilities I forgot I installed were consuming half my processing power, spinning up hidden threads every time I saved a file.&lt;/p&gt;

&lt;p&gt;We spend hours optimizing codebases, refactoring messy functions, and trimming milliseconds off test suites. Yet we rarely apply that same engineering rigor to our own operating systems. We accumulate background watchers, automatic updaters, and menubar helpers the way junk drawers collect stray paperclips. Every single one steals a tiny slice of RAM and CPU cycles. They create a low hum of digital friction that wears down mental stamina.&lt;/p&gt;

&lt;p&gt;I decided to treat my local machine like a leaky memory allocation in production. I killed rogue processes, uninstalled apps demanding constant telemetry, and turned off live indexing for dead directories. The difference was instant. My laptop stopped sounding like a jet engine, and battery life nearly doubled.&lt;/p&gt;

&lt;p&gt;The mental shift surprised me more than the hardware metrics. Without the constant microscopic context switching from background syncs and notifications, my focus deepened. I could sit with a hard debugging problem for an hour without feeling that phantom itch to open a browser tab.&lt;/p&gt;

&lt;p&gt;We hunt for massive lifestyle overhauls when we feel scattered. We buy ergonomic chairs, test new morning routines, or download complex task managers. Sometimes the best path to better productivity is simply turning off the noise your computer makes behind your back.&lt;/p&gt;

&lt;p&gt;Take five minutes today to open your system monitor and look at what runs while you work. Stop paying a CPU tax for processes giving you zero value.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>selfimprovement</category>
      <category>mentalhealth</category>
    </item>
    <item>
      <title>Fixing a Memory Leak in Our Polling Station Wait-Time Estimator</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Wed, 18 Nov 2026 09:56:43 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/fixing-a-memory-leak-in-our-polling-station-wait-time-estimator-1p17</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/fixing-a-memory-leak-in-our-polling-station-wait-time-estimator-1p17</guid>
      <description>&lt;p&gt;When a voting line stretches around a concrete civic center, nobody wants a guessing game. Our civic tech collective builds open-source tooling to keep communities informed, specifically a polling station wait-time estimator designed to ingest sporadic check-in pings and project queue lengths in real time. Last election season, the system nearly buckled. Around midday, memory usage on our primary container spiked past ninety percent, threatening to drop connections right as peak voter turnout began.&lt;/p&gt;

&lt;p&gt;As engineers, we tend to blame the database first, assuming slow queries or bloated payloads are eating our RAM. I pulled the monitoring dashboards, checked the connection pools, and watched the heap allocation climb in a steady, unyielding diagonal line. Garbage collection ran constantly, but it couldn't reclaim the memory fast enough. This wasn't a slow query. This was a classic retention leak, quietly hoarding references somewhere in our event loop.&lt;/p&gt;

&lt;p&gt;The culprit was our telemetry listener. It tracked incoming location pings from volunteer poll workers using our mobile web app. Every time a volunteer submitted an update, the handler registered a geospatial distance calculation function inside a global event emitter for logging audit trails. Because the emitter lacked a cleanup lifecycle, these closures captured the incoming payload scope and hung onto it indefinitely. Thousands of check-ins later, the application retained gigabytes of stale JSON objects and dead worker references.&lt;/p&gt;

&lt;p&gt;We solved it by replacing the unbounded global emitter with a localized stream buffer that dropped unacknowledged telemetry after a strict timeout window. We also wrote integration tests to simulate high-frequency check-ins under constrained memory limits, ensuring the garbage collector actually had room to breathe. Fixing the bug took twenty lines of code. The lesson reached much further than our repository.&lt;/p&gt;

&lt;p&gt;Open-source civic software carries distinct weight because the user base is an entire electorate rather than enterprise clients scrolling through a SaaS dashboard. When infrastructure fails here, it erodes public trust in tools meant to bring transparency to elections. Keeping our codebases lean and thoroughly profiled is a fundamental responsibility to the communities we serve.&lt;/p&gt;

</description>
      <category>technology</category>
      <category>community</category>
      <category>civic</category>
    </item>
    <item>
      <title>Local LLMs vs Cloud APIs for Developer Workflows</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Tue, 17 Nov 2026 09:31:01 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/local-llms-vs-cloud-apis-for-developer-workflows-1dhm</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/local-llms-vs-cloud-apis-for-developer-workflows-1dhm</guid>
      <description>&lt;p&gt;Most teams routing internal developer workflows through cloud LLM APIs are burning cash for zero technical gain. Hooking your IDE extension or terminal companion to a remote endpoint brings latency, leaks proprietary codebase context, and tethers your output to an external status page. We spent the last month benchmarking local weights against hosted models for commit message generation, local code review agents, and test scaffolding. The numbers made us rip out our cloud API calls for almost all background tasks.&lt;/p&gt;

&lt;p&gt;Running a model locally used to mean driver hell and crawling token speeds. Quantization frameworks like GGUF and engines like Ollama or llama.cpp now let a standard M-series Mac or mid-range Linux workstation run a 7B or 14B parameter model instantly. For internal workflows, you don't need the generalized world knowledge of a massive cloud frontier model. You need something that understands your repository structure, respects strict latency bounds, and stays quiet when your Wi-Fi drops.&lt;/p&gt;

&lt;p&gt;Take a simple git hook that generates a descriptive commit message from a staged diff. Hitting a cloud API serializes the diff, sends it across the public internet, waits for JSON parsing, and charges you per token. If your internet blips, your commit workflow halts. Worse, if your staged changes touch unreleased features or security patches, you are piping sensitive IP into a remote training pipeline.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git diff --staged &lt;span class="o"&gt;|&lt;/span&gt; ollama run llama3:8b &lt;span class="s2"&gt;"Summarize these changes into three concise bullet points for a code review."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That pipeline runs entirely on the bare metal beneath your fingers. It costs zero dollars per invocation, requires zero internet access, and exposes zero corporate data. The output quality for targeted tasks like diff summarization, syntax transformation, or boilerplate generation matches heavier cloud endpoints.&lt;/p&gt;

&lt;p&gt;Cloud APIs still have their place. If you're building multi-agent architectures that require deep reasoning across vast external documentation, or if your hardware pool consists of aging thin clients, hosted inference wins. For the daily plumbing of developer workflows, local execution is becoming the default choice.&lt;/p&gt;

&lt;p&gt;Look at your internal tooling and figure out which API calls actually require a hyperscale cloud model. Shift the repetitive background tasks to local weights, keep your data on your own machine, and watch your cloud bills drop while your velocity stays steady.&lt;/p&gt;

</description>
      <category>developertools</category>
      <category>ai</category>
      <category>llm</category>
      <category>coding</category>
    </item>
    <item>
      <title>Fix Your Bedroom Layout to Finally Get Deeper Sleep</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Mon, 16 Nov 2026 09:24:44 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/fix-your-bedroom-layout-to-finally-get-deeper-sleep-1241</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/fix-your-bedroom-layout-to-finally-get-deeper-sleep-1241</guid>
      <description>&lt;p&gt;If your bedroom looks like an overcrowded storage locker, your nervous system won't power down when your head hits the pillow. Choosing the right bedroom layout changes how your body transitions into rest after a long day of coding and screen time. I spent months tossing and turning in my apartment before realizing that awkward furniture, visual clutter, and harsh cool lighting kept my brain wired past midnight.&lt;/p&gt;

&lt;p&gt;Bed positioning sets the psychological foundation of the whole room. When I moved my headboard against a solid interior wall away from draughty entryways and street-facing windows, ambient sound dropped instantly. Being intentional about spatial design keeps your sleeping zone a refuge instead of an overflow area for laundry baskets, unread books, and old peripherals.&lt;/p&gt;

&lt;p&gt;Environmental cues dictate your body's transition into deep sleep. A well-ventilated, symmetrical layout lowers baseline stress and helps regulate nighttime cortisol. Working with compact square footage? Use a low-profile divider or modular shelving to create visual zoning without blocking airflow. Store heavy items or extra bedding there without introducing visual noise that triggers your waking focus.&lt;/p&gt;

&lt;p&gt;Proper illumination matters just as much as your furniture setup. Overhead blue-toned daylight bulbs signal daytime alertness to the brain, fighting your evening wind-down routine. Shift to warm ambient fixtures and concealed accent lighting for a perimeter glow that mimics a sunset instead of an office workspace. Pre-bedtime exposure to high-kelvin, cool-spectrum light delays sleep onset, so switch to warm, indirect lighting to fix that delay.&lt;/p&gt;

&lt;p&gt;Visual clutter translates directly to mental friction. When every horizontal surface holds chargers, loose paperwork, and half-empty water glasses, your subconscious stays active. Create a firm boundary against unnecessary electronics near the bed. Devices emitting short-wavelength light trigger unwanted alertness. When I moved my phone charging dock into the hallway and swapped it for a basic analog alarm clock, my morning grogginess faded fast.&lt;/p&gt;

&lt;p&gt;Read the full guide on how to style your bedroom layout for deeper sleep.&lt;/p&gt;

</description>
      <category>wellness</category>
      <category>productivity</category>
      <category>selfimprovement</category>
    </item>
    <item>
      <title>Parsing Four Gigabytes of Legacy Municipal JSON Without OOMing</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Sun, 15 Nov 2026 09:19:50 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/parsing-four-gigabytes-of-legacy-municipal-json-without-ooming-2o35</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/parsing-four-gigabytes-of-legacy-municipal-json-without-ooming-2o35</guid>
      <description>&lt;p&gt;When a municipal server returns a four-gigabyte JSON payload in a single, unpaginated HTTP response, standard methods break down. Most backend engineers reach for a built-in JSON deserializer first. They load the entire string into memory, parse the document into a massive object tree, and watch the process container crash with an out of memory error. We hit this exact wall last week while ingesting real-time public transit logs from a legacy city transit API. The endpoint lacks pagination parameters, and the data arrives as one giant array of nested objects containing vehicle telemetry, route changes, and maintenance alerts.&lt;/p&gt;

&lt;p&gt;The problem isn't the size of the data itself. Four gigabytes fits comfortably on a modern server disk or even in RAM. The failure stems from how standard deserializers attempt to map that text into memory. Object allocation overhead in languages like JavaScript, Python, or Ruby easily multiplies raw JSON size by a factor of five or more. A four-gigabyte string transforms into a twenty-gigabyte object graph, instantly exhausting available system resources.&lt;/p&gt;

&lt;p&gt;To survive this ingestion task, we had to abandon DOM style parsers in favor of token-based streaming. Instead of loading the whole payload, a streaming parser reads the HTTP response stream chunk by chunk. It fires events or yields control when it detects structural boundaries like the start of an array element, the end of a key, or a closing bracket. This design keeps the active memory footprint nearly constant regardless of whether the input file is four megabytes or four terabytes.&lt;/p&gt;

&lt;p&gt;Here is a conceptual pattern using Node.js and a streaming transformation approach to filter and process large civic records without retaining the whole dataset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'stream-chain'&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="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;parser&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'stream-json'&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="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;pick&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'stream-json/filters/Pick'&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="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;streamArray&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'stream-json/streamers/StreamArray'&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="n"&gt;fs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'fs'&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="n"&gt;pipeline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
 &lt;span class="n"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createReadStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'transit_logs.json'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nf"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nf"&gt;pick&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'data'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nf"&gt;streamArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'data'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'delayed'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="c1"&gt;// Process single record immediately without holding sibling objects&lt;/span&gt;
 &lt;span class="nf"&gt;saveToDatabase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'end'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nb"&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="s1"&gt;'Finished streaming and parsing municipal feed.'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This architecture shifts the operational model from batch processing to event-driven pipelining. Records are read, evaluated, written to a persistent datastore, and garbage collected within milliseconds. The memory profile remains flat, hovering at just a few dozen megabytes throughout the entire run.&lt;/p&gt;

&lt;p&gt;Building resilient civic infrastructure requires acknowledging that public data sources are rarely pristine. Legacy systems will continue to serve monolithic payloads, and engineers must design pipelines that respect physical memory limits. When we stop trying to hold the whole world in RAM, our systems finally gain the stability that communities depend on.&lt;/p&gt;

</description>
      <category>technology</category>
      <category>civic</category>
      <category>community</category>
    </item>
    <item>
      <title>Why AI Code Assistants Fail on Enterprise Codebases</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Fri, 13 Nov 2026 18:31:42 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/why-ai-code-assistants-fail-on-enterprise-codebases-2fij</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/why-ai-code-assistants-fail-on-enterprise-codebases-2fij</guid>
      <description>&lt;p&gt;Most coding assistants are glorified autocomplete engines built for greenfield projects. Hand them a clean React component or a short Python script, and they look brilliant. Ask them to touch a ten-year-old Java monolith loaded with circular dependencies, custom ORMs, and undocumented XML configs, and they fall apart.&lt;/p&gt;

&lt;p&gt;The industry assumes larger context windows solve this. They don't. Giving an LLM a million tokens doesn't grant architectural understanding. It just gives the model a bigger haystack to hallucinate inside.&lt;/p&gt;

&lt;p&gt;Enterprise codebases rely on implicit knowledge. A junior dev reads a function and sees a standard database query. A senior engineer knows that exact query deadlocks when a specific batch job runs because of an unindexed foreign key patched during an outage three years ago. That context lives in Jira tickets, Slack threads, and human memory. It never makes it into the abstract syntax tree.&lt;/p&gt;

&lt;p&gt;When we feed code to an LLM, we treat it as plain text. Code is actually a graph of execution paths, state mutations, and historical accidents. Standard models ingest this graph as flattened strings and lose the topology that keeps the system running. RAG pipelines try to fix this by chunking files and pulling snippets via semantic similarity. That fails because semantic search is a terrible proxy for control flow. A query for authentication grabs twenty helper functions from dead modules while missing the single interceptor enforcing token validation.&lt;/p&gt;

&lt;p&gt;The real fix isn't bigger context windows or smarter base models. We need deterministic code analysis feeding probabilistic models. Systems should compile, run static analysis graphs, and build dependency maps first. The LLM belongs as a reasoning layer on top of a strictly verified structural index, not reading raw source files like a novel.&lt;/p&gt;

&lt;p&gt;Until tooling vendors treat codebases as living state machines instead of text documents, devs inside large companies will keep hitting walls. The assistant writes a neat helper function that breaks a database migration running three layers deep in the dependency tree. Stop trusting raw context windows and start fixing the graph.&lt;/p&gt;

</description>
      <category>developertools</category>
      <category>ai</category>
      <category>coding</category>
      <category>llm</category>
    </item>
    <item>
      <title>Accelerating Insights</title>
      <dc:creator>Puneet Khandelwal</dc:creator>
      <pubDate>Thu, 12 Nov 2026 15:47:59 +0000</pubDate>
      <link>https://dev.to/puneet_khandelwal_429a72e/accelerating-insights-4pm5</link>
      <guid>https://dev.to/puneet_khandelwal_429a72e/accelerating-insights-4pm5</guid>
      <description>&lt;p&gt;Processing a massive accelerometer dataset the first time is brutal. Thousands of readings flood in every second and choke standard scripts. I needed a custom time-series chunker just to make sense of the noise, filter the junk, and pull out actual trends. &lt;/p&gt;

&lt;p&gt;My goal was tracking daily activity patterns from wearables and matching them against heart rate and sleep metrics. Raw device output is too granular to plot or analyze cleanly. &lt;/p&gt;

&lt;p&gt;So I wrote a chunking script. It splits data based on time of day, activity type, and density. High-activity blocks get 30-minute windows. Inactive stretches drop down to hourly intervals. &lt;/p&gt;

&lt;p&gt;Next came the aggregation layer. I ran standard stats like mean and median per chunk, then layered on spectral analysis and basic ML models. &lt;/p&gt;

&lt;p&gt;The output changed everything. Raw logs showed chaos, but the chunks revealed clear trends. Morning activity spikes followed by afternoon drop-offs stood out immediately. &lt;/p&gt;

&lt;p&gt;Personalized fitness apps need this level of granularity. You can't build solid exercise or nutrition recommendations on raw sensor feeds. Time-series chunking bridges that gap, and the same approach translates directly to mental health tracking and other high-frequency monitoring domains.&lt;/p&gt;

</description>
      <category>fitness</category>
      <category>health</category>
      <category>selfimprovement</category>
    </item>
  </channel>
</rss>
