<?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: lingxin wang</title>
    <description>The latest articles on DEV Community by lingxin wang (@lingxin_wang_3b88f34b4014).</description>
    <link>https://dev.to/lingxin_wang_3b88f34b4014</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%2F3767832%2Faeda034c-cfde-4405-91ec-a3bc5a555c5a.png</url>
      <title>DEV Community: lingxin wang</title>
      <link>https://dev.to/lingxin_wang_3b88f34b4014</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lingxin_wang_3b88f34b4014"/>
    <language>en</language>
    <item>
      <title>When AI Learns To Think</title>
      <dc:creator>lingxin wang</dc:creator>
      <pubDate>Thu, 16 Apr 2026 00:44:00 +0000</pubDate>
      <link>https://dev.to/lingxin_wang_3b88f34b4014/when-ai-learns-to-think-3ac9</link>
      <guid>https://dev.to/lingxin_wang_3b88f34b4014/when-ai-learns-to-think-3ac9</guid>
      <description>&lt;h1&gt;
  
  
  AI's Biggest Advantage Isn't Being Smart
&lt;/h1&gt;




&lt;h2&gt;
  
  
  A Counterintuitive Observation
&lt;/h2&gt;

&lt;p&gt;What do you think is AI Agent's biggest advantage?&lt;/p&gt;

&lt;p&gt;Most people would say: intelligence. Can write code, understand complex problems, process massive information.&lt;/p&gt;

&lt;p&gt;I've been working on an Agent project, and I've noticed something different:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AI Agent's biggest advantage isn't being smart — it's &lt;strong&gt;being able to adjust&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me explain what I mean.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two Types of Coaches
&lt;/h2&gt;

&lt;p&gt;Imagine two basketball coaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coach A&lt;/strong&gt; is a tactical master. Before the game, he creates a detailed playbook: first quarter fast breaks, second quarter slow pace, third quarter focus on defending their #23... all planned out.&lt;/p&gt;

&lt;p&gt;Problem is: once the game starts, the opponent plays differently than expected. His playbook becomes useless paper, but he sticks to the original plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coach B&lt;/strong&gt; also prepares before games, but differently. He &lt;strong&gt;adjusts in real-time&lt;/strong&gt; based on what's happening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Their #23 is having an off night? Increase offensive pressure&lt;/li&gt;
&lt;li&gt;Our point guard's shot is hot? Give them more touches&lt;/li&gt;
&lt;li&gt;Down in the third quarter? Call timeout, new strategy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;He has a plan but isn't enslaved by it.&lt;/p&gt;

&lt;p&gt;AI Agent is more like Coach B.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Agent "Thinks"
&lt;/h2&gt;

&lt;p&gt;In my project I've been studying Agent thinking patterns. There are mainly two:&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern One: Small Fast Steps (ReAct)
&lt;/h3&gt;

&lt;p&gt;This is the "walk and see" mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Observe → Think → Act → Observe → Think → Act → ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each step is short. Agent gets a bit of information, makes a small decision, sees the result, adjusts.&lt;/p&gt;

&lt;p&gt;Like a coach observing from the sideline: ball moved to the right, center is open, yell "post up!" Next possession situation changes, make a new call.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern Two: Plan Then Execute
&lt;/h3&gt;

&lt;p&gt;This is the "draw the roadmap first" mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create plan → Execute step 1 → Execute step 2 → ... → Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agent breaks the task into steps, creates a checklist, executes sequentially.&lt;/p&gt;

&lt;p&gt;Like pregame tactics: first half focus on defense, second half push offense. A general direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Practice, It's Both
&lt;/h3&gt;

&lt;p&gt;Mature Agent frameworks &lt;strong&gt;combine&lt;/strong&gt; both modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start with Plan mode to break down the task, get general direction&lt;/li&gt;
&lt;li&gt;Within each subtask, use ReAct for flexibility&lt;/li&gt;
&lt;li&gt;If mid-course you find the plan has problems, re-Plan&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's what great coaches do: have the whiteboard pregame, improvise during play, call timeout to adjust strategy when needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Matters for Technical Decisions
&lt;/h2&gt;

&lt;p&gt;From a management perspective, this thinking pattern has important implications:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. AI Won't Just Barrel Down One Path
&lt;/h3&gt;

&lt;p&gt;Traditional programs are deterministic: input A, always output B. If the logic is wrong, it stays wrong forever.&lt;/p&gt;

&lt;p&gt;Agents are different. They &lt;strong&gt;adjust strategy based on intermediate results&lt;/strong&gt;. First step went wrong? See the feedback, second step can correct.&lt;/p&gt;

&lt;p&gt;This means: in high-uncertainty scenarios (data analysis, user interaction), Agents might be more reliable than hardcoded logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Observability Becomes More Important
&lt;/h3&gt;

&lt;p&gt;Precisely because Agents adjust, you need to know &lt;strong&gt;why they adjusted that way&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every round of "think-act" should have logs. Otherwise when things go wrong, you have no idea what it was thinking.&lt;/p&gt;

&lt;p&gt;Same reason coaching staffs review game film: you need to see what happened at each decision point.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Good "Information Input" Beats Model Optimization
&lt;/h3&gt;

&lt;p&gt;Agent decision quality depends on the information it receives. Give it accurate, timely feedback, it makes better adjustments.&lt;/p&gt;

&lt;p&gt;Like coaches needing good data support: player movement heat maps, shooting percentages, opponent tendencies... More accurate information, more precise adjustments.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Practical Recommendation
&lt;/h2&gt;

