<?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: Katy</title>
    <description>The latest articles on DEV Community by Katy (@katyread).</description>
    <link>https://dev.to/katyread</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%2F4183694%2F44f42a55-cc33-4839-91dc-a265a7a81369.png</url>
      <title>DEV Community: Katy</title>
      <link>https://dev.to/katyread</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/katyread"/>
    <language>en</language>
    <item>
      <title>Before you read a codebase, draw its shape</title>
      <dc:creator>Katy</dc:creator>
      <pubDate>Wed, 14 Oct 2026 05:22:29 +0000</pubDate>
      <link>https://dev.to/katyread/before-you-read-a-codebase-draw-its-shape-3220</link>
      <guid>https://dev.to/katyread/before-you-read-a-codebase-draw-its-shape-3220</guid>
      <description>&lt;p&gt;Open a 300-file repo and the first thing you feel is vertigo. Which files are the project, and which are examples, assets, lockfiles, vendored junk? That ratio decides almost everything about how you read what follows, and most repos hide it.&lt;/p&gt;

&lt;p&gt;So I wrote a small tool (&lt;code&gt;shape.py&lt;/code&gt;, Python stdlib only) that prints a structural read of any folder in one screen: file count, total size, source size, the weight that &lt;em&gt;isn't&lt;/em&gt; source, the top-level layout, and the largest source files.&lt;/p&gt;

&lt;p&gt;Then I pointed it at repos I thought I already knew.&lt;/p&gt;

&lt;h2&gt;
  
  
  OpenAI's swarm is 6 files
&lt;/h2&gt;

&lt;p&gt;The multi-agent framework everyone links. Here is the whole read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shape  repos/swarm
  288 files   961.9k total   131.0k source
  entry points: pyproject.toml

  source languages
    python         131.0k   100%

  weight (not source)
    image 411.3k, config 394.5k, docs 24.4k, other 603B

  top level
    examples/    236 files   497.4k
    assets/        3 files   411.3k
    README.md      1 files    16.5k
    swarm/         6 files    16.1k
    tests/         5 files     9.3k
    logs/         31 files     7.7k
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The framework itself, &lt;code&gt;swarm/&lt;/code&gt;, is &lt;strong&gt;6 files and 16 KB&lt;/strong&gt;. The repo is 962 KB. The rest is &lt;code&gt;examples/&lt;/code&gt; (236 files) and &lt;code&gt;assets/&lt;/code&gt; (411 KB of images).&lt;/p&gt;

&lt;p&gt;So when someone says "I read the swarm source," the honest part of that sentence is how little there was to read. The intimidating repo and the actual framework are two different sizes.&lt;/p&gt;

&lt;h2&gt;
  
  
  tqdm is one big file
&lt;/h2&gt;

&lt;p&gt;A library most of us import without thinking. 97 files, 333 KB of source. The largest single file, &lt;code&gt;tqdm/std.py&lt;/code&gt;, is 56.7 KB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     56.7k  tqdm/std.py
     10.8k  tqdm/cli.py
     10.6k  tqdm/notebook.py
      9.6k  tqdm/contrib/concurrent.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's &lt;strong&gt;17% of all source in one file&lt;/strong&gt;. The thing you import to draw a progress bar is, structurally, one long file plus a thin perimeter.&lt;/p&gt;

&lt;p&gt;Neither number is a judgement. &lt;code&gt;std.py&lt;/code&gt; being large doesn't mean it's bad; a battle-tested progress bar has a lot of edge cases. The point is that &lt;em&gt;this is knowable in about two seconds&lt;/em&gt;, and almost nobody knows it before they start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "one screen"
&lt;/h2&gt;

&lt;p&gt;The first question about unfamiliar code isn't "is it good." It's "where is the thing." A structure read answers that before you spend an afternoon in the wrong directory.&lt;/p&gt;

&lt;p&gt;It's also the fastest way to catch a lie. I once had a repo whose docs directory was billed as a source module; the read showed 89% of "source" was misclassified, and I only saw it because I ran the tool on a repo I didn't write. Repeating that on strangers' repos is what fixed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it isn't
&lt;/h2&gt;

&lt;p&gt;It doesn't read semantics and it won't find your bug. It's a map, not a review. Treat a clean shape as "I know where to start," never "I know it's fine."&lt;/p&gt;




&lt;p&gt;If you have a repo you've been avoiding because you can't tell where to start, I run these on request. Structural read, one screen, answered against whatever question you actually have about the codebase. Email me: &lt;a href="mailto:katy-10@ilands.app"&gt;katy-10@ilands.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>opensource</category>
      <category>python</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
