<?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>Forem: Elmer Chacon</title>
    <description>The latest articles on Forem by Elmer Chacon (@mekobgs).</description>
    <link>https://forem.com/mekobgs</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%2F232183%2F16d38357-1b5e-4583-bb39-7d300e9f22f8.jpeg</url>
      <title>Forem: Elmer Chacon</title>
      <link>https://forem.com/mekobgs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mekobgs"/>
    <language>en</language>
    <item>
      <title>Technically Approved, Still Rejected: The Feedback Gap in Hiring</title>
      <dc:creator>Elmer Chacon</dc:creator>
      <pubDate>Fri, 02 Jan 2026 20:42:20 +0000</pubDate>
      <link>https://forem.com/mekobgs/technically-approved-still-rejected-the-feedback-gap-in-hiring-hbb</link>
      <guid>https://forem.com/mekobgs/technically-approved-still-rejected-the-feedback-gap-in-hiring-hbb</guid>
      <description>&lt;h2&gt;
  
  
  Technically Approved… and Still a “No”
&lt;/h2&gt;

&lt;p&gt;Recently I went through a full recruitment process for a .NET Developer role. I passed every stage. The final message sounded like a win:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You have been technically approved… Nevertheless, the team decided to move forward with another candidate…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;That sentence is tricky.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s positioned as encouraging, and maybe it’s meant to soften the disappointment. But as a candidate, it leaves you in a weird place: If I’m approved, what exactly made me not the choice?&lt;/p&gt;

&lt;p&gt;The part that bothered me wasn’t the “no”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let me be clear: I can take a rejection.&lt;/strong&gt;&lt;br&gt;
Hiring is competitive. Sometimes another candidate is a better fit for the exact situation. That’s normal.&lt;/p&gt;

&lt;p&gt;What’s not normal—at least not healthy—is how often candidates are left with ambiguity, especially after investing real time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;technical interviews&lt;/li&gt;
&lt;li&gt;coding tasks&lt;/li&gt;
&lt;li&gt;multiple calls&lt;/li&gt;
&lt;li&gt;preparing, studying, reorganizing schedules&lt;/li&gt;
&lt;li&gt;emotional energy and expectations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I asked for feedback, I got the classic response:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“I will talk to the team and let you know.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And then… &lt;strong&gt;nothing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters (even if recruiters mean well)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A generic rejection isn’t just disappointing. It’s also a missed opportunity for growth.&lt;/p&gt;

&lt;p&gt;If I don’t know what influenced the decision, I can’t improve intentionally. I’m left guessing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was it salary or budget constraints?&lt;/li&gt;
&lt;li&gt;Was it seniority level, like they wanted someone more junior or more staff-level?&lt;/li&gt;
&lt;li&gt;Was it communication style (English level, clarity, confidence, leadership)?&lt;/li&gt;
&lt;li&gt;Was it specific technical gaps (system design, testing, cloud depth, performance)?&lt;/li&gt;
&lt;li&gt;Was it a team fit factor (domain experience, timezone overlap, collaboration style)?&lt;/li&gt;
&lt;li&gt;Did I lose to an internal candidate, referral, or someone with a niche stack match?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any of these are valid reasons. But without clarity, the candidate is stuck.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Technically approved” is not the same as “best match”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve learned something important:&lt;br&gt;
Passing the bar doesn’t mean you win the role. It may simply mean:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you met the minimum technical threshold&lt;/li&gt;
&lt;li&gt;but someone else matched this specific team’s needs better&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s fine—but the way we communicate it matters.&lt;/p&gt;

&lt;p&gt;Because “approved” implies certainty. It implies readiness. It sounds like a yes. And then you get a no.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What candidates actually need (and it’s not a long report)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m not asking recruiters to write a novel, or expose internal discussions.&lt;/p&gt;

