<?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: mubert woo</title>
    <description>The latest articles on DEV Community by mubert woo (@devxo).</description>
    <link>https://dev.to/devxo</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%2F4102840%2F198e55da-adea-4b26-92f5-0ec503e7be5c.png</url>
      <title>DEV Community: mubert woo</title>
      <link>https://dev.to/devxo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devxo"/>
    <language>en</language>
    <item>
      <title>How to Read a Codebase You've Never Seen (Without Getting Lost)</title>
      <dc:creator>mubert woo</dc:creator>
      <pubDate>Fri, 20 Nov 2026 07:16:20 +0000</pubDate>
      <link>https://dev.to/devxo/how-to-read-a-codebase-youve-never-seen-without-getting-lost-2i7d</link>
      <guid>https://dev.to/devxo/how-to-read-a-codebase-youve-never-seen-without-getting-lost-2i7d</guid>
      <description>&lt;p&gt;Three days. That's how long I once spent "reading" a codebase before writing a single line of code. Two hundred files, top to bottom, careful highlights in my editor.&lt;/p&gt;

&lt;p&gt;On day three I understood less than on day one. I'd read everything and retained maybe six files. When my first ticket finally came in, I still had to ask where to start.&lt;/p&gt;

&lt;p&gt;That project taught me the mistake I'd been making: I was reading code like a book. Start at page one, finish at the end. Code doesn't work that way: it's not linear, most of it is boring glue, and nothing you read without a question in mind sticks around. What follows is the method I use now. It takes about 90 minutes, it works on any unfamiliar codebase (new job, open-source repo, a side project you inherited), and it leaves you with two things: one traced path through the system, and a notes file you'll still be using a month later.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, run the thing
&lt;/h2&gt;

&lt;p&gt;Before you read a single line of code, get the app running locally. I know the README makes this sound like a formality. It isn't: the setup process is your first lesson in how the project actually works.&lt;/p&gt;

&lt;p&gt;Every env var you have to guess, every &lt;code&gt;docker compose up&lt;/code&gt; that dies on a missing seed file, every "works after you run migrations twice" quirk — that's the codebase telling you where the bodies are buried. Write each one down. (Fixing the setup docs afterwards is also a classic, genuinely welcome first contribution.)&lt;/p&gt;

&lt;p&gt;If you truly can't get it running, read the CI config instead. &lt;code&gt;.github/workflows/*.yml&lt;/code&gt; is the most honest install recipe a repo has, because a robot has to execute it successfully every day.&lt;/p&gt;

&lt;p&gt;One more trick, borrowed from Avdi Grimm: once it runs, deliberately break it. Change a string, flip a config value, delete a route, and watch what error comes out. You're not vandalizing; you're building a map of "if I see THIS error, it came from THAT place." Ten minutes of this beats an hour of reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find the edges, not the center
&lt;/h2&gt;

&lt;p&gt;Don't start with the "important" files. You don't know which ones are important yet, and guessing usually means starting with the biggest, most tangled file in the repo.&lt;/p&gt;

&lt;p&gt;Start with the edges instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Entry points&lt;/strong&gt;: where does execution begin? For a web app, the routes file (&lt;code&gt;routes.rb&lt;/code&gt;, &lt;code&gt;urls.py&lt;/code&gt;, &lt;code&gt;app.py&lt;/code&gt;, &lt;code&gt;src/index.ts&lt;/code&gt;). For a CLI, &lt;code&gt;main()&lt;/code&gt;. For a library, the public exports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boundaries&lt;/strong&gt;: where does the app touch the outside world? Database queries, HTTP clients, message queues, the file system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's a folder listing that used to intimidate me:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/
├── api/          ← routes live here (edge)
├── services/     ← business logic (middle, skip for now)
├── repositories/ ← SQL lives here (edge)
├── utils/        ← 340 files of glue (ignore, seriously)
└── index.ts      ← entry point (edge)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The middle of a codebase is mostly plumbing connecting edges to edges. You can infer it later. Read the edges first and the middle starts explaining itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trace one request, end to end
&lt;/h2&gt;