&lt;p&gt;If you're considering having your team use Agents:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start from "observable," not from "smart."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Don't rush to see how complex tasks the Agent can handle. First ensure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every round of thinking and acting is logged&lt;/li&gt;
&lt;li&gt;You can replay its decision process&lt;/li&gt;
&lt;li&gt;When errors occur you know which step went wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these, you can tune. Without them, Agent is a black box.&lt;/p&gt;




&lt;h2&gt;
  
  
  Personal Reflection
&lt;/h2&gt;

&lt;p&gt;As someone new to this field right out of school, I've learned more than just technology from this project.&lt;/p&gt;

&lt;p&gt;The ReAct pattern made me think: &lt;strong&gt;small fast steps, rapid iteration.&lt;/strong&gt; Don't try to do it perfectly once. Take one small step, see feedback.&lt;/p&gt;

&lt;p&gt;Plan and Execute made me think: &lt;strong&gt;have the big picture in mind, but stay nimble on the ground.&lt;/strong&gt; Having a plan is good. Being trapped by it isn't.&lt;/p&gt;

&lt;p&gt;Combined: &lt;strong&gt;set direction first, then adjust based on reality.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's not just AI strategy. It's a good approach for projects and career planning.&lt;/p&gt;

&lt;p&gt;I guess that's the bonus from technical learning — studying Agents, but thinking about broader things.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>discuss</category>
    </item>
    <item>
      <title>From Doer To Manager</title>
      <dc:creator>lingxin wang</dc:creator>
      <pubDate>Mon, 06 Apr 2026 20:16:32 +0000</pubDate>
      <link>https://dev.to/lingxin_wang_3b88f34b4014/from-doer-to-manager-1gpa</link>
      <guid>https://dev.to/lingxin_wang_3b88f34b4014/from-doer-to-manager-1gpa</guid>
      <description>&lt;h1&gt;
  
  
  I Had It Completely Backwards
&lt;/h1&gt;




&lt;p&gt;When I started working on this AI Agent project, I fell into a trap.&lt;/p&gt;

&lt;p&gt;I was thinking: how do I teach AI to write SQL?&lt;/p&gt;

&lt;p&gt;I actually started listing rules — "use BETWEEN for dates," "remember JOIN for multi-table queries," "field names use underscores not camelCase"...&lt;/p&gt;

&lt;p&gt;Halfway through I realized something was off. This list would be endless. And honestly, my own SQL wasn't that great. How was I supposed to "teach" an AI?&lt;/p&gt;

&lt;p&gt;Then my mentor said something that clicked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"AI doesn't need you to teach it SQL. It already knows. It knows more than you do."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So where was the problem?&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Problem
&lt;/h2&gt;

&lt;p&gt;The issue wasn't that AI can't write code. The issue was &lt;strong&gt;it didn't know what my database looked like&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It's like a transfer student.&lt;/p&gt;

&lt;p&gt;Their math foundation is solid — they know all the theorems and formulas. But give them a word problem and they're stuck — because they don't know the background. The problem says "distance between A and B is 500 km," they don't know what A and B are. It says "Xiaoming's speed is 60 km/h," they don't know who Xiaoming is.&lt;/p&gt;

&lt;p&gt;AI is the same way.&lt;/p&gt;

&lt;p&gt;You ask it "find all high-risk patients" — it doesn't know what criteria define high-risk. Your database has a &lt;code&gt;risk_level&lt;/code&gt; field, it doesn't know. The values are 'high', 'medium', 'low', it doesn't know that either.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plenty of capability, missing information.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Give It "Background Knowledge" Like a Teacher
&lt;/h2&gt;

&lt;p&gt;Once I understood this, the approach became clear.&lt;/p&gt;

&lt;p&gt;I didn't need to teach AI how to write SQL. I needed to &lt;strong&gt;tell it what my database looks like&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Just like a good teacher doesn't assume students know everything. They provide background first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"A is Beijing, B is Shanghai"&lt;/li&gt;
&lt;li&gt;"Xiaoming rides a bicycle, relatively slow"&lt;/li&gt;
&lt;li&gt;"This problem is about pursuit"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that background, the student can solve it themselves.&lt;/p&gt;

&lt;p&gt;Same with AI. I give it this information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Your database has 11 tables"&lt;/li&gt;
&lt;li&gt;"Patient info is in the &lt;code&gt;patient&lt;/code&gt; table"&lt;/li&gt;
&lt;li&gt;"High-risk marking is in &lt;code&gt;ob_profile.risk_level&lt;/code&gt;, values are 'high' or 'low'"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this, it can write correct SQL on its own.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Pass Information Efficiently
&lt;/h2&gt;

&lt;p&gt;But there's a problem: database structure information is extensive. 11 tables, dozens of fields, each with types, constraints, relationships... writing it all out is thousands of words.&lt;/p&gt;

&lt;p&gt;Give all of it to the AI? You could, but it's wasteful.&lt;/p&gt;

&lt;p&gt;It's like teaching a class. You don't read the entire textbook aloud. You &lt;strong&gt;highlight key points&lt;/strong&gt;: these pages matter, this formula will be on the test, this example is important.&lt;/p&gt;

&lt;p&gt;The code does the same thing.&lt;/p&gt;

&lt;p&gt;Original database definition looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;patient&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;patient_id&lt;/span&gt; &lt;span class="nb"&gt;INTEGER&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&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="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="nb"&gt;INTEGER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="nb"&gt;TIMESTAMP&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="k"&gt;CURRENT_TIMESTAMP&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compressed, it becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;patient(patient_id:int*PK, name:str*NN, age:int, created_at:ts)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No information lost, 70% shorter.&lt;/p&gt;

