<?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: Blessed Emmanuel John chidera</title>
    <description>The latest articles on DEV Community by Blessed Emmanuel John chidera (@blessloaded).</description>
    <link>https://dev.to/blessloaded</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%2F4126950%2F544390ef-a285-46f3-b162-220bec209c6a.png</url>
      <title>DEV Community: Blessed Emmanuel John chidera</title>
      <link>https://dev.to/blessloaded</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/blessloaded"/>
    <language>en</language>
    <item>
      <title>One GET Method, Not Ten: The Architecture Lesson That Rewired How I Think</title>
      <dc:creator>Blessed Emmanuel John chidera</dc:creator>
      <pubDate>Wed, 16 Sep 2026 07:10:12 +0000</pubDate>
      <link>https://dev.to/blessloaded/one-get-method-not-ten-the-architecture-lesson-that-rewired-how-i-think-2gic</link>
      <guid>https://dev.to/blessloaded/one-get-method-not-ten-the-architecture-lesson-that-rewired-how-i-think-2gic</guid>
      <description>&lt;p&gt;This week I had one of those moments as a developer where a single sentence from a mentor rearranged how I see code.&lt;/p&gt;

&lt;p&gt;I was building a feature — nothing fancy. I needed to retrieve data from my database based on different enums I had created. My plan was straightforward:&lt;/p&gt;

&lt;p&gt;One method per enum. Clean. Organized. Done.&lt;/p&gt;

&lt;p&gt;I was proud of it. Then my mentor looked at my code and said:&lt;/p&gt;

&lt;p&gt;"You can actually create one HTTP GET method and use the enum type as the argument."&lt;/p&gt;

&lt;p&gt;One sentence. Everything changed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem With "One Method, One Job"&lt;/strong&gt;&lt;br&gt;
I want to be clear — I wasn't being lazy. I was being naive about architecture.&lt;/p&gt;

&lt;p&gt;I thought writing more methods = writing better code. I thought verbosity meant thoroughness. But here's what I missed:&lt;/p&gt;

&lt;p&gt;If you're copy-pasting methods that differ only by a parameter, you're not architecting — you're repeating.&lt;/p&gt;

&lt;p&gt;Here's roughly what my instinct told me to write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"status/active"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;GetActiveItems&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="nf"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"status/pending"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;GetPendingItems&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="nf"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"status/archived"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;GetArchivedItems&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;Three methods. Three routes. Three places to update when the logic changes.&lt;/p&gt;

&lt;p&gt;Then my mentor showed me what it should look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"items/{status}"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;GetItemsByStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ItemStatus&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetByStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&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;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&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;One method. One route. One source of truth.&lt;/p&gt;

&lt;p&gt;The enum does the branching. The parameter does the work. The architecture stays clean.&lt;/p&gt;

&lt;p&gt;Why This Matters Beyond the Code&lt;br&gt;
This wasn't just a refactor. It was a lesson in software architecture principles:&lt;/p&gt;

&lt;p&gt;DRY (Don't Repeat Yourself) — if the logic is the same, the method should be the same.&lt;/p&gt;

&lt;p&gt;Single Responsibility, done right — one method can handle multiple cases if the variation is data, not logic.&lt;/p&gt;

&lt;p&gt;Open/Closed Principle — adding a new enum value doesn't require a new method. The system extends without modification.&lt;/p&gt;

&lt;p&gt;Less surface area — fewer endpoints means fewer bugs, fewer tests, fewer things to break.&lt;/p&gt;

&lt;p&gt;The biggest takeaway? Architecture isn't built in big design docs. It's built in the small decisions you make when nobody's watching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PUT vs PATCH: The Assumption That Humble Me&lt;/strong&gt;&lt;br&gt;
Same week, same project — I learned something else that embarrassed me a little.&lt;/p&gt;

&lt;p&gt;I had been using PUT and PATCH as if they were interchangeable. I assumed they both just meant "update." I never questioned it.&lt;/p&gt;

&lt;p&gt;They are not the same.&lt;/p&gt;

&lt;p&gt;Method  What it does                      When to use it&lt;br&gt;
PUT Replaces the entire resource      Full updates — send the&lt;br&gt;&lt;br&gt;
                                          whole object&lt;br&gt;
PATCH   Updates only the fields you send  Partial updates — &lt;br&gt;
                                          change one field, leave &lt;br&gt;
                                          the rest&lt;/p&gt;

&lt;p&gt;Here's what that looks like in practice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;# PUT — replaces the entire resource
PUT /api/users/1
{
  "name": "John",
  "email": "john@example.com",
  "role": "admin"
}

# PATCH — updates only what you send
PATCH /api/users/1
{
  "email": "newemail@example.com"
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With PUT, if you omit a field, it gets wiped. With PATCH, omitted fields stay untouched.&lt;/p&gt;

&lt;p&gt;Small words. Completely different behavior. And I had been throwing them around casually as if the difference didn't matter.&lt;/p&gt;

&lt;p&gt;Lesson: The things we assume we know are often the things we understand the least.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub + Visual Studio: The Quiet Win&lt;/strong&gt;&lt;br&gt;
Not everything this week was a philosophical breakthrough. I also finally connected GitHub to Visual Studio so I can push my work straight from the IDE to my remote repo.&lt;/p&gt;

&lt;p&gt;On paper, it's a few clicks. In practice, it removed friction from my daily workflow — and friction is what kills momentum.&lt;/p&gt;

&lt;p&gt;Here's the quick version if you haven't done it yet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Or from the terminal inside VS:
&lt;span class="go"&gt;git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/yourname/yourrepo.git
git push -u origin main
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Now every commit goes from my editor to GitHub without leaving the IDE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Three Lessons I'm Walking Away With&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Simplicity is a skill, not a shortcut.&lt;br&gt;
Anyone can write more code. Real discipline is writing less and making it mean more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assumptions are the enemy of growth.&lt;br&gt;
The moment you stop questioning what you "already know" is the moment you stop growing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Small wins compound.&lt;br&gt;
A mentor's sentence. A corrected assumption. A connected tool. None feel big in the moment — but stacked, they build the developer you're becoming.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Your Turn&lt;/strong&gt;&lt;br&gt;
I'm curious:&lt;/p&gt;

&lt;p&gt;What's one "small decision" that quietly changed how you write code?&lt;/p&gt;

&lt;p&gt;Was it a mentor's correction? A refactor you resisted? A tool you finally set up? Drop it in the comments — I'm learning in public and I want to learn from you too.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I'm a developer learning in public — sharing real lessons from real projects. Follow me here on Dev.to, or connect on [LinkedIn] and [X]. Let's grow together.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>programming</category>
      <category>api</category>
      <category>architecture</category>
      <category>database</category>
    </item>
  </channel>
</rss>
