<?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: The Living Algorithms</title>
    <description>The latest articles on DEV Community by The Living Algorithms (@thelivingalgorithms).</description>
    <link>https://dev.to/thelivingalgorithms</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3680812%2F6562220b-dd84-4b98-bdbd-336cc9988582.png</url>
      <title>DEV Community: The Living Algorithms</title>
      <link>https://dev.to/thelivingalgorithms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thelivingalgorithms"/>
    <language>en</language>
    <item>
      <title>I Stopped Fearing Legacy Code Once I Could See Its Dead Parts</title>
      <dc:creator>The Living Algorithms</dc:creator>
      <pubDate>Wed, 07 Jan 2026 13:20:45 +0000</pubDate>
      <link>https://dev.to/thelivingalgorithms/i-stopped-fearing-legacy-code-once-i-could-see-its-dead-parts-3dba</link>
      <guid>https://dev.to/thelivingalgorithms/i-stopped-fearing-legacy-code-once-i-could-see-its-dead-parts-3dba</guid>
      <description>&lt;h2&gt;
  
  
  Intro: why dead code hurts
&lt;/h2&gt;

&lt;p&gt;Dead code is more than “a few unused functions”. It bloats the repo, slows builds, and makes onboarding painful because new devs must mentally sift through code paths that never actually run. Over time, this “code rot” silently drags productivity down and increases the chances of bugs and regressions.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;You can open with a short story: you (or a teammate) jumping into a codebase, following a function chain for 20 minutes, and then realizing the entire flow is never triggered in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Section 1 – From mapping to pruning
&lt;/h2&gt;

&lt;p&gt;Briefly recap your previous “mapping codebases” idea: you map user flows, not every file.&lt;/p&gt;

&lt;p&gt;Explain the next step: once you have a map, you can start asking “which of these streets are never used?”&lt;/p&gt;

&lt;p&gt;Connect that to dead code: if 20–30% of the code is unused (real numbers teams report), then every refactor, code review, and bug hunt is harder than it needs to be.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;You can position Codur as the tool that turns the abstract “we should clean this up someday” into concrete, safe suggestions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Section 2 – How Codur’s Dead Code Analysis works
&lt;/h2&gt;

&lt;p&gt;Turn your previous paragraph into a reader‑friendly breakdown:&lt;/p&gt;

&lt;p&gt;Uses the TypeScript Language Server, not regex&lt;br&gt;
Codur piggybacks on VS Code’s built‑in TypeScript Language Server, the same engine that powers “Go to Definition” and “Find References”, to scan your entire workspace. Instead of grepping for names, it asks the language server for real symbol references across files, so it can catch unused functions, classes, and components even when they’re imported from far away.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;Understands real-world patterns&lt;br&gt;
Many dead‑code tools are noisy because they flag things that look unused but are actually wired in by conventions. Codur is framework‑aware:&lt;/p&gt;

&lt;p&gt;React hooks (useXxx) and event handlers (onXxx, handleXxx)&lt;/p&gt;

&lt;p&gt;Express routes and middleware&lt;/p&gt;

&lt;p&gt;Next.js data‑fetching functions&lt;/p&gt;

&lt;p&gt;Test files and helpers&lt;br&gt;
are excluded by default to avoid false positives. It also skips type‑only declarations (export type, interface), barrel exports (index.ts re‑exports), and side‑effect imports, which static analysis often struggles with.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;Confidence scores instead of “maybe unused” spam&lt;br&gt;
Every candidate gets a confidence score, and only items above a threshold (for example 70%) are shown in the main list. Confidence‑based ranking is a common way modern static‑analysis tools reduce noise so developers feel safe acting on results.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;Local‑first and undo‑friendly&lt;br&gt;
All analysis runs locally inside VS Code: no code upload, no server round‑trips, similar to other language‑server‑driven or on‑prem static analyzers. Cleanup is always reversible: you can open items, delete them with one click, or ignore them, and rely on full undo support if you change your mind.&lt;br&gt;
​&lt;/p&gt;

&lt;h2&gt;
  
  
  Section 3 – What developers actually gain
&lt;/h2&gt;

&lt;p&gt;Focus on outcomes, not just features:&lt;/p&gt;

&lt;p&gt;Less cognitive load – When a tool automatically highlights code that is never referenced, developers spend less time mentally simulating call chains and more time solving real problems.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;Faster onboarding and refactoring – New teammates see a codebase that better reflects reality instead of years of abandoned experiments and feature flags.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;Smaller, faster builds – Removing unused modules shrinks bundles and can cut build/test times because the toolchain processes fewer files.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;This is where you can tie it back to your “sanity” angle: less dead code means fewer distractions and less fear of changing things.&lt;/p&gt;

&lt;h2&gt;
  
  
  Section 4 – A quick walkthrough