&lt;p&gt;This is the trick for &lt;strong&gt;giving AI reading comprehension&lt;/strong&gt;: high information density, minimal fluff, clear priorities.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Mindset Shift
&lt;/h2&gt;

&lt;p&gt;After this lesson, I had a significant realization:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The core skill for using AI isn't programming — it's information organization.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before, when I coded, my mindset was "I do it" — I write functions, I call APIs, I debug.&lt;/p&gt;

&lt;p&gt;Now with AI, the mindset needs to shift to "I provide information" — I organize the database structure, clarify business rules, spell out constraints.&lt;/p&gt;

&lt;p&gt;It's like going from student to teacher.&lt;/p&gt;

&lt;p&gt;Students care about "how do I solve this problem." Teachers care about "how do I explain the background so students can solve it themselves."&lt;/p&gt;

&lt;p&gt;Using AI means being the AI's teacher.&lt;/p&gt;




&lt;h2&gt;
  
  
  For People Just Starting Out
&lt;/h2&gt;

&lt;p&gt;If you're also learning AI Agent development, here's what I'd share:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't try to "teach" AI how to do things.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI is smart enough. Most skills it already has. What you need to do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Figure out what information it's missing&lt;/li&gt;
&lt;li&gt;Organize that information into a clear, compact format&lt;/li&gt;
&lt;li&gt;Provide it at the right moment&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This skill will become increasingly important.&lt;/p&gt;

&lt;p&gt;You're not just passing database schema to AI — you'll pass code context, conversation history, business rules. It's all the same thing: &lt;strong&gt;efficiently deliver the information AI needs&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I'm Taking Away
&lt;/h2&gt;

&lt;p&gt;The biggest change from this lesson isn't learning how to extract Schema. It's realizing a role shift:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;From "person who does things" to "person who manages information."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I used to think the core programmer skill was writing code.&lt;/p&gt;

&lt;p&gt;Now I think the core skill in the AI era might be &lt;strong&gt;organizing and transmitting information&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;AI can help write code. But how to organize information, when to provide it, how much to give — those judgments still require humans.&lt;/p&gt;

&lt;p&gt;That's my early-career perspective on "how to work in the AI era."&lt;/p&gt;

&lt;p&gt;Hope it's helpful to others on the same learning path.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>When The Window Opened</title>
      <dc:creator>lingxin wang</dc:creator>
      <pubDate>Mon, 30 Mar 2026 18:38:34 +0000</pubDate>
      <link>https://dev.to/lingxin_wang_3b88f34b4014/when-the-window-opened-k4n</link>
      <guid>https://dev.to/lingxin_wang_3b88f34b4014/when-the-window-opened-k4n</guid>
      <description>&lt;h1&gt;
  
  
  How I Got Stuck on Window Functions for Two Hours
&lt;/h1&gt;




&lt;p&gt;Last week a SQL query had me stuck for two hours.&lt;/p&gt;

&lt;p&gt;The requirement sounded simple: get the &lt;strong&gt;latest&lt;/strong&gt; vital sign record for each patient.&lt;/p&gt;

&lt;p&gt;I knew the data table had multiple records per patient (measured every 4 hours). I just needed the most recent one.&lt;/p&gt;

&lt;p&gt;First instinct: &lt;code&gt;GROUP BY&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Wrote it, ran it, didn't work — &lt;code&gt;GROUP BY&lt;/code&gt; only returns grouped fields and aggregates. The actual values I wanted — blood pressure, heart rate, fetal heart rate — were gone.&lt;/p&gt;

&lt;p&gt;Searched around. Apparently I needed window functions.&lt;/p&gt;

&lt;p&gt;Then I saw this line of code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;ROW_NUMBER&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;admission_id&lt;/span&gt;
    &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;recorded_at&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rn&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stared at it for five minutes. More staring, more confusion.&lt;/p&gt;

&lt;p&gt;What's &lt;code&gt;OVER&lt;/code&gt;? What's &lt;code&gt;PARTITION BY&lt;/code&gt;? Why is there an &lt;code&gt;ORDER BY&lt;/code&gt; inside parentheses?&lt;/p&gt;

&lt;p&gt;I read three tutorials. Every one explained syntax definitions. None of them actually made me understand what was happening.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Journalist's Verification Method
&lt;/h2&gt;

&lt;p&gt;Then I switched approaches.&lt;/p&gt;

&lt;p&gt;A journalist friend once told me about their fact-checking principle: &lt;strong&gt;don't just take someone's word for it — verify it yourself.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a news story says "Company X laid off 50%," you can't just use that. You ask: where's the source? Any internal documents? Can you find an affected employee to confirm?&lt;/p&gt;

&lt;p&gt;Every detail needs to be traceable.&lt;/p&gt;

&lt;p&gt;I figured learning this SQL was the same. Instead of reading explanations, I should &lt;strong&gt;verify&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So I ran an experiment: &lt;strong&gt;delete &lt;code&gt;PARTITION BY&lt;/code&gt; and see what changes.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  One Experiment Solved the Mystery
&lt;/h2&gt;

&lt;p&gt;SQL without &lt;code&gt;PARTITION BY&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;ROW_NUMBER&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;recorded_at&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rn&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;vital_signs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ran it — the entire table's records got numbered sequentially. 1, 2, 3, 4... all the way to the end.&lt;/p&gt;