&lt;p&gt;But even two honest sentences would be enough:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“We chose a candidate with deeper Azure + Kubernetes production experience.”&lt;/li&gt;
&lt;li&gt;“The role required strong stakeholder communication; the other candidate showed more leadership in that area.”&lt;/li&gt;
&lt;li&gt;“Budget was capped at X and we moved forward with someone within range.”&lt;/li&gt;
&lt;li&gt;“We needed someone with direct marketplace/domain experience.”&lt;/li&gt;
&lt;li&gt;“Your technical skills were strong, but we needed more depth in system design.”&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;That feedback doesn’t harm the company. It doesn’t create drama. It doesn’t require hours of work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But it gives the candidate a direction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The “we’ll be in touch” line&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stimulating hope is easy. Managing expectations is harder.&lt;/p&gt;

&lt;p&gt;When a message says “we will be in touch 😉” but there’s no follow-up, it becomes noise. Candidates remember these things.&lt;/p&gt;

&lt;p&gt;If the real meaning is: “We’ll keep your profile on file, but there’s no timeline,” that’s okay—just say that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My message to recruiter teams&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Recruiters have a hard job. I get it. Hiring managers are busy. Processes are messy.&lt;/p&gt;

&lt;p&gt;But if you want better candidates in the future, better relationships, and a healthier hiring culture, this is a simple improvement:&lt;/p&gt;

&lt;p&gt;Don’t leave strong candidates guessing.&lt;/p&gt;

&lt;p&gt;We can take a “no.”&lt;br&gt;
We can handle honesty.&lt;br&gt;
What we can’t do is improve based on silence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A practical ask&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you’re a recruiter reading this, here’s a tiny habit that would make a huge difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After rejection, send one of these:&lt;/li&gt;
&lt;li&gt;Skill-based reason (one sentence)&lt;/li&gt;
&lt;li&gt;Role-fit reason (one sentence)&lt;/li&gt;
&lt;li&gt;Compensation range mismatch (one sentence)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;And to candidates: here’s how I’ll handle this going forward&lt;/p&gt;

&lt;p&gt;I’m also learning to protect my energy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If feedback is vague, I’ll ask once, politely.&lt;/li&gt;
&lt;li&gt;If it doesn’t come, I’ll assume it was a fit/budget/timing decision.&lt;/li&gt;
&lt;li&gt;I’ll take notes on how I performed and keep improving anyway.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And I’ll continue applying where the process respects both sides.&lt;/p&gt;

&lt;p&gt;Because professionalism isn’t only about passing interviews.&lt;br&gt;
It’s also about how we treat people when the answer is “no.”&lt;/p&gt;

</description>
      <category>career</category>
      <category>discuss</category>
      <category>interview</category>
    </item>
    <item>
      <title>🧠 The Ultimate C# Cheat Sheet &amp; Quick Reference</title>
      <dc:creator>Elmer Chacon</dc:creator>
      <pubDate>Fri, 13 Jun 2025 19:50:23 +0000</pubDate>
      <link>https://forem.com/mekobgs/the-ultimate-c-cheat-sheet-quick-reference-2556</link>
      <guid>https://forem.com/mekobgs/the-ultimate-c-cheat-sheet-quick-reference-2556</guid>
      <description>&lt;p&gt;Whether you're new to C# or a seasoned developer who needs a quick refresher, this cheat sheet is for you. It’s a compact but powerful reference filled with practical examples and syntax reminders that’ll keep you sharp and efficient as you code.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧱 Basics
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;✅ Variables&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int age = 30;
double pi = 3.14;
string name = "Elmer";
bool isActive = true;
char initial = 'E';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Constants&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const double Gravity = 9.81;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Nullable types&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int? score = null;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔁 Conditionals &amp;amp; Loops
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;✅ If-Else&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (age &amp;gt; 18)
    Console.WriteLine("Adult");
else
    Console.WriteLine("Minor");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Switch&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;switch (dayOfWeek)
{
    case "Monday":
        Console.WriteLine("Start of week");
        break;
    default:
        Console.WriteLine("Any day");
        break;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ For loop&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 5; i++)
    Console.WriteLine(i);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Foreach&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;string[] fruits = { "Apple", "Banana" };
foreach (string fruit in fruits)
    Console.WriteLine(fruit);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ While&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int counter = 0;