&lt;/h2&gt;

&lt;p&gt;Outline a concrete flow in 4–5 bullets the reader can imagine:&lt;/p&gt;

&lt;p&gt;Open a TypeScript / React / Next.js project in VS Code.&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;Run Codur’s Dead Code Analysis from the command palette.&lt;/p&gt;

&lt;p&gt;Watch it populate a panel with high‑confidence unused functions, classes, and components.&lt;/p&gt;

&lt;p&gt;Click into a few, confirm they’re really unused, and delete them with one click.&lt;/p&gt;

&lt;p&gt;Run tests; if something breaks, undo is one shortcut away.&lt;/p&gt;

&lt;p&gt;Mention that this pairs nicely with mapping: you can run the analysis after mapping a feature, or before a big refactor, to slim down the surface area.&lt;/p&gt;

&lt;h2&gt;
  
  
  Section 5 – Close with a clear CTA
&lt;/h2&gt;

&lt;p&gt;End with a short, direct invitation:&lt;/p&gt;

&lt;p&gt;Ask readers to run Codur on a “scary” legacy repo and share how much dead code it finds.&lt;/p&gt;

&lt;p&gt;Offer to write a follow‑up post with deeper implementation details (how you layered on the TypeScript LS, heuristics, confidence scoring, etc.) if there’s interest.&lt;/p&gt;

</description>
      <category>codequality</category>
      <category>productivity</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>I stopped reading code and started mapping it (and it saved my sanity)</title>
      <dc:creator>The Living Algorithms</dc:creator>
      <pubDate>Sat, 27 Dec 2025 06:16:56 +0000</pubDate>
      <link>https://dev.to/thelivingalgorithms/i-stopped-reading-code-and-started-mapping-it-and-it-saved-my-sanity-2fdb</link>
      <guid>https://dev.to/thelivingalgorithms/i-stopped-reading-code-and-started-mapping-it-and-it-saved-my-sanity-2fdb</guid>
      <description>&lt;p&gt;I was onboarding onto a codebase I didn’t write.&lt;/p&gt;

&lt;p&gt;It wasn’t terrible code.&lt;br&gt;
It wasn’t great either.&lt;br&gt;
It was just… big.&lt;/p&gt;

&lt;p&gt;Multiple folders, shared utilities, functions calling other functions across files. Nothing unusual, just the kind of project that accumulates over a few years.&lt;/p&gt;

&lt;p&gt;I ran into a familiar problem almost immediately.&lt;/p&gt;

&lt;p&gt;I wanted to change a function, but before touching it I needed to answer one question:&lt;/p&gt;

&lt;p&gt;“What else depends on this?”&lt;/p&gt;

&lt;p&gt;I started the usual way.&lt;/p&gt;

&lt;p&gt;Go to definition.&lt;br&gt;
Jump to another file.&lt;br&gt;
Search for usages.&lt;br&gt;
Open more tabs.&lt;/p&gt;

&lt;p&gt;After a while, I had context, but it was fragile. If I took a break or switched tasks, I’d have to rebuild that understanding again.&lt;/p&gt;

&lt;p&gt;That’s when it hit me:&lt;br&gt;
I wasn’t struggling with the code itself.&lt;br&gt;
I was struggling to hold the structure in my head.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading code works — until the system gets large
&lt;/h2&gt;

&lt;p&gt;Line-by-line reading is fine for small modules.&lt;/p&gt;

&lt;p&gt;But once a project grows, most of the difficulty isn’t inside individual functions. It’s in the relationships:&lt;/p&gt;

&lt;p&gt;Which functions call which&lt;/p&gt;

&lt;p&gt;Where logic fans out&lt;/p&gt;

&lt;p&gt;Which files quietly become central over time&lt;/p&gt;

&lt;p&gt;We usually handle this by:&lt;/p&gt;

&lt;p&gt;Keeping mental maps&lt;/p&gt;

&lt;p&gt;Drawing quick diagrams&lt;/p&gt;

&lt;p&gt;Relying on “experience” to feel our way through changes&lt;/p&gt;

&lt;p&gt;That works… until it doesn’t.&lt;/p&gt;

&lt;p&gt;Mental maps don’t scale.&lt;br&gt;
And diagrams go stale almost immediately.&lt;/p&gt;

&lt;p&gt;I kept wishing for a way to just see the structure of a file instead of reconstructing it every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: the map should come from the code
&lt;/h2&gt;

&lt;p&gt;I tried sketching things manually.&lt;br&gt;
It helped, but only temporarily.&lt;/p&gt;

&lt;p&gt;I looked at existing visualization tools, but most of them required leaving the editor or exporting code. That friction meant I never used them consistently.&lt;/p&gt;

&lt;p&gt;The conclusion was simple:&lt;/p&gt;