&lt;p&gt;Added &lt;code&gt;PARTITION BY&lt;/code&gt; back and ran again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;ROW_NUMBER&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;admission_id&lt;/span&gt;
    &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;recorded_at&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rn&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;vital_signs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time each patient's records were &lt;strong&gt;numbered separately&lt;/strong&gt;. Patient A: 1, 2, 3. Patient B: also 1, 2, 3. Independent.&lt;/p&gt;

&lt;p&gt;Comparing the two results, I immediately understood:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;PARTITION BY&lt;/code&gt; is saying — slice the table into separate windows, number within each window.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like a journalist fact-checking multiple sources: you don't mix all information together and sort. You group by source, then sort by time within each group.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Tutorials Didn't Work
&lt;/h2&gt;

&lt;p&gt;Looking back, why didn't those tutorials help?&lt;/p&gt;

&lt;p&gt;Because they were &lt;strong&gt;telling me definitions&lt;/strong&gt; instead of &lt;strong&gt;letting me verify&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;"PARTITION BY divides the result set into partitions" — syntactically correct, but meaningless to me.&lt;/p&gt;

&lt;p&gt;What actually made me understand was: I &lt;strong&gt;saw&lt;/strong&gt; the difference between having and not having &lt;code&gt;PARTITION BY&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It's like fact-checking a story: you can read ten reposts all saying "Company X laid off 50%," but you're still not sure. Until you get the internal memo or interview someone affected, you can't really say "I know."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verified knowledge is the only knowledge you truly own.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  A Useful Learning Pattern
&lt;/h2&gt;

&lt;p&gt;From this experience, I've extracted a learning pattern:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with a real problem&lt;/strong&gt; — not "I want to learn window functions," but "I need to get each patient's latest record"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When stuck, design an experiment&lt;/strong&gt; — change one variable, see what differs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify by comparison&lt;/strong&gt; — let facts speak, don't just trust explanations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write conclusions in your own words&lt;/strong&gt; — not copied from tutorials&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This method works beyond SQL. Any technical concept — if you only read without verifying, you stay in the "kind of get it" state forever.&lt;/p&gt;

&lt;p&gt;Run it yourself. Change parameters. See results. &lt;strong&gt;Ten minutes of experimentation beats an hour of reading tutorials.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  For Fellow Engineers
&lt;/h2&gt;

&lt;p&gt;If you're stuck on some technical concept, try this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write a minimal example&lt;/li&gt;
&lt;li&gt;Delete the part you don't understand, see what changes&lt;/li&gt;
&lt;li&gt;Add it back, compare both results&lt;/li&gt;
&lt;li&gt;Summarize for yourself: what is this thing actually doing?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sounds dumb, but it's effective.&lt;/p&gt;

&lt;p&gt;Journalists don't fact-check by being clever — they do it with &lt;strong&gt;patience and method&lt;/strong&gt;. Learning tech is the same.&lt;/p&gt;




&lt;h2&gt;
  
  
  Postscript
&lt;/h2&gt;

&lt;p&gt;I've since used this method to understand several other concepts that were fuzzy before: the difference between &lt;code&gt;OUTER JOIN&lt;/code&gt; and &lt;code&gt;INNER JOIN&lt;/code&gt;, &lt;code&gt;HAVING&lt;/code&gt; vs &lt;code&gt;WHERE&lt;/code&gt;, CTEs vs subqueries...&lt;/p&gt;

&lt;p&gt;Same pattern every time: minimal example, change one variable, compare results.&lt;/p&gt;

&lt;p&gt;Probably the most practical learning technique I've picked up from this project.&lt;/p&gt;

&lt;p&gt;Sharing it with fellow engineers still being tortured by various syntax concepts.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>devjournal</category>
      <category>sql</category>
    </item>
    <item>
      <title>One File Eleven Tables</title>
      <dc:creator>lingxin wang</dc:creator>
      <pubDate>Mon, 23 Mar 2026 18:30:16 +0000</pubDate>
      <link>https://dev.to/lingxin_wang_3b88f34b4014/one-file-eleven-tables-2cg3</link>
      <guid>https://dev.to/lingxin_wang_3b88f34b4014/one-file-eleven-tables-2cg3</guid>
      <description>&lt;p&gt;Live Demo &lt;a href="https://obnexus.vercel.app/" rel="noopener noreferrer"&gt;https://obnexus.vercel.app/&lt;/a&gt;, GitHub &lt;a href="https://github.com/Isaac-aiai/obnexus-project" rel="noopener noreferrer"&gt;https://github.com/Isaac-aiai/obnexus-project&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Organizing Data Like Filing Case Documents
&lt;/h1&gt;




&lt;p&gt;Centuries ago, courts faced a problem: too many case files.&lt;/p&gt;

&lt;p&gt;A single case might involve plaintiffs, defendants, witnesses, physical evidence, testimonies, judgments... pile it all together and finding anything takes forever. Eventually people learned to categorize: personnel go in personnel volumes, evidence in evidence volumes, testimonies in testimony volumes. Each category in a standard format, linked by case numbers.&lt;/p&gt;

&lt;p&gt;That was the beginning of records management.&lt;/p&gt;

&lt;p&gt;When I learned databases today, I realized programmers use the same approach — except we call them "tables" instead of "case volumes."&lt;/p&gt;




&lt;h2&gt;
  
  
  Databases Turned Out to Be Simple
&lt;/h2&gt;

&lt;p&gt;Before this lesson, my impression of databases was: heavy enterprise stuff. Install servers, configure ports, maybe buy licenses for the serious ones. Something you only use in "real projects."&lt;/p&gt;