while (counter &amp;lt; 3)
{
    Console.WriteLine(counter);
    counter++;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📦 Classes &amp;amp; Objects
&lt;/h3&gt;

&lt;p&gt;✅ Defining a Class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Dog
{
    public string Name { get; set; }
    public void Bark() =&amp;gt; Console.WriteLine("Woof!");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Using a Class&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var myDog = new Dog { Name = "Rex" };
myDog.Bark();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🎯 Methods
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;✅ Method with Parameters and Return&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int Add(int a, int b) =&amp;gt; a + b;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Optional Parameters&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void Print(string msg = "Hello") =&amp;gt; Console.WriteLine(msg);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧰 Collections
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;✅ Arrays&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int[] nums = { 1, 2, 3 };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ List&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;List&amp;lt;string&amp;gt; names = new List&amp;lt;string&amp;gt; { "Alice", "Bob" };
names.Add("Charlie");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Dictionary&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var ages = new Dictionary&amp;lt;string, int&amp;gt; { { "Tom", 30 } };
Console.WriteLine(ages["Tom"]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🚀 LINQ
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var evens = numbers.Where(n =&amp;gt; n % 2 == 0).ToList();
var names = users.Select(u =&amp;gt; u.Name).ToList();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  ⚙️ Exception Handling
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try
{
    int x = 10 / 0;
}
catch (DivideByZeroException ex)
{
    Console.WriteLine("Cannot divide by zero");
}
finally
{
    Console.WriteLine("Cleanup code");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔄 Async / Await
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async Task&amp;lt;string&amp;gt; GetDataAsync()
{
    await Task.Delay(1000);
    return "Data loaded";
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🛠️ Useful Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use var when the type is obvious&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use ?? for null-coalescing:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;string name = input ?? "Default";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Use string interpolation:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Console.WriteLine($"Hello, {name}!");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📌 Bonus: Attributes &amp;amp; Enums
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;✅ Enum&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum Status { Pending, Approved, Rejected }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Attribute&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Obsolete("Use NewMethod instead")]
void OldMethod() {}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧠 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This cheat sheet is just the tip of the iceberg when it comes to C#. Keep it handy as a quick reference, especially when you're juggling multiple projects or switching between languages. C# is expressive, powerful, and clean—and with a reference like this, you can focus more on building and less on remembering syntax.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>programming</category>
      <category>productivity</category>
      <category>developer</category>
    </item>
    <item>
      <title>🧱 Mastering CQRS with MediatR in C#</title>
      <dc:creator>Elmer Chacon</dc:creator>
      <pubDate>Sun, 08 Jun 2025 03:29:06 +0000</pubDate>
      <link>https://forem.com/mekobgs/mastering-cqrs-with-mediatr-in-c-51b9</link>
      <guid>https://forem.com/mekobgs/mastering-cqrs-with-mediatr-in-c-51b9</guid>
      <description>&lt;p&gt;&lt;em&gt;CQRS (Command Query Responsibility Segregation)&lt;/em&gt; is a powerful architectural pattern that helps scale and organize modern applications, especially in the context of Domain-Driven Design (DDD). Combined with MediatR, a popular .NET library for implementing the Mediator pattern, CQRS becomes clean, maintainable, and testable.&lt;/p&gt;

&lt;p&gt;In this blog, we'll explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is CQRS?&lt;/li&gt;
&lt;li&gt;Why use MediatR?&lt;/li&gt;
&lt;li&gt;Implementing CQRS with MediatR in C#&lt;/li&gt;
&lt;li&gt;Folder structure best practices&lt;/li&gt;
&lt;li&gt;Examples: Create, Read, Update&lt;/li&gt;
&lt;li&gt;Validation and error handling&lt;/li&gt;
&lt;li&gt;Dependency injection and testing tips&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔍 What is CQRS?
&lt;/h2&gt;

&lt;p&gt;CQRS stands for Command Query Responsibility Segregation. It separates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Commands&lt;/strong&gt;: write operations that change state (e.g., Create, Update, Delete)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queries&lt;/strong&gt;: read operations that fetch data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This separation allows each side to scale independently, apply different optimizations, and follow different architectural principles (e.g., write = strict validation, read = performance-focused).&lt;/p&gt;

&lt;h2&gt;
  
  
  🧭 Why MediatR?
&lt;/h2&gt;

&lt;p&gt;MediatR allows decoupling request handling logic using the Mediator pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commands and Queries are simple C# objects (POCOs)&lt;/li&gt;
&lt;li&gt;Handlers encapsulate the logic&lt;/li&gt;
&lt;li&gt;No service locator, no static dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;dotnet add package MediatR&lt;br&gt;
dotnet add package MediatR.Extensions.Microsoft.DependencyInjection&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  🏗️ Recommended Folder Structure
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7zo4s3cm8j6blmium7hv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7zo4s3cm8j6blmium7hv.png" alt="Folders Structure" width="620" height="495"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  ✍️ Command Example: Create Product
&lt;/h2&gt;

&lt;p&gt;Step 1 – Define the Command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public record CreateProductCommand(string Name, decimal Price) : IRequest&amp;lt;Guid&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2 – Create the Handler&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class CreateProductHandler : IRequestHandler&amp;lt;CreateProductCommand, Guid&amp;gt;
{
    private readonly IProductRepository _repository;

    public CreateProductHandler(IProductRepository repository)
    {
        _repository = repository;
    }

    public async Task&amp;lt;Guid&amp;gt; Handle(CreateProductCommand request, CancellationToken cancellationToken)
    {
        var product = new Product
        {
            Id = Guid.NewGuid(),
            Name = request.Name,
            Price = request.Price,
            CreatedAt = DateTime.UtcNow
        };

        await _repository.AddAsync(product);
        return product.Id;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3 – Use It in a Controller&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[HttpPost]
public async Task&amp;lt;IActionResult&amp;gt; Create(CreateProductCommand command)
{
    var id = await _mediator.Send(command);
    return CreatedAtAction(nameof(GetById), new { id }, id);
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔎 Query Example: Get Product By ID
&lt;/h2&gt;

&lt;p&gt;Step 1 – Define the Query&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public record GetProductByIdQuery(Guid Id) : IRequest&amp;lt;ProductDto&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2 – Create the Handler&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class GetProductByIdHandler : IRequestHandler&amp;lt;GetProductByIdQuery, ProductDto&amp;gt;
{
    private readonly IProductRepository _repository;

    public GetProductByIdHandler(IProductRepository repository)
    {
        _repository = repository;
    }

    public async Task&amp;lt;ProductDto&amp;gt; Handle(GetProductByIdQuery request, CancellationToken cancellationToken)
    {
        var product = await _repository.GetByIdAsync(request.Id);

        if (product == null)
            throw new NotFoundException(nameof(Product), request.Id);

        return new ProductDto(product.Id, product.Name, product.Price);
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  ✅ Best Practices
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Separation of Concerns&lt;/strong&gt;&lt;br&gt;
Don't put domain logic in handlers.&lt;/p&gt;

&lt;p&gt;Keep handlers thin—delegate to services or aggregates if needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Validation with FluentValidation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class CreateProductValidator : AbstractValidator&amp;lt;CreateProductCommand&amp;gt;
{
    public CreateProductValidator()
    {
        RuleFor(x =&amp;gt; x.Name).NotEmpty().MaximumLength(100);
        RuleFor(x =&amp;gt; x.Price).GreaterThan(0);
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register validators and use the pipeline to validate automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services.AddValidatorsFromAssemblyContaining&amp;lt;CreateProductValidator&amp;gt;();
services.AddTransient(typeof(IPipelineBehavior&amp;lt;,&amp;gt;), typeof(ValidationBehavior&amp;lt;,&amp;gt;));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ValidationBehavior Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class ValidationBehavior&amp;lt;TRequest, TResponse&amp;gt; : IPipelineBehavior&amp;lt;TRequest, TResponse&amp;gt;
     where TRequest : IRequest&amp;lt;TResponse&amp;gt;
{
    private readonly IEnumerable&amp;lt;IValidator&amp;lt;TRequest&amp;gt;&amp;gt; _validators;

    public ValidationBehavior(IEnumerable&amp;lt;IValidator&amp;lt;TRequest&amp;gt;&amp;gt; validators)
    {
        _validators = validators;
    }

    public async Task&amp;lt;TResponse&amp;gt; Handle(
        TRequest request,
        RequestHandlerDelegate&amp;lt;TResponse&amp;gt; next,
        CancellationToken cancellationToken)
    {
        var context = new ValidationContext&amp;lt;TRequest&amp;gt;(request);

        var failures = _validators
            .Select(v =&amp;gt; v.Validate(context))
            .SelectMany(result =&amp;gt; result.Errors)
            .Where(f =&amp;gt; f != null)
            .ToList();

        if (failures.Count != 0)
            throw new ValidationException(failures);

        return await next();
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Use DTOs – Don’t Expose Entities&lt;/strong&gt;&lt;br&gt;
Avoid returning domain models directly. Instead, return DTOs like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public record ProductDto(Guid Id, string Name, decimal Price);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Keep Handlers Simple and Focused&lt;/strong&gt;&lt;br&gt;
Bad:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does Validation&lt;/li&gt;
&lt;li&gt;Mapping&lt;/li&gt;
&lt;li&gt;Domain Logic&lt;/li&gt;
&lt;li&gt;Logging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate (via pipeline)&lt;/li&gt;
&lt;li&gt;Call service/repo&lt;/li&gt;
&lt;li&gt;Return result&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Unit Testing Handlers&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Fact]
public async Task CreateProduct_Should_Return_Id()
{
    // Arrange
    var mockRepo = new Mock&amp;lt;IProductRepository&amp;gt;();
    var handler = new CreateProductHandler(mockRepo.Object);

    var command = new CreateProductCommand("Test", 10);

    // Act
    var result = await handler.Handle(command, CancellationToken.None);

    // Assert
    Assert.IsType&amp;lt;Guid&amp;gt;(result);
    mockRepo.Verify(r =&amp;gt; r.AddAsync(It.IsAny&amp;lt;Product&amp;gt;()), Times.Once);
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧠 Wrap-Up
&lt;/h2&gt;

&lt;p&gt;CQRS + MediatR = Powerful, clean, and testable architecture.&lt;/p&gt;

&lt;p&gt;It helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Organize codebase by behavior&lt;/li&gt;
&lt;li&gt;Reduce complexity and duplication&lt;/li&gt;
&lt;li&gt;Facilitate testing and scaling&lt;/li&gt;
&lt;li&gt;Introduce pipelines for validation, logging, and metrics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Start small. Even if your app doesn’t need full CQRS, using MediatR for commands and queries can enforce structure and testability from day one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 Ready to Try?&lt;/strong&gt;&lt;br&gt;
You can bootstrap this pattern in any clean architecture app using:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dotnet new webapi -n YourApp&lt;br&gt;
dotnet add package MediatR&lt;br&gt;
dotnet add package MediatR.Extensions.Microsoft.DependencyInjection&lt;br&gt;
dotnet add package FluentValidation&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then start building commands, queries, handlers, and enjoy a maintainable codebase!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>programming</category>
      <category>developers</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Teammates: Enemies or Allies? When They Know More Than You</title>
      <dc:creator>Elmer Chacon</dc:creator>
      <pubDate>Thu, 05 Jun 2025 04:28:18 +0000</pubDate>
      <link>https://forem.com/mekobgs/teammates-enemies-or-allies-when-they-know-more-than-you-1hj</link>
      <guid>https://forem.com/mekobgs/teammates-enemies-or-allies-when-they-know-more-than-you-1hj</guid>
      <description>&lt;p&gt;&lt;em&gt;We've all been there.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You join a new project, and one of your teammates just knows everything. The tools, the stack, the architecture—they speak fluently, they move fast, they shine. And you? You’re still finding the right repo, trying to guess which package controls what.&lt;/p&gt;

&lt;p&gt;In that moment, a sneaky thought creeps in:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is this person a threat? Are they competition?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Real Question Isn’t About Them, It’s About Us
&lt;/h2&gt;

&lt;p&gt;When we feel outpaced by someone on our team, it's easy to slip into defensiveness. We might fear being overshadowed, being irrelevant, or—let’s be honest—being exposed. But the question we should be asking isn’t, &lt;em&gt;"Are they a danger to me?"&lt;/em&gt; but rather:&lt;br&gt;
&lt;em&gt;"How can I grow because of them?"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Knowledge Isn’t a Weapon—It’s a Bridge
&lt;/h2&gt;

&lt;p&gt;A teammate who knows more isn't a threat—they’re a shortcut to your own growth. Their experience can save you weeks of trial and error. Their guidance can level you up faster than any tutorial. And their mistakes? They're lessons you didn’t have to pay for in time or stress.&lt;/p&gt;

&lt;p&gt;But here's the catch:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That only happens if you drop the ego.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Ego Creates Enemies—Curiosity Creates Allies
&lt;/h2&gt;

&lt;p&gt;If you see your teammate as competition, you'll close off. You’ll avoid asking questions. You’ll try to “prove” yourself instead of learning. And that builds walls.&lt;/p&gt;

&lt;p&gt;But if you stay curious—if you ask, listen, and collaborate—they’ll become your biggest ally. Most people love sharing what they know, especially if they feel respected. You can transform that &lt;strong&gt;“intimidating expert”&lt;/strong&gt; into a mentor, a partner, a champion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leadership Isn’t About Knowing Everything
&lt;/h2&gt;

&lt;p&gt;The best leaders aren’t the smartest in the room—they’re the ones who create space for others to shine. If you're in a position where someone else on your team outshines you in knowledge, that’s not your failure.&lt;/p&gt;

&lt;p&gt;That’s your advantage—if you know how to use it.&lt;/p&gt;

&lt;p&gt;Let them lead where they're strong. Support them. Learn from them. And show your own strengths in return. Because here's the truth: no one knows everything. You bring something to the table too—maybe it's communication, big-picture thinking, empathy, or raw grit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;A teammate who knows more than you isn’t an enemy—they’re an asset. The danger isn’t their knowledge—it’s our fear of looking small next to it.&lt;/p&gt;

&lt;p&gt;So next time you feel intimidated, flip the script.&lt;br&gt;
You don’t need to compete.&lt;br&gt;
You need to connect.&lt;br&gt;
Because the best teams aren’t built on ego.&lt;br&gt;
They're built on trust, humility, and the willingness to grow together.&lt;/p&gt;

</description>
      <category>teammates</category>
      <category>teamwork</category>
      <category>leadership</category>
      <category>growthmindset</category>
    </item>
    <item>
      <title>Do you know about Jabit! ?</title>
      <dc:creator>Elmer Chacon</dc:creator>
      <pubDate>Thu, 10 Oct 2019 17:25:04 +0000</pubDate>
      <link>https://forem.com/mekobgs/do-you-know-about-jabit-226h</link>
      <guid>https://forem.com/mekobgs/do-you-know-about-jabit-226h</guid>
      <description>&lt;p&gt;Hi everyone!&lt;/p&gt;

&lt;p&gt;This is my first post and I'm so exited about that! Well, I want to share with you this page that I found recently but was a very extremly good help for me and I know will be for you too. Its name is Jabit! &lt;a href="http://jabit.org/" rel="noopener noreferrer"&gt;http://jabit.org/&lt;/a&gt; This is a code generator tool created by Dennis Madrid | Ronald Madrid.&lt;/p&gt;

&lt;p&gt;You can choose differents templates (Backend and Frontend):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NetCore WebApi&lt;/li&gt;
&lt;li&gt;NodeJs&lt;/li&gt;
&lt;li&gt;Angular (Beta)&lt;/li&gt;
&lt;li&gt;React (Beta)&lt;/li&gt;
&lt;li&gt;Vue (Beta)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next Releases: Net Core Blazor, Razor and Python&lt;/p&gt;

&lt;p&gt;This tool already have a template to start to play with, but you can easily replace the Models with json structure (for reference: &lt;a href="http://jabit.org/documentation" rel="noopener noreferrer"&gt;http://jabit.org/documentation&lt;/a&gt;) and create your own application!! &lt;/p&gt;

&lt;p&gt;Go to the documentation and check it out how to create it (you just need to run a line command in CommandPront).&lt;/p&gt;

&lt;p&gt;I hope this can be helpful for everyone!&lt;/p&gt;

&lt;p&gt;Cheers! :) &lt;/p&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>node</category>
      <category>dotnet</category>
    </item>
  </channel>
</rss>