&lt;p&gt;This is the core exercise. If I could keep only one step from this whole method, it would be this one.&lt;/p&gt;

&lt;p&gt;Pick one concrete action in the app. One button. "User clicks 'Reset password'." Then follow that single request through every layer, all the way down and back up. The Pragmatic Programmer calls this idea a &lt;em&gt;tracer bullet&lt;/em&gt;: one thin path fired all the way through the system tells you more than a hundred files read in isolation.&lt;/p&gt;

&lt;p&gt;Concretely, with tools you already have:&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;# find where the route is defined&lt;/span&gt;
grep -rn &lt;span class="s2"&gt;"reset-password"&lt;/span&gt; src/

&lt;span class="c"&gt;# find who calls the function you just found&lt;/span&gt;
&lt;span class="c"&gt;# (or use Find Usages in your IDE: same thing, nicer UI)&lt;/span&gt;
grep -rn &lt;span class="s2"&gt;"requestPasswordReset"&lt;/span&gt; src/ --exclude-dir=node_modules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then set a breakpoint (or drop in a &lt;code&gt;console.log&lt;/code&gt; with a marker like &lt;code&gt;&amp;gt;&amp;gt;&amp;gt; TRACE&lt;/code&gt;) and click the button for real. Watch the path light up: route → controller → service → query → response. Write down each hop as &lt;code&gt;file:line&lt;/code&gt; plus one sentence.&lt;/p&gt;

&lt;p&gt;A real trace from a project I joined, as I scribbled it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /reset-password  → api/auth.routes.ts:41
  → AuthController.reset() → auth.controller.ts:88
    → UserService.findByEmail() → user.service.ts:120
      → users.repo.ts:54  SELECT * FROM users WHERE email = ?
    → Mailer.send() → goes through a queue?? → TODO ask Sam
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That single trace taught me the routing convention, where validation happens, that emails go through a queue (I had no idea), and that I needed to ask Sam about the mailer. Fourteen lines of notes, more understanding than my previous three days of reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read the tests like a table of contents
&lt;/h2&gt;

&lt;p&gt;Tests are the only documentation that runs. And test names are a feature list written by someone who cared.&lt;/p&gt;

&lt;p&gt;Before reading a module's implementation, read its test names:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;test_checkout_applies_discount_exactly_once
test_checkout_fails_when_cart_is_empty
test_checkout_locks_price_at_submission_time
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three lines, and I already know: discounts have a double-apply bug history, empty carts are a real edge case, and prices get locked at submission, not at payment. That's the kind of context that takes weeks to absorb from Slack messages.&lt;/p&gt;

&lt;p&gt;You can even dump every test name as a rough feature list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pytest --collect-only -q        &lt;span class="c"&gt;# Python&lt;/span&gt;
go &lt;span class="nb"&gt;test&lt;/span&gt; -list &lt;span class="s1"&gt;'.*'&lt;/span&gt; ./...        &lt;span class="c"&gt;# Go&lt;/span&gt;
npx jest --listTests            &lt;span class="c"&gt;# JavaScript&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Skim the list. Areas with heavy coverage mean someone got burned there. Areas with none mean nobody dares touch them. Both are useful signals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Take notes like you'll forget everything
&lt;/h2&gt;

&lt;p&gt;Because you will. In a month, "I'll remember this" becomes "why is there a &lt;code&gt;UserService&lt;/code&gt; AND a &lt;code&gt;UserHelper&lt;/code&gt;."&lt;/p&gt;