&lt;p&gt;Then what happened?&lt;/p&gt;

&lt;p&gt;My mentor had me run one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mise run download-db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few seconds later, a &lt;code&gt;.sqlite&lt;/code&gt; file downloaded to my machine.&lt;/p&gt;

&lt;p&gt;Then he said: &lt;strong&gt;That's the database.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I blinked. A file? That's it?&lt;/p&gt;

&lt;p&gt;No server. No ports. No username/password. One file is a complete database. I could copy it to a USB drive, move to another computer, and it would just work.&lt;/p&gt;

&lt;p&gt;I realized: databases aren't as scary as I thought. At their core, they're just &lt;strong&gt;organized file management&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Eleven Volumes
&lt;/h2&gt;

&lt;p&gt;Opening this database, I found 11 tables:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Table&lt;/th&gt;
&lt;th&gt;What it records&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;patient&lt;/td&gt;
&lt;td&gt;Patient files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;provider&lt;/td&gt;
&lt;td&gt;Medical staff&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;room&lt;/td&gt;
&lt;td&gt;Room information&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bed&lt;/td&gt;
&lt;td&gt;Bed status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;admission&lt;/td&gt;
&lt;td&gt;Admission records&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;shift&lt;/td&gt;
&lt;td&gt;Shift schedules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;medical_order&lt;/td&gt;
&lt;td&gt;Medical orders&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vital_sign&lt;/td&gt;
&lt;td&gt;Vital signs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;labor_progress&lt;/td&gt;
&lt;td&gt;Labor progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ob_profile&lt;/td&gt;
&lt;td&gt;OB profiles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;alert&lt;/td&gt;
&lt;td&gt;Alert records&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is data from an OB/GYN hospital. Imagine if it were all mixed together.&lt;/p&gt;

&lt;p&gt;Picture it: patient info, bed status, doctor schedules, medication records, labor progress, alerts... all in one giant table. Finding a patient's admission time means first filtering out scheduling records. Checking a bed's status means skipping past medical orders.&lt;/p&gt;

&lt;p&gt;That's like dumping all case files in one room unsorted. You &lt;em&gt;can&lt;/em&gt; find things. But it's exhausting.&lt;/p&gt;

&lt;p&gt;Split into 11 tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;patient&lt;/code&gt; only tracks who the patient is&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bed&lt;/code&gt; only tracks where beds are&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;admission&lt;/code&gt; only tracks who checked in&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;alert&lt;/code&gt; only tracks what's abnormal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Each table is an independent case volume, responsible for one thing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Need to link information? Use IDs. Just like case files using case numbers to connect different volumes.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Matters for Beginners
&lt;/h2&gt;

&lt;p&gt;As someone new to databases, here's what I've realized: &lt;strong&gt;good structure lowers the learning barrier&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If this database were one giant table with dozens of fields mixed together, I wouldn't know where to start.&lt;/p&gt;

&lt;p&gt;But split into 11 tables, each with just a few fields, I can explore one by one: first look at &lt;code&gt;patient&lt;/code&gt; to understand patient records, then &lt;code&gt;bed&lt;/code&gt; to understand how beds are tracked, then &lt;code&gt;admission&lt;/code&gt; to see how they connect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complex systems decomposed into simple parts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This decomposition doesn't make things more complicated — it makes learning possible.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two Layers of Simplicity
&lt;/h2&gt;

&lt;p&gt;Today I saw two kinds of "simple":&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First layer: tool simplicity.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SQLite made the database a single file. No servers to install, no networks to configure. Download and use. For beginners, this means focusing on "what does the data look like" rather than "how do I get the database running."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second layer: design simplicity.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The 11-table structure makes complex business understandable. Like courts categorizing case files — each category answers one question.&lt;/p&gt;

&lt;p&gt;These two layers work together. Good tools lower the entry barrier. Good design makes complex problems decomposable.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I'm Taking Away
&lt;/h2&gt;

&lt;p&gt;I used to think "simple" was a compromise — fewer features, therefore simple.&lt;/p&gt;

&lt;p&gt;Today I learned: &lt;strong&gt;simple is a capability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Taking complex things and decomposing them so people can understand step by step — that requires the designer to deeply understand the domain and make deliberate choices.&lt;/p&gt;

&lt;p&gt;SQLite's creator chose "one file" as the design, letting everyone worldwide start with zero cost.&lt;/p&gt;

&lt;p&gt;This hospital database designer chose "11 tables" as the structure, making complex medical operations orderly.&lt;/p&gt;

&lt;p&gt;For anyone starting to learn tech, maybe this is worth remembering:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If something looks complex, it might not be inherently complex — it might just not be well decomposed yet.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Find the right decomposition, and complex becomes simple.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>learning</category>
      <category>showdev</category>
    </item>
    <item>
      <title>The Gift of Instant Feedback</title>
      <dc:creator>lingxin wang</dc:creator>
      <pubDate>Mon, 16 Mar 2026 19:34:53 +0000</pubDate>
      <link>https://dev.to/lingxin_wang_3b88f34b4014/the-gift-of-instant-feedback-512p</link>
      <guid>https://dev.to/lingxin_wang_3b88f34b4014/the-gift-of-instant-feedback-512p</guid>
      <description>&lt;h1&gt;
  
  
  Why Developers Are Luckier Than Most
&lt;/h1&gt;




&lt;p&gt;A friend who works in product asked me the other day: "You programmers write code all day — how do you know if what you wrote is correct? Do you have to manually test everything after each change? That sounds exhausting."&lt;/p&gt;