&lt;p&gt;If a map is going to be useful, it has to be:&lt;/p&gt;

&lt;p&gt;Generated directly from the code&lt;/p&gt;

&lt;p&gt;Always up to date&lt;/p&gt;

&lt;p&gt;Available inside the editor&lt;/p&gt;

&lt;p&gt;That’s where Codur came from.&lt;/p&gt;

&lt;p&gt;Not as a product idea, just as something I wanted while working.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Codur actually does
&lt;/h2&gt;

&lt;p&gt;Codur is a VS Code extension that generates a visual map of a file’s structure.&lt;/p&gt;

&lt;p&gt;It focuses on:&lt;/p&gt;

&lt;p&gt;Function relationships&lt;/p&gt;

&lt;p&gt;Call flow within a file&lt;/p&gt;

&lt;p&gt;How logic connects at a glance&lt;/p&gt;

&lt;p&gt;It doesn’t try to explain why the code exists or how to design better architecture. It just answers a simpler question:&lt;/p&gt;

&lt;p&gt;“What’s going on here, structurally?”&lt;/p&gt;

&lt;p&gt;Under the hood, it uses AST parsing, not regex, so it understands real scope and function relationships instead of guessing from text.&lt;/p&gt;

&lt;p&gt;The result isn’t a perfect diagram.&lt;br&gt;
But it’s accurate enough to orient yourself quickly.&lt;/p&gt;

&lt;p&gt;That’s the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete example
&lt;/h2&gt;

&lt;p&gt;I tested Codur on a file that was around a few hundred lines long.&lt;/p&gt;

&lt;p&gt;Nothing scary — just dense.&lt;/p&gt;

&lt;p&gt;Looking at the map immediately showed me:&lt;/p&gt;

&lt;p&gt;One function acting as a hub&lt;/p&gt;

&lt;p&gt;Several helper functions that were purely internal&lt;/p&gt;

&lt;p&gt;A couple of calls that were more important than they looked in the code&lt;/p&gt;

&lt;p&gt;That saved me time because I knew where not to look.&lt;/p&gt;

&lt;p&gt;Instead of reading everything, I could focus on the parts that actually mattered for the change I wanted to make.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building it was harder than I expected
&lt;/h2&gt;

&lt;p&gt;VS Code extensions look simple from the outside.&lt;/p&gt;

&lt;p&gt;They’re not.&lt;/p&gt;

&lt;p&gt;Webviews have their own lifecycle issues.&lt;br&gt;
State can disappear unexpectedly.&lt;br&gt;
Performance matters more than you think — parsing on every keystroke is not an option.&lt;/p&gt;

&lt;p&gt;Most of the work went into:&lt;/p&gt;

&lt;p&gt;Making updates predictable&lt;/p&gt;

&lt;p&gt;Avoiding unnecessary re-parsing&lt;/p&gt;

&lt;p&gt;Keeping the editor responsive&lt;/p&gt;

&lt;p&gt;None of this is particularly glamorous, but it’s what made the extension usable instead of annoying.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Codur is (and isn’t)
&lt;/h2&gt;

&lt;p&gt;Codur is not:&lt;/p&gt;

&lt;p&gt;A replacement for reading code&lt;/p&gt;

&lt;p&gt;A documentation generator&lt;/p&gt;

&lt;p&gt;A magic fix for messy architecture&lt;/p&gt;

&lt;p&gt;It is:&lt;/p&gt;

&lt;p&gt;A way to quickly understand structure&lt;/p&gt;

&lt;p&gt;A tool for reducing cognitive load&lt;/p&gt;

&lt;p&gt;Helpful when you’re working in unfamiliar or large files&lt;/p&gt;

&lt;p&gt;I use it when I want to get oriented fast, not when I want deep semantic understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I’m sharing this
&lt;/h2&gt;

&lt;p&gt;Codur is still early.&lt;/p&gt;

&lt;p&gt;I’m sharing it because I’ve found it useful in my own work, and I’m curious whether it helps other people dealing with similar problems.&lt;/p&gt;

&lt;p&gt;If you regularly work in large or unfamiliar codebases, this might be worth trying, even if it only helps with initial orientation.&lt;/p&gt;

&lt;p&gt;It’s free, and I’m actively looking for feedback, especially cases where the visualization doesn’t help, feels misleading, or breaks down on real-world code.&lt;/p&gt;

&lt;p&gt;VS Code Marketplace:&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=thelivingalgorithms.codur" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=thelivingalgorithms.codur&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Repository:&lt;br&gt;
&lt;a href="https://github.com/thelivingalgorithms/Codur_VsCode_Extension" rel="noopener noreferrer"&gt;https://github.com/thelivingalgorithms/Codur_VsCode_Extension&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