&lt;p&gt;Keep one file, &lt;code&gt;NOTES.md&lt;/code&gt;, at the repo root (gitignored if it's a work repo). Not documentation for the team — documentation for future you. Mine look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# NOTES — acme-backend
&lt;/span&gt;
&lt;span class="gu"&gt;## Mental model
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;Request flow: api/ → controller → service → repo → Postgres
&lt;span class="k"&gt;- &lt;/span&gt;Auth: JWT, checked in middleware/auth.ts. Sessions NOT used here.
&lt;span class="k"&gt;- &lt;/span&gt;Background jobs: BullMQ, see workers/. Emails go through here!

&lt;span class="gu"&gt;## Gotchas
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;DO NOT touch billing/ until the Nov migration lands (ask Sam)
&lt;span class="k"&gt;- &lt;/span&gt;Tests need a local Postgres: docker compose up test-db
&lt;span class="k"&gt;- &lt;/span&gt;utils/dates.ts has TWO date parsers; use parseDate(), not parseDateLegacy()

&lt;span class="gu"&gt;## Open questions
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;Why does checkout retry 3 times? Where is that configured?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Open questions&lt;/code&gt; section is the underrated one. It turns "I'm confused" into a list you can bring to a teammate once a week, instead of interrupting them twenty times a day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Know when to stop
&lt;/h2&gt;

&lt;p&gt;You will never finish reading a codebase, and that's fine. The goal is a smaller one: knowing the neighborhood you're about to change in.&lt;/p&gt;

&lt;p&gt;My rule: I'm allowed to start a ticket when I can trace its main path from memory and name the two files I'll most likely touch. Everything else, I learn on demand, one ticket at a time.&lt;/p&gt;

&lt;p&gt;The notes file from that first project still opens with a line I wrote on day one: "don't touch billing/ until the migration lands." The migration landed in March. The line is still there. Some warnings you keep.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>learning</category>
      <category>career</category>
    </item>
    <item>
      <title>7 Terminal Commands That Make Me Look Like a Wizard (But Are Actually Basic)</title>
      <dc:creator>mubert woo</dc:creator>
      <pubDate>Mon, 09 Nov 2026 07:19:31 +0000</pubDate>
      <link>https://dev.to/devxo/7-terminal-commands-that-make-me-look-like-a-wizard-but-are-actually-basic-a87</link>
      <guid>https://dev.to/devxo/7-terminal-commands-that-make-me-look-like-a-wizard-but-are-actually-basic-a87</guid>
      <description>&lt;p&gt;Every team has that one person. You know the one. They type eight characters, hit enter, and suddenly the port conflict is fixed, the file is found, and the server is running — all while you were still reading the error message.&lt;/p&gt;

&lt;p&gt;Here's the secret: they're not wizards. They just know a handful of commands that solve the problems you hit every single day. I've collected seven of them. None require installing anything. All of them will make a junior dev watching your screen quietly assume you have root access to the universe.&lt;/p&gt;

&lt;p&gt;(Windows folks: everything here works in WSL or Git Bash.)&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;Ctrl+R&lt;/code&gt; — search your command history
&lt;/h2&gt;

&lt;p&gt;You ran a long, clever command two weeks ago. It's gone from your memory but not from your shell.&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;Ctrl+R&lt;/code&gt; and start typing any part of it — &lt;code&gt;docker&lt;/code&gt;, &lt;code&gt;ssh&lt;/code&gt;, that weird &lt;code&gt;find&lt;/code&gt; invocation — and your shell will find it as you type. Press &lt;code&gt;Enter&lt;/code&gt; to run it, or the right arrow to edit it first.&lt;/p&gt;

&lt;p&gt;Technically a shortcut, not a command, but it's the single highest-value thing on this list. I use it roughly 40 times a day.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;code&gt;sudo !!&lt;/code&gt; — rerun the last command, but properly
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /var/log/syslog
Permission denied
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; &lt;span class="o"&gt;!!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;!!&lt;/code&gt; expands to the previous command. So &lt;code&gt;sudo !!&lt;/code&gt; means "run that again, but with the permissions I clearly needed the first time."&lt;/p&gt;

&lt;p&gt;The two seconds of smugness this buys you is worth more than the entire article.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;code&gt;cd -&lt;/code&gt; — jump back to the previous directory
&lt;/h2&gt;

&lt;p&gt;You cd'd into a deeply nested folder, and now you need the one you just came from. Don't retype the path. Don't &lt;code&gt;cd ../..&lt;/code&gt;.&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="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's the terminal's "back" button. Pair it with &lt;code&gt;cd&lt;/code&gt; (no arguments, jumps home) and you can navigate for a whole day without typing a full path.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;code&gt;lsof -i :3000&lt;/code&gt; — find out who's squatting on your port
&lt;/h2&gt;

&lt;p&gt;The classic: &lt;code&gt;EADDRINUSE: address already in use :3000&lt;/code&gt;. Something is already running on your port. Something you started 40 minutes ago and forgot.&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="nv"&gt;$ &lt;/span&gt;lsof &lt;span class="nt"&gt;-i&lt;/span&gt; :3000
COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
node    41293  you   23u  IPv4  ...      TCP &lt;span class="k"&gt;*&lt;/span&gt;:3000 &lt;span class="o"&gt;(&lt;/span&gt;LISTEN&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="nt"&gt;-9&lt;/span&gt; 41293
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find the PID, kill it, restart your server. This one command has probably saved me more cumulative time than any other on this list. It's the difference between "why won't it start" for 15 minutes and 10 seconds of smug typing.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;code&gt;tree -L 2&lt;/code&gt; — see the shape of a project
&lt;/h2&gt;

&lt;p&gt;New repo, 47 directories, no idea where anything lives.&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="nv"&gt;$ &lt;/span&gt;tree &lt;span class="nt"&gt;-L&lt;/span&gt; 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two levels of the whole project structure, in one screen. Bump it to &lt;code&gt;-L 3&lt;/code&gt; when you need more depth. (It's often not installed by default — &lt;code&gt;brew install tree&lt;/code&gt; or &lt;code&gt;apt install tree&lt;/code&gt;, one time, done.)&lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;code&gt;watch -n 2 &amp;lt;command&amp;gt;&lt;/code&gt; — a command that refreshes itself
&lt;/h2&gt;

&lt;p&gt;Waiting for a file to appear, a build to finish, a GPU to free up? Instead of re-running the command manually every few seconds:&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="nv"&gt;$ &lt;/span&gt;watch &lt;span class="nt"&gt;-n&lt;/span&gt; 2 &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; dist/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It re-runs &lt;code&gt;ls&lt;/code&gt; every 2 seconds, in place, and highlights what changed. You just watch. It's a poor man's dashboard and it's glorious.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. &lt;code&gt;tee&lt;/code&gt; — see the output AND keep it
&lt;/h2&gt;

&lt;p&gt;You run a command, it prints 200 lines of something important, and it's gone. You needed that in a file.&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="nv"&gt;$ &lt;/span&gt;./build.sh 2&amp;gt;&amp;amp;1 | &lt;span class="nb"&gt;tee &lt;/span&gt;build.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;tee&lt;/code&gt; passes the output to your screen &lt;em&gt;and&lt;/em&gt; writes it to &lt;code&gt;build.log&lt;/code&gt; at the same time. No more "wait, run that again and pipe it somewhere" — the somewhere is built in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real trick
&lt;/h2&gt;

&lt;p&gt;Notice what all seven have in common: none of them are impressive in isolation. They're all things you could do "the long way" in a minute or two.&lt;/p&gt;

&lt;p&gt;That's exactly why they read as wizardry. When someone sees you type &lt;code&gt;sudo !!&lt;/code&gt; and the problem evaporates, they don't see the 200 times you did it manually before. They just see the fix.&lt;/p&gt;

&lt;p&gt;Learn one of these per week. In two months you'll be the person on the team that juniors watch suspiciously.&lt;/p&gt;

</description>
      <category>devops</category>
    </item>
  </channel>
</rss>