&lt;p&gt;I told her: "No manual testing. Just run the tests and you know."&lt;/p&gt;

&lt;p&gt;"What are tests?"&lt;/p&gt;

&lt;p&gt;"Basically an automatic checking system. After you change code, the system tells you what's right and what's wrong."&lt;/p&gt;

&lt;p&gt;"Sounds like a medical checkup report."&lt;/p&gt;

&lt;p&gt;That comparison was perfect. What I learned today — coverage testing — is essentially a health checkup for code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Green and Red
&lt;/h2&gt;

&lt;p&gt;Opening the coverage test HTML report, the screen shows lines of code marked by color:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Green&lt;/strong&gt;: covered by tests, has been executed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Red&lt;/strong&gt;: never touched by tests, never run&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just like a doctor reading lab results: normal indicators are green, abnormal ones are red. No guessing. No deduction. One glance and you know where the problems are.&lt;/p&gt;

&lt;p&gt;I stared at the screen for a while. Not because I didn't understand — because it was so direct.&lt;/p&gt;

&lt;p&gt;You wrote 100 lines. The report tells you: 80 green, 20 red, 80% coverage. Which specific 20 are red? Click in, line by line, all marked.&lt;/p&gt;

&lt;p&gt;For someone in product, this precision of feedback is probably hard to imagine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Most People Don't Get This Kind of Feedback
&lt;/h2&gt;

&lt;p&gt;My friend said: "You programmers are lucky — you know immediately if you got it right."&lt;/p&gt;

&lt;p&gt;She's right.&lt;/p&gt;

&lt;p&gt;She shipped a new feature. User feedback: "feels off somehow." What's off? Who knows. Is it the interaction flow? The copy? The overall positioning? You can only slowly analyze data, slowly dig through user interviews.&lt;/p&gt;

&lt;p&gt;Job interviews are the same way. You bomb it, but you don't know which answer was wrong. Maybe three months later you vaguely guess what you should have said.&lt;/p&gt;

&lt;p&gt;At least doctors have lab results. But most things in life? There's no report marking things green and red telling you: this was right, this was wrong.&lt;/p&gt;

&lt;p&gt;You rely on intuition, on experience, on trial and error.&lt;/p&gt;

&lt;p&gt;Coverage tests just say: &lt;strong&gt;these 20 lines of code have never been executed&lt;/strong&gt;. Not "maybe," not "possibly." Definitely.&lt;/p&gt;

&lt;p&gt;This fast, precise, unambiguous feedback is a privilege of this profession.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Tests Really Are: Daily Rounds
&lt;/h2&gt;

&lt;p&gt;My friend asked: "So what exactly are tests doing? Making sure there are no bugs?"&lt;/p&gt;

&lt;p&gt;Yes, but not just that.&lt;/p&gt;

&lt;p&gt;I used an analogy: imagine a hospital with one doctor responsible for all patients. When there are few patients, they remember each person's condition. But with more? 100 patients, each with medications, contraindications, allergy histories — impossible to remember everything.&lt;/p&gt;

&lt;p&gt;So what do you do? &lt;strong&gt;Daily rounds, checking charts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The medical chart is the test. It records key information for each patient. The doctor doesn't rely purely on memory — one glance at the chart and they know how to proceed.&lt;/p&gt;

&lt;p&gt;Code is the same. Small project, you remember what every line does. Big project, 100 files, tens of thousands of lines — change one line, will it break something else? Hard to say.&lt;/p&gt;

&lt;p&gt;Run the tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All green? Relax, nothing broken&lt;/li&gt;
&lt;li&gt;Some red? Read the error message, it tells you what went wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tests are medical charts for code.&lt;/strong&gt; You don't have to keep all logic in your head. Outsource it to the testing system.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Wisdom of Layering
&lt;/h2&gt;

&lt;p&gt;There's a deeper truth here that my product friend would understand: &lt;strong&gt;good systems are layered&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Human brains have limits. Doctors can't remember 100 patients' conditions, so we invented charts. Programmers can't remember tens of thousands of lines of logic, so we invented tests.&lt;/p&gt;

&lt;p&gt;Outsource the "remembering" part. The brain only needs to focus on the small piece currently being handled.&lt;/p&gt;

&lt;p&gt;Coverage tests go one step further — they're charts for the charts. They tell you: which code is your testing covering, which isn't.&lt;/p&gt;

&lt;p&gt;Tests test code. Coverage tests test tests. Layer by layer, each layer catching what falls through.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Thought
&lt;/h2&gt;

&lt;p&gt;After this lesson, I understand "feedback" differently.&lt;/p&gt;

&lt;p&gt;Building products, designing, doing any creative work — the hardest part often isn't execution. It's &lt;strong&gt;not knowing whether you're doing it right&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Programmers are lucky. We have tests, coverage reports. Change code and know the result in seconds.&lt;/p&gt;

&lt;p&gt;For anyone building products, I'd say: if you can establish a "fast feedback system" in your domain, that's a huge advantage.&lt;/p&gt;

&lt;p&gt;Even if it's not as precise as code testing, anything faster than "find out three months later whether it was right" is worth investing in.&lt;/p&gt;

&lt;p&gt;That's probably the insight I'm taking from today's technical learning that transfers to other domains.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Think Big Code Small</title>
      <dc:creator>lingxin wang</dc:creator>
      <pubDate>Mon, 09 Mar 2026 21:46:13 +0000</pubDate>
      <link>https://dev.to/lingxin_wang_3b88f34b4014/think-big-code-small-32lb</link>
      <guid>https://dev.to/lingxin_wang_3b88f34b4014/think-big-code-small-32lb</guid>
      <description>&lt;p&gt;Live Demo &lt;a href="https://obnexus.vercel.app/" rel="noopener noreferrer"&gt;https://obnexus.vercel.app/&lt;/a&gt;, GitHub &lt;a href="https://github.com/Isaac-aiai/obnexus-project" rel="noopener noreferrer"&gt;https://github.com/Isaac-aiai/obnexus-project&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Three Rules for Code That Won't Collapse
&lt;/h1&gt;




&lt;p&gt;When I joined the project, I was told to study code architecture patterns. At first I didn't really get it — if the code runs, isn't that enough? Why bother with these "design patterns"?&lt;/p&gt;

&lt;p&gt;Then I saw a codebase that had lost control.&lt;/p&gt;

&lt;p&gt;Over 100 files, each importing from who-knows-where. Change one line? First spend two hours tracing dependencies. New team member? Three weeks in and still can't figure out where to start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's like an army without a command structure.&lt;/strong&gt; Every soldier knows their own job, but nobody can see the whole battlefield. Information flows randomly between squads. No central intelligence hub. No clear chain of command.&lt;/p&gt;

&lt;p&gt;The code wasn't messy because the programmers were bad. It was messy because &lt;strong&gt;there was no command system&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Three Architecture Rules
&lt;/h2&gt;

&lt;p&gt;Today I learned three patterns — Singleton, Lazy Load, Mixin — and I'm starting to think they're really about establishing a command hierarchy for code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule One: Unified Command (Singleton)
&lt;/h3&gt;

&lt;p&gt;There's a class in this project called &lt;code&gt;One&lt;/code&gt;. Need config? Ask it. Need database connection? Ask it. Need AI model? Still ask it.&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="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;obnexus.api&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;one&lt;/span&gt;
&lt;span class="n"&gt;one&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;    &lt;span class="c1"&gt;# global config
&lt;/span&gt;&lt;span class="n"&gt;one&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;engine&lt;/span&gt;    &lt;span class="c1"&gt;# database connection
&lt;/span&gt;&lt;span class="n"&gt;one&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;     &lt;span class="c1"&gt;# AI model
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In military terms, there's a principle: &lt;strong&gt;unified command&lt;/strong&gt;. No matter how many battalions or companies you have, operational orders come from one headquarters.&lt;/p&gt;

&lt;p&gt;Code works the same way. Doesn't matter how many modules exist underneath — expose one entry point to the outside. New person joins the team, day one they know where to start: ask &lt;code&gt;one&lt;/code&gt;. No digging through the whole codebase. No guessing which file does what.&lt;/p&gt;

&lt;p&gt;That's what Singleton is for: &lt;strong&gt;establishing a unified command entry point&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule Two: Intelligence on Demand (Lazy Load)
&lt;/h3&gt;

&lt;p&gt;The traditional approach is to initialize everything when the program starts. It's like an army gathering all possible intelligence before the war even begins — sounds thorough, but it's actually a disaster.&lt;/p&gt;

&lt;p&gt;First, resource waste. You might only need the database, but because of how the code is written, the AWS connection gets created too.&lt;/p&gt;

&lt;p&gt;Second, and worse, &lt;strong&gt;chain reactions&lt;/strong&gt;. Module A imports B, B imports C, C imports A again — circular dependency, program crashes.&lt;/p&gt;

&lt;p&gt;This kind of bug is nasty: everything works fine when the project is small, then explodes as code grows, and it's hell to debug.&lt;/p&gt;

&lt;p&gt;Lazy Load's design: &lt;strong&gt;intelligence is reported only when needed&lt;/strong&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="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;One&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nd"&gt;@cached_property&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;engine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;create_engine&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;  &lt;span class="c1"&gt;# created on access
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;import one&lt;/code&gt; does nothing. You call &lt;code&gt;one.engine&lt;/code&gt;, then database initialization triggers. No preloading. No chain reactions. No risk of circular dependencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule Three: Modular Organization (Mixin)
&lt;/h3&gt;

&lt;p&gt;A mature army is modular: infantry company, artillery company, signals company. Each has their function, and they combine flexibly.&lt;/p&gt;

&lt;p&gt;Code should organize the same way.&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;class&lt;/span&gt; &lt;span class="nc"&gt;One&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ConfigMixin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;DbMixin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;AgentMixin&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each Mixin handles one independent capability. Right now there's just &lt;code&gt;ConfigMixin&lt;/code&gt;, later we'll add &lt;code&gt;DbMixin&lt;/code&gt;, &lt;code&gt;AgentMixin&lt;/code&gt;. Add a capability, add a building block. Overall structure stays the same.&lt;/p&gt;

&lt;p&gt;The benefit: &lt;strong&gt;capabilities can grow while the command structure stays stable&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Do This When Code Is Still Simple?
&lt;/h2&gt;

&lt;p&gt;Someone might think: project just started, only a few files, isn't this pattern stuff overkill?&lt;/p&gt;

&lt;p&gt;From a technical management perspective, it's exactly the opposite.&lt;/p&gt;

&lt;p&gt;The cost of messy code grows exponentially. 10 files with some mess? One hour to clean up. 100 files? Maybe a week. 1000 files needing refactoring? Team might stop for a month.&lt;/p&gt;

&lt;p&gt;Architecture debt is scarier than technical debt because you can't fix it by patching a few bugs — you need to redesign the system.&lt;/p&gt;

&lt;p&gt;So: &lt;strong&gt;when code is simple is exactly when to establish the command structure&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I'm Taking Away
&lt;/h2&gt;

&lt;p&gt;Before this, my coding style was "get it running first." If it works, ship it. Structure can wait.&lt;/p&gt;

&lt;p&gt;But now I understand something:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think Big, Code Small.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think Big: stand in the future and look at today. Ask yourself: if code volume increases 10x, will this structure hold?&lt;/p&gt;

&lt;p&gt;Code Small: write simple code. Few entry points. Clear dependencies. Each module does one thing.&lt;/p&gt;

&lt;p&gt;Good code architecture is like good military command — not assembled during wartime, but trained, exercised, and validated in peacetime.&lt;/p&gt;

&lt;p&gt;That's probably the most important lesson I'm taking from this.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>codequality</category>
      <category>softwareengineering</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Start Big Learn Along The Way</title>
      <dc:creator>lingxin wang</dc:creator>
      <pubDate>Mon, 02 Mar 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/lingxin_wang_3b88f34b4014/start-big-learn-along-the-way-13m9</link>
      <guid>https://dev.to/lingxin_wang_3b88f34b4014/start-big-learn-along-the-way-13m9</guid>
      <description>&lt;p&gt;Live Demo &lt;a href="https://obnexus.vercel.app/" rel="noopener noreferrer"&gt;https://obnexus.vercel.app/&lt;/a&gt;&lt;br&gt;
 GitHub &lt;a href="https://github.com/Isaac-aiai/obnexus-project" rel="noopener noreferrer"&gt;https://github.com/Isaac-aiai/obnexus-project&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Not Ready Yet? Good.
&lt;/h1&gt;




&lt;p&gt;I got handed an internship project right out of school: build an AI scheduling assistant for an OB/GYN ward. My immediate reaction was something like panic. I could barely write SQL without looking things up. How was I supposed to build &lt;em&gt;this&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;But here's the thing — the scaffolding was already there. Beautiful landing page, complete chat interface, even those little suggested question buttons. It all looked real. Except the AI was fake. Every response was hardcoded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It was like a team with jerseys printed, stadium rented, fans in the seats — but no players on the field yet.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My job was to make this team actually play.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Agent and Not Just a Chatbot
&lt;/h2&gt;

&lt;p&gt;Before writing any code, I had to figure out why we needed an Agent at all. Why not just wire up a chatbot and call it done?&lt;/p&gt;

&lt;p&gt;This is actually a critical question for anyone building AI products, and I've been thinking about it a lot.&lt;/p&gt;

&lt;p&gt;A chatbot, the way I see it, is like a midfielder who can only pass — never shoot. You tell it to press the opponent, it says "sorry, my configuration is possession-based." You tell it to take a shot, it says "I'm just a passing specialist."&lt;/p&gt;

&lt;p&gt;An Agent is different. &lt;strong&gt;Agent = brain + legs + the autonomy to decide when to pass and when to shoot.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You say "find me empty beds," and it figures out which table to query, what conditions to use, how to structure the results. It doesn't just understand your intent — it acts on it.&lt;/p&gt;

&lt;p&gt;That's the kind of player who can actually score.&lt;/p&gt;

&lt;p&gt;For someone like me who wanted to quickly validate whether AI could do something useful, choosing Agent over Chatbot felt like choosing a versatile striker over someone who can only juggle — I needed someone who could put the ball in the net.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Learning Strategy I'm Betting On
&lt;/h2&gt;

&lt;p&gt;Here's a counterintuitive take: &lt;strong&gt;don't wait until you're ready.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The default learning approach is sequential — watch all the tutorials, solve all the exercises, feel "prepared," then finally start building.&lt;/p&gt;

&lt;p&gt;It's like an athlete saying "I'll play my first competitive game after my free throw percentage hits 95%."&lt;/p&gt;

&lt;p&gt;The problem is — you'll never be ready. The pressure of real competition, the rhythm of actual opponents, the coordination with real teammates — training can't simulate any of that. You only learn where you're weak by actually playing.&lt;/p&gt;

&lt;p&gt;I decided on a different strategy:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Find something the 12-months-from-now version of yourself might be able to complete. Start now.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;obnexus became my real game:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complex enough to be worth the effort&lt;/li&gt;
&lt;li&gt;Clear milestones where I could see progress&lt;/li&gt;
&lt;li&gt;Tech stack I actually wanted to learn (Agents, databases, cloud deployment)&lt;/li&gt;
&lt;li&gt;Most importantly — after this game, I'd have game tape to show interviewers&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I've got the team structure. Now I need to make them actually playable:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wake up the AI (right now it's just a mannequin)&lt;/li&gt;
&lt;li&gt;Connect the database (so it can see real game data)&lt;/li&gt;
&lt;li&gt;Implement tool calling (so it can take actions, not just watch)&lt;/li&gt;
&lt;li&gt;Deploy to production (so the audience can see the game)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each step is a small goal. Add them up, you've got a complete match.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Thought
&lt;/h2&gt;

&lt;p&gt;Here's what I keep coming back to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You don't become skilled by being fully prepared. You become skilled by repeatedly stepping onto the field.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I graduated, I thought I needed a few more years of study before I could tackle challenging projects. Now I realize the fastest growth comes from taking on something beyond your current ability — and learning as you go.&lt;/p&gt;

&lt;p&gt;The version of me three months from now will definitely be stronger than the current one.&lt;/p&gt;

&lt;p&gt;That's why I'm willing to step onto the field now. I don't know exactly how this will go, but I figure that's kind of the point.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>career</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
