<?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: Rumen Dimov</title>
    <description>The latest articles on Forem by Rumen Dimov (@rumendimov).</description>
    <link>https://forem.com/rumendimov</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%2F1004041%2Fb31126bb-9799-4c7e-b2da-8ff1fef9e836.jpg</url>
      <title>Forem: Rumen Dimov</title>
      <link>https://forem.com/rumendimov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rumendimov"/>
    <language>en</language>
    <item>
      <title>How I Performance Optimised My Next.js App</title>
      <dc:creator>Rumen Dimov</dc:creator>
      <pubDate>Sat, 25 Oct 2025 21:52:00 +0000</pubDate>
      <link>https://forem.com/rumendimov/how-i-performance-optimised-my-nextjs-app-3d56</link>
      <guid>https://forem.com/rumendimov/how-i-performance-optimised-my-nextjs-app-3d56</guid>
      <description>&lt;p&gt;So I recently went down a bit of a rabbit hole optimising my Next.js app, and honestly? It was crazy. I wanted to share what I learned because there were some surprises along the way, and maybe it will help someone else trying to speed up their site or it will stir up a nice discussion. Either way, it's a win-win situation for me 😊. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt; - &lt;em&gt;the things I learned are both from research (google, stackoverflow, dev.to, shady techy websites) and, of course, AI. The cover image is AI generated using Gemini.&lt;/em&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  The Big Plot Twist
&lt;/h4&gt;

&lt;p&gt;Here's the thing that almost made me lose my mind: my local production build was scoring like 75/100 on Lighthouse. I was freaking out trying everything, questioning my very own existence...🥴 and then I deployed it to actual production and...it hit 98/100. How about that?!&lt;/p&gt;

&lt;p&gt;Turns out local builds can be super misleading. Your local machine, the way Next.js serves files locally, network conditions – it is all very different from real production. I don't really know the ins and outs of it but the local build is not accurate. So if you're testing locally and getting discouraged, just deploy it and see what happens. You might be pleasantly surprised.&lt;br&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%2Fbl64bns2pu9xpqnmwg0o.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%2Fbl64bns2pu9xpqnmwg0o.png" alt="Score on local build" width="594" height="614"&gt;&lt;/a&gt;&lt;/p&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%2Fq9qf500eikx904sccbop.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%2Fq9qf500eikx904sccbop.png" alt="Score on prod" width="591" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Approach (aka "Does It Feel Fast? 😂")
&lt;/h2&gt;

&lt;p&gt;Look I'm not going to pretend I know if everything I did follows some official "best practices" handbook. A lot of what I did was based on perceived performance – does it feel fast when I use it and does it make sense? Do things load smoothly? Is there annoying layout shift? Also, this is an experiment and a hobby project, so some of the things I did were can be rightfully seen as an exeggeration, i.e. feel free to judge me 😊.&lt;br&gt;
That said, I threw a bunch of optimisations at this thing, and collectively they worked. Here's what I did:&lt;/p&gt;

&lt;h4&gt;
  
  
  Images Were Eating My Performance
&lt;/h4&gt;

&lt;p&gt;First thing I attacked was images. Next.js has great image optimisation built in, but you gotta configure it properly.&lt;br&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%2Fjnginj71xpwg2s4qqahn.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%2Fjnginj71xpwg2s4qqahn.png" alt="Image optimisation" width="618" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I set up AVIF and WebP formats (way smaller than JPEGs), and added device-specific sizing. Then I went aggressive on caching – 1 year cache headers on images. Why? Because once someone downloads an image, there's no reason to download it again.&lt;br&gt;
The file size difference is real – I was seeing 30-50% smaller images with modern formats.&lt;br&gt;
Again, reminder, I am not teaching, I am just sharing what I did so if someone knows better, please feel free to level some serious criticism, I'm happy to learn.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fonts Can Block Your Entire Page
&lt;/h4&gt;

&lt;p&gt;This one was really strange to me at first. I used to just throw Google Fonts in there and call it a day. But fonts can actually block your page from rendering while they load. Next.js has a solution:&lt;/p&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%2F1q3zko641g7msk23roy4.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%2F1q3zko641g7msk23roy4.png" alt="Fonts being configured" width="283" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The display: 'swap' is key – it shows a fallback font immediately while your web font loads in the background. No more blank screens waiting for fonts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Cache Everything That Doesn't Change
&lt;/h4&gt;

&lt;p&gt;I went a bit crazy with caching:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Static assets: 1 year&lt;/li&gt;
&lt;li&gt;Fonts: 1 year&lt;/li&gt;
&lt;li&gt;Optimised images: 1 year&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why so aggressive? Because these files don't change. When I deploy a new version, Next.js generates new filenames anyway, so there's no risk of serving stale content. Feel free to disagree.&lt;/p&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%2Fgj9ogjdsbkh37ho5cbvs.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%2Fgj9ogjdsbkh37ho5cbvs.png" alt="Cashing" width="553" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Code Splitting Saved My Bundle Size
&lt;/h4&gt;

&lt;p&gt;This was solid. I had some heavy components – charts, modals, stuff like that. They were bloating my initial JavaScript bundle. So I dynamically imported them:&lt;/p&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%2Fmvazeqs6nq2kioiy6g44.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%2Fmvazeqs6nq2kioiy6g44.png" alt="dynamically importing components" width="629" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ssr: false means it only loads on the client, and only when needed. This cut my initial bundle size by...I don't know how much but it was definitely by a lot.&lt;/p&gt;

&lt;h4&gt;
  
  
  Tree-Shaking Icons
&lt;/h4&gt;

&lt;p&gt;Icon libraries are sneaky bundle size killers. I was using lucide-react and @radix-ui/react-icons, which have like hundreds of icons. I was only using maybe 15.&lt;/p&gt;

&lt;h4&gt;
  
  
  Database Queries
&lt;/h4&gt;

&lt;p&gt;On the backend I made sure to only fetch the columns I actually needed, which makes perfect sense. I also used joins instead of multiple queries when I needed related data. Fewer round trips to the database = faster API responses.&lt;/p&gt;

&lt;h4&gt;
  
  
  Skeleton Loaders Are Your Friend 😂
&lt;/h4&gt;

&lt;p&gt;Layout shift is annoying. You know when you're reading something and suddenly the whole page jumps because an image loaded? Not a great UX is it.&lt;br&gt;
I added skeleton loaders for basically everything that loads asynchronously. I have 7 different loading.tsx files for different sections:&lt;/p&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%2F4ftfff7b20g2109u9044.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%2F4ftfff7b20g2109u9044.png" alt="Skeletons in use" width="794" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This keeps the layout stable while content loads.&lt;/p&gt;

&lt;h4&gt;
  
  
  Server Components vs Client Components
&lt;/h4&gt;

&lt;p&gt;Next.js 13+ has Server Components thing and I think it's great for performance. The basic rule I follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server Components (default)&lt;/strong&gt;: Marketing pages, content that doesn't need interactivity, and of course anything that renders a lot of data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client Components&lt;/strong&gt;: Forms, interactive widgets, anything that needs useState or onClick and that does not require a whole lotta data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's why I think the Server Components are so good for data-heavy stuff: they render on the server, so all that data processing happens server-side. The client just gets the final HTML. No huge JSON payloads sent over the network, no client-side rendering loops.&lt;/p&gt;

&lt;p&gt;For example, I have an analytics dashboard that displays tons of data, charts, metrics – all that gets rendered on the server. The browser just receives ready-to-display HTML. Compare that to a traditional SPA where you'd fetch all that data, parse it client-side, then render it. Way more work for the browser.&lt;/p&gt;

&lt;p&gt;Server Components mean less JavaScript shipped to the browser. Less JavaScript = faster page.&lt;/p&gt;

&lt;p&gt;What do you think?&lt;/p&gt;

&lt;h4&gt;
  
  
  The Little Things That Add Up:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Middleware efficiency – I excluded static assets from auth checks. No point checking authentication on every single image request...or is there?&lt;/li&gt;
&lt;li&gt;useMemo for expensive calculations – Had a filtering function that ran on every render so wrapped in useMemo&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Some Honest Thoughts
&lt;/h4&gt;

&lt;p&gt;Did I need to do all this? Maybe not. How cyber safe is it? It certainly has flaws. Could some of these optimisations be overkill? Possibly. But the end result is a site that feels fast and I experimented the hell out of this thing...😂 most importantly I had fun.&lt;br&gt;
I'm sure there are more optimisations I have missed and this is where you come in. Also at some point you gotta ship the thing and move on to actually building features and enjoy life.&lt;/p&gt;

&lt;p&gt;Also, seriously, don't stress too much about your local Lighthouse scores. They can be insanely misleading. Test in production (or a production-like environment) to get real numbers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Stack&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;For context, I'm using:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next.js 14 with App Router&lt;br&gt;
TypeScript&lt;br&gt;
Tailwind CSS&lt;br&gt;
Supabase (PostgreSQL)&lt;br&gt;
Deployed on Vercel&lt;/p&gt;

&lt;p&gt;Hope someone find some value in this! &lt;/p&gt;

&lt;p&gt;Happy coding!!! 😊&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>performance</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Areas in ASP.NET Core: The Architectural Feature You're Probably Missing</title>
      <dc:creator>Rumen Dimov</dc:creator>
      <pubDate>Mon, 04 Aug 2025 21:52:19 +0000</pubDate>
      <link>https://forem.com/rumendimov/areas-in-aspnet-core-the-architectural-feature-youre-probably-missing-11bi</link>
      <guid>https://forem.com/rumendimov/areas-in-aspnet-core-the-architectural-feature-youre-probably-missing-11bi</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;If you've been working with ASP.NET Core and haven't encountered Areas yet, you're not alone. Despite being a powerful organisational feature, Areas are often overlooked in tutorials and beginner resources. This oversight leads many developers to create convoluted controller hierarchies and strange architectural patterns that Areas were specifically designed to solve.&lt;/p&gt;

&lt;p&gt;I've seen projects where developers create "super controllers" or awkward folder structures trying to achieve what Areas provide out of the box. Let's fix that.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Are Areas?
&lt;/h1&gt;

&lt;p&gt;Areas are a feature in ASP.NET Core that allow you to partition your web application into smaller functional groups. Each area represents a distinct section of your application with its own set of controllers, views, and models. Think of them as mini-MVC applications within your main application.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Areas Matter
&lt;/h1&gt;

&lt;h3&gt;
  
  
  1. Logical Organisation
&lt;/h3&gt;

&lt;p&gt;Without Areas, large applications often end up with dozens of controllers in a single folder, making navigation and maintenance a nightmare. Areas let you group related functionality together.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Team Collaboration
&lt;/h3&gt;

&lt;p&gt;Different teams can work on different areas without stepping on each other's toes. The Admin team works in the Admin area, the API team in the API area, and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Namespace Separation
&lt;/h3&gt;

&lt;p&gt;Areas provide automatic namespace separation, preventing naming conflicts and making your code more maintainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Route Management
&lt;/h3&gt;

&lt;p&gt;Areas provide built-in route segregation, making your URL structure cleaner and more intuitive.&lt;/p&gt;

&lt;h1&gt;
  
  
  Real-World Example: E-Commerce Application
&lt;/h1&gt;

&lt;p&gt;Let's say you're building an e-commerce platform. Without Areas, you might have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Controllers/
├── HomeController.cs
├── ProductController.cs
├── CategoryController.cs
├── AdminProductController.cs
├── AdminCategoryController.cs
├── AdminUserController.cs
├── AdminDashboardController.cs
├── CustomerOrderController.cs
├── CustomerProfileController.cs
└── ... (dozens more)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This quickly becomes unmanageable. With Areas, you get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Areas/
├── Admin/
│   ├── Controllers/
│   │   ├── ProductController.cs
│   │   ├── CategoryController.cs
│   │   ├── UserController.cs
│   │   └── DashboardController.cs
│   ├── Views/
│   └── Models/
├── Customer/
│   ├── Controllers/
│   │   ├── OrderController.cs
│   │   └── ProfileController.cs
│   ├── Views/
│   └── Models/
└── Public/
    ├── Controllers/
    │   ├── HomeController.cs
    │   ├── ProductController.cs
    │   └── CategoryController.cs
    ├── Views/
    └── Models/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Implementing Areas
&lt;/h1&gt;

&lt;p&gt;Step 1: Create an Area&lt;br&gt;
// Create folder structure:&lt;br&gt;
// Areas/Admin/Controllers/&lt;br&gt;
// Areas/Admin/Views/&lt;br&gt;
// Areas/Admin/Models/&lt;/p&gt;

&lt;p&gt;Step 2: Configure the Controller&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace YourApp.Areas.Admin.Controllers
{
    [Area("Admin")]
    [Route("Admin/[controller]/[action]")]
    public class DashboardController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3: Update Startup Configuration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.UseEndpoints(endpoints =&amp;gt;
    {
        endpoints.MapControllerRoute(
            name: "areas",
            pattern: "{area:exists}/{controller=Home}/{action=Index}/{id?}");

        endpoints.MapControllerRoute(
            name: "default",
            pattern: "{controller=Home}/{action=Index}/{id?}");
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Common Pitfalls and Solutions
&lt;/h1&gt;

&lt;h4&gt;
  
  
  The "God Controller" Anti-Pattern
&lt;/h4&gt;

&lt;p&gt;Without Areas, developers often create controllers like AdminController with dozens of actions for all administrative functions. This violates the Single Responsibility Principle and makes testing difficult.&lt;br&gt;
&lt;strong&gt;Solution:&lt;/strong&gt; Use an Admin area with focused controllers for each entity or feature.&lt;/p&gt;
&lt;h4&gt;
  
  
  View Location Issues
&lt;/h4&gt;

&lt;p&gt;Areas have their own view locations. If your views aren't rendering, check that they're in the correct area folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Areas/Admin/Views/Dashboard/Index.cshtml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Routing Conflicts
&lt;/h4&gt;

&lt;p&gt;Be explicit with your routes to avoid conflicts between areas and main application routes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Area("Admin")]
[Route("admin/[controller]/[action]")]
public class ProductController : Controller
{
    // Accessible at: /admin/product/index
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Advanced Tips
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Area-Specific Layouts
&lt;/h4&gt;

&lt;p&gt;Create area-specific layouts to give different sections of your application distinct looks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Areas/Admin/Views/Shared/_Layout.cshtml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Authorization by Area
&lt;/h4&gt;

&lt;p&gt;Apply authorization policies at the area level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Area("Admin")]
[Authorize(Policy = "AdminOnly")]
public class BaseAdminController : Controller
{
    // All admin controllers inherit from this
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Areas are one of ASP.NET Core's most underutilised features. They provide a clean, maintainable way to organise large applications without resorting to architectural gymnastics. Before you create that SuperAdminController or implement your own module system, consider whether Areas might be the solution you're looking for.&lt;br&gt;
Next time you start a new ASP.NET Core project that's going to grow beyond a handful of controllers, set up your Areas from the beginning. Your future self (and your team) will thank you.&lt;/p&gt;

&lt;h1&gt;
  
  
  Further Reading
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/aspnet/core/mvc/controllers/areas?view=aspnetcore-9.0" rel="noopener noreferrer"&gt;Official Microsoft Documentation on Areas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/aspnet/core/mvc/controllers/routing?view=aspnetcore-9.0#areas" rel="noopener noreferrer"&gt;Area Route Conventions in ASP.NET Core&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://scottsauber.com/2016/04/25/feature-folder-structure-in-asp-net-core/" rel="noopener noreferrer"&gt;Organizing ASP.NET Core Projects with Feature Folders&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Have you used Areas in your projects? What patterns have you found helpful? Share your experiences in the comments below!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>aspdotnet</category>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>🚀 Common C# Performance Optimization Myths</title>
      <dc:creator>Rumen Dimov</dc:creator>
      <pubDate>Tue, 05 Nov 2024 08:08:22 +0000</pubDate>
      <link>https://forem.com/rumendimov/common-c-performance-optimization-myths-4nd</link>
      <guid>https://forem.com/rumendimov/common-c-performance-optimization-myths-4nd</guid>
      <description>&lt;h2&gt;
  
  
  🤔 Common Myths That Don't Help
&lt;/h2&gt;

&lt;p&gt;Performance optimization in C# is often misunderstood, leading developers to adopt practices that either have negligible impact or sometimes even hurt performance. Let's explore some common myths and learn what actually works.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. 🔍 "LINQ is Always Clean and Fast Enough"
&lt;/h3&gt;

&lt;p&gt;LINQ provides elegant and readable code, but it can introduce significant performance overhead. Each LINQ operation potentially creates intermediate collections and unnecessary iterations. While LINQ is excellent for development speed and maintainability, in performance-critical paths it can be a bottleneck.&lt;/p&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%2Fl5v5ymyk6iwzhbfxzb17.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%2Fl5v5ymyk6iwzhbfxzb17.png" alt="linq myth performance" width="753" height="509"&gt;&lt;/a&gt;&lt;/p&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%2F45wg2uulens77iu1upkb.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%2F45wg2uulens77iu1upkb.png" alt="linq myth performance" width="710" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. 📏 "Always Pre-size Your Arrays"
&lt;/h3&gt;

&lt;p&gt;Developers often believe that pre-sizing collections always improves performance. While pre-sizing can help when you know the exact size needed, arbitrarily choosing a large initial capacity can waste memory and potentially slow down your application. The built-in growth algorithms in collections like List are well-optimized for most scenarios.&lt;/p&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%2F0aw44rqwf7aivlioe4i5.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%2F0aw44rqwf7aivlioe4i5.png" alt="Premature Array Sizing" width="735" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. 🏗️ "Structs Are Always Better for Performance"
&lt;/h3&gt;

&lt;p&gt;While value types can improve performance by reducing heap allocations and garbage collection, using large structs can actually degrade performance. Every time a struct is passed as a parameter or assigned to a variable, its entire contents are copied. For larger objects, this copying overhead can exceed any benefits from avoiding heap allocation.&lt;/p&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%2Fobvua97xcnjzw3aaz3ni.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%2Fobvua97xcnjzw3aaz3ni.png" alt="Using struct Instead of class for Performance" width="779" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  ⚡ Real Performance Optimizations That Work
&lt;/h1&gt;

&lt;h3&gt;
  
  
  1. 🎯 Efficient Memory Management with Span
&lt;/h3&gt;

&lt;p&gt;Span is like a superhero for memory operations! It provides zero-allocation access to memory and eliminates bounds checking in tight loops.&lt;/p&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%2Fivwefilzccgk2pnb5zx8.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%2Fivwefilzccgk2pnb5zx8.png" alt="Efficient Memory Management with Span&amp;lt;T&amp;gt;" width="745" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. 🔑 Proper Value-Based Equality Implementation
&lt;/h3&gt;

&lt;p&gt;Think of this as giving your objects a unique fingerprint. Good hash codes and equality implementations can make collections like Dictionary and HashSet blazing fast!&lt;/p&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%2F625oa49eq4vxdkftkbni.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%2F625oa49eq4vxdkftkbni.png" alt="Proper Value-Based Equality Implementation" width="769" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. ♻️ Smart Array Pooling
&lt;/h3&gt;

&lt;p&gt;Think of ArrayPool as a recycling center for arrays. Instead of creating new arrays all the time, we can reuse existing ones!&lt;/p&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%2Fd6qhvl86w1p1d8jxga7t.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%2Fd6qhvl86w1p1d8jxga7t.png" alt="Smart Array Pooling" width="778" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. 📝 Optimized String Building
&lt;/h3&gt;

&lt;p&gt;StringBuilderCache is like having a personal assistant for string operations. It keeps track of and reuses StringBuilder instances for you!&lt;/p&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%2Fejzgfzlgbp9aquejs0g9.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%2Fejzgfzlgbp9aquejs0g9.png" alt="Optimized String Building" width="776" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Pro Tips
&lt;/h3&gt;

&lt;p&gt;🚦 Don't optimize prematurely - profile first!&lt;br&gt;
📏 Measure, don't guess&lt;br&gt;
🎯 Focus on algorithms first, micro-optimizations last&lt;br&gt;
🧪 Always test performance changes with real-world data&lt;br&gt;
📚 Keep learning about new .NET performance features&lt;/p&gt;

&lt;p&gt;There is a lot more that can be said and written about performance. In fact, there are books written on that subject but I wanted to share a few quick tips and share some of the common mistakes I have noticed people make. If I have gotten something wrong, please do correct me in the comments below. I always welcome cosntructive criticism, no one is perfect right! :)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>c</category>
      <category>dotnet</category>
      <category>programming</category>
    </item>
    <item>
      <title>Parkinson's Law in Software Development: How to Break the Time-Expansion Trap 🚀</title>
      <dc:creator>Rumen Dimov</dc:creator>
      <pubDate>Sun, 27 Oct 2024 07:40:44 +0000</pubDate>
      <link>https://forem.com/rumendimov/parkinsons-law-in-software-development-how-to-break-the-time-expansion-trap-28a0</link>
      <guid>https://forem.com/rumendimov/parkinsons-law-in-software-development-how-to-break-the-time-expansion-trap-28a0</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;"Work expands to fill the time available for its completion."&lt;/em&gt; - C. Northcote Parkinson&lt;/p&gt;

&lt;p&gt;This simple observation, known as Parkinson's Law, has profound implications for software development. In this guide, we'll explore how this law affects our development processes and learn practical strategies to harness it for better productivity. 🎯&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of Contents 📑
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Understanding Parkinson's Law in Software Development&lt;/li&gt;
&lt;li&gt;Common Pitfalls and Their Solutions&lt;/li&gt;
&lt;li&gt;Practical Strategies for Time Management&lt;/li&gt;
&lt;li&gt;Team Leadership and Project Management&lt;/li&gt;
&lt;li&gt;Real-World Implementation&lt;/li&gt;
&lt;li&gt;Measuring Success&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Understanding Parkinson's Law in Software Development 🤔
&lt;/h1&gt;

&lt;h4&gt;
  
  
  The Developer's Dilemma
&lt;/h4&gt;

&lt;p&gt;Have you ever noticed how a "simple" feature that should take a day somehow stretches into a week? Or how your team always seems to finish major releases just before the deadline, regardless of the timeline? That's Parkinson's Law in action.&lt;/p&gt;

&lt;p&gt;In software development, this manifests in several ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Feature scope gradually expanding ("This authentication system could really use social login...")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unnecessary optimization of working code ("Let me just refactor this working component...")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prolonged research phases ("I need to compare all 15 state management libraries...")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extended debugging sessions ("Let me optimize this function that runs once a day...")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Perfectionism in non-critical areas ("This internal admin panel needs more animations...")&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Common Pitfalls and Their Solutions ⚠️
&lt;/h1&gt;

&lt;h4&gt;
  
  
  1.The "Just One More Feature" Syndrome
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Real Example&lt;/strong&gt;: A team building an e-commerce checkout page initially planned for basic credit card processing. As time permitted, they kept adding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PayPal integration&lt;/li&gt;
&lt;li&gt;Apple Pay support&lt;/li&gt;
&lt;li&gt;Gift card functionality&lt;/li&gt;
&lt;li&gt;Multiple card saving&lt;/li&gt;
&lt;li&gt;Advanced receipt customization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define MVP clearly: "Credit card processing with email receipt"&lt;/li&gt;
&lt;li&gt;List future features separately for Phase 2&lt;/li&gt;
&lt;li&gt;Set explicit feature freeze dates&lt;/li&gt;
&lt;li&gt;Document scope expansion requests for future sprints&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. The Perfectionism Trap
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Real Example&lt;/strong&gt;: A developer spent three days optimizing a dashboard's loading time from 800ms to 400ms, when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Users only access it once per day&lt;/li&gt;
&lt;li&gt;The business requirement was "under 2 seconds"&lt;/li&gt;
&lt;li&gt;Critical bug fixes were pending&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define clear acceptance criteria upfront&lt;/li&gt;
&lt;li&gt;Set performance budgets based on business needs&lt;/li&gt;
&lt;li&gt;Use metrics to justify optimization time&lt;/li&gt;
&lt;li&gt;Maintain a prioritized technical debt backlog&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Practical Strategies for Time Management ⚡
&lt;/h1&gt;

&lt;h4&gt;
  
  
  1. Time Boxing
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Real-World Schedule Example:&lt;/strong&gt;&lt;/p&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%2Fcngowd2mkwy76s90g0oe.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%2Fcngowd2mkwy76s90g0oe.png" alt="diary example - tasks" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Task Decomposition
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Real Example&lt;/strong&gt;: Breaking down "Implement User Authentication"&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
"Add user authentication - 5 days"&lt;/p&gt;

&lt;p&gt;After:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Setup authentication routes (4 hours)

&lt;ul&gt;
&lt;li&gt;POST /login&lt;/li&gt;
&lt;li&gt;POST /register&lt;/li&gt;
&lt;li&gt;POST /forgot-password&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Implement email verification (4 hours)

&lt;ul&gt;
&lt;li&gt;Email service integration&lt;/li&gt;
&lt;li&gt;Verification token logic&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Password reset flow (4 hours)

&lt;ul&gt;
&lt;li&gt;Reset token generation&lt;/li&gt;
&lt;li&gt;Password update logic&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Security headers &amp;amp; rate limiting (2 hours)

&lt;ul&gt;
&lt;li&gt;CORS configuration&lt;/li&gt;
&lt;li&gt;Rate limiting middleware&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Team Leadership and Project Management 👥
&lt;/h1&gt;

&lt;h4&gt;
  
  
  1. Setting Realistic Deadlines
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Real Example&lt;/strong&gt;: E-commerce Site Launch&lt;/p&gt;

&lt;p&gt;Bad Approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"We need the full site in 3 months" → Team rushes, quality suffers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Better Approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Month 1: Product catalog + Basic search&lt;/li&gt;
&lt;li&gt;Month 2: Shopping cart + Checkout&lt;/li&gt;
&lt;li&gt;Month 3: User accounts + Order history&lt;/li&gt;
&lt;li&gt;Post-launch: Reviews, wishlists, recommendations&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Sprint Planning Strategies
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Real-World Example&lt;/strong&gt;:&lt;br&gt;
Two-Week Sprint Structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8 days for core features&lt;/li&gt;
&lt;li&gt;1 day for testing/QA&lt;/li&gt;
&lt;li&gt;1 day for documentation and deployment prep&lt;/li&gt;
&lt;li&gt;2 days buffer for unexpected issues&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Real-World Implementation 🛠️
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Case Study: Blog Platform Development
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Original Timeline&lt;/strong&gt;: 6 weeks&lt;br&gt;
&lt;strong&gt;Actual Delivery&lt;/strong&gt;: 4 weeks&lt;/p&gt;

&lt;p&gt;How They Beat Parkinson's Law:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Defined MVP strictly:

&lt;ul&gt;
&lt;li&gt;Basic post CRUD&lt;/li&gt;
&lt;li&gt;Simple authentication&lt;/li&gt;
&lt;li&gt;Markdown support&lt;/li&gt;
&lt;li&gt;Basic comments&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Moved to Phase 2:

&lt;ul&gt;
&lt;li&gt;Social sharing&lt;/li&gt;
&lt;li&gt;Rich text editor&lt;/li&gt;
&lt;li&gt;Analytics&lt;/li&gt;
&lt;li&gt;Tag system&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Daily Progress Tracking:

&lt;ul&gt;
&lt;li&gt;Morning: Set 3 main goals&lt;/li&gt;
&lt;li&gt;Evening: Review completion&lt;/li&gt;
&lt;li&gt;Document blockers&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Fixed Time Blocks:

&lt;ul&gt;
&lt;li&gt;90-minute focused coding sessions&lt;/li&gt;
&lt;li&gt;15-minute breaks&lt;/li&gt;
&lt;li&gt;No meetings Wednesday &amp;amp; Friday mornings&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Measuring Success 📊
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Key Metrics to Track
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Sprint completion rates

&lt;ul&gt;
&lt;li&gt;Target: 85%+ completion&lt;/li&gt;
&lt;li&gt;Track velocity trends&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Feature completion time

&lt;ul&gt;
&lt;li&gt;Compare estimates vs. actuals&lt;/li&gt;
&lt;li&gt;Document reasons for variances&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Technical debt ratio

&lt;ul&gt;
&lt;li&gt;Track bugs per feature&lt;/li&gt;
&lt;li&gt;Monitor refactoring needs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Team satisfaction

&lt;ul&gt;
&lt;li&gt;Regular pulse checks&lt;/li&gt;
&lt;li&gt;Stress level monitoring&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Customer feedback

&lt;ul&gt;
&lt;li&gt;User satisfaction scores&lt;/li&gt;
&lt;li&gt;Feature adoption rates&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Practical Tips for Implementation 💡
&lt;/h1&gt;

&lt;h4&gt;
  
  
  1. The 80/20 Rule in Action
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Real Example&lt;/strong&gt;: Shopping Cart Development&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;80% Value Features (Implement First):&lt;br&gt;
Add/remove items&lt;br&gt;
Update quantities&lt;br&gt;
Calculate total&lt;br&gt;
Proceed to checkout&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;20% Value Features (Defer):&lt;br&gt;
Save for later&lt;br&gt;
Share cart&lt;br&gt;
Product recommendations&lt;br&gt;
Recently viewed items&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Reality Checks
&lt;/h4&gt;

&lt;p&gt;Weekly Team Questions:&lt;/p&gt;

&lt;p&gt;1."What features did users actually use this week?"&lt;br&gt;
2."Which optimizations made a measurable impact?"&lt;br&gt;
3."What took longer than expected and why?"&lt;br&gt;
4."What could we have simplified?"&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion 🎉
&lt;/h1&gt;

&lt;p&gt;Understanding and actively managing Parkinson's Law in software development is crucial for successful project delivery. By implementing these strategies, you can help your team maintain focus, deliver value consistently, and avoid the common pitfalls of time expansion.&lt;br&gt;
Hope you enjoyed reading the article. I tried to come up with real world examples. If there is anything I have missed or I have gotten something, please do share and comment.&lt;/p&gt;

&lt;h4&gt;
  
  
  Action Items
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Audit your current project timeline&lt;/li&gt;
&lt;li&gt;Implement time-blocking next week&lt;/li&gt;
&lt;li&gt;Define strict MVP criteria&lt;/li&gt;
&lt;li&gt;Start tracking completion patterns&lt;/li&gt;
&lt;li&gt;Schedule weekly reality checks&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>LINQ Cheatsheet: The Ultimate Guide for Modern .NET Development 🚀</title>
      <dc:creator>Rumen Dimov</dc:creator>
      <pubDate>Sun, 27 Oct 2024 06:35:11 +0000</pubDate>
      <link>https://forem.com/rumendimov/linq-cheatsheet-the-ultimate-guide-for-modern-net-development-467h</link>
      <guid>https://forem.com/rumendimov/linq-cheatsheet-the-ultimate-guide-for-modern-net-development-467h</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;LINQ (Language Integrated Query) is a game-changing feature in C# that revolutionizes how we work with data. Whether you're manipulating collections, querying databases, or processing XML, LINQ provides a unified, elegant approach to data manipulation. This comprehensive cheatsheet will boost your productivity with LINQ and help you write more maintainable code.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of Contents 📑
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Basic LINQ Operations&lt;/li&gt;
&lt;li&gt;Filtering and Finding Elements&lt;/li&gt;
&lt;li&gt;Ordering and Grouping&lt;/li&gt;
&lt;li&gt;Projection Operations&lt;/li&gt;
&lt;li&gt;Aggregation Functions&lt;/li&gt;
&lt;li&gt;Set Operations&lt;/li&gt;
&lt;li&gt;Best Practices and Performance Tips&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  1.Basic LINQ Operations ⚡
&lt;/h1&gt;

&lt;p&gt;LINQ offers two ways to write queries: query syntax and method syntax. Query syntax might feel more natural for developers coming from SQL backgrounds, while method syntax offers better IntelliSense support and is often more concise. Both approaches are functionally equivalent, so choose the one that makes your code more readable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Query Syntax vs Method Syntax
&lt;/h3&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%2Fpdg3j4b6368kcf6zr9ck.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%2Fpdg3j4b6368kcf6zr9ck.png" alt="basic LINQ operations - Query Syntax vs Method Syntax" width="763" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2.Filtering and Finding Elements 🔍
&lt;/h1&gt;

&lt;p&gt;Filtering operations are the bread and butter of LINQ. These methods help you search through collections to find specific elements or subsets that match your criteria. Whether you need a single item or multiple items matching certain conditions, LINQ provides precise tools for the job.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where - Filter Elements
&lt;/h3&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%2F3ziml98zpmqsp976nmoy.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%2F3ziml98zpmqsp976nmoy.png" alt="linq queries - how to filter elements" width="800" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3.Ordering and Grouping 📊
&lt;/h1&gt;

&lt;p&gt;When you need to organize your data, LINQ's ordering and grouping operations come to the rescue. These methods help you sort collections based on one or more criteria and group related items together, perfect for creating hierarchical data structures or preparing data for presentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  OrderBy and ThenBy
&lt;/h3&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%2Fgo1ywtf6n47lzbbvkm4j.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%2Fgo1ywtf6n47lzbbvkm4j.png" alt="linq - how to order and group by" width="424" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4.Projection Operations 🔄
&lt;/h1&gt;

&lt;p&gt;Projection operations transform your data from one form to another. These are essential for mapping data between different types, extracting specific properties, or flattening nested collections. Think of projection as reshaping your data to match your needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Select and SelectMany
&lt;/h3&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%2F96bpfcyl19q4xu187is1.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%2F96bpfcyl19q4xu187is1.png" alt="linq - how to use select and selectMany" width="726" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  5.Aggregation Functions 📈
&lt;/h1&gt;

&lt;p&gt;Aggregation functions help you compute summary values from your collections. Whether you need to count items, calculate averages, or find extreme values, these methods provide a concise way to analyze your data and extract meaningful insights.&lt;/p&gt;

&lt;h3&gt;
  
  
  Count, Sum, Average, Min, Max
&lt;/h3&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%2F5d5mu4vwfy7dgrck1cmf.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%2F5d5mu4vwfy7dgrck1cmf.png" alt="linq - Aggregation Functions" width="411" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  6.Set Operations 🎯
&lt;/h1&gt;

&lt;p&gt;Set operations treat collections as mathematical sets, allowing you to combine, compare, and contrast different collections. These operations are particularly useful when you need to find common elements, unique items, or differences between collections.&lt;/p&gt;

&lt;h3&gt;
  
  
  Distinct, Union, Intersect, Except
&lt;/h3&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%2Fgyy38mzuy3qd9onh5h2q.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%2Fgyy38mzuy3qd9onh5h2q.png" alt="linq - set operation - distinct, union, intersect, except" width="525" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  7.Best Practices and Performance Tips ⚡
&lt;/h1&gt;

&lt;p&gt;Understanding these best practices will help you write more efficient LINQ queries and avoid common pitfalls. LINQ's deferred execution model can be both powerful and tricky - knowing how and when queries are executed is crucial for writing performant code.&lt;/p&gt;

&lt;h4&gt;
  
  
  Deferred Execution ⏳
&lt;/h4&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%2Fm4mk1czzc4t3okplrrth.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%2Fm4mk1czzc4t3okplrrth.png" alt="linq - Deferred Execution" width="600" height="94"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Use Appropriate Methods 🎯
&lt;/h4&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%2Fipfrrtst6abxlzduurlr.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%2Fipfrrtst6abxlzduurlr.png" alt="linq - best practice" width="708" height="60"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Avoid Multiple Enumeration ⚠️
&lt;/h4&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%2Fblgkqgdykbuwkidzyll5.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%2Fblgkqgdykbuwkidzyll5.png" alt="linq - Avoid Multiple Enumeration" width="527" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion 🎉
&lt;/h1&gt;

&lt;p&gt;LINQ is an incredibly powerful tool in the .NET ecosystem. This cheatsheet covers the most common operations you'll need in your daily development work. Remember that LINQ's true power lies in its composability – you can chain these operations together to create complex data transformations with clean, readable code.&lt;br&gt;
I hope most of you find this post helpful. Those of you who are more advanced and have a good grasp on LINQ, please do share/comment if I have missed anything. I think there is a lot to say in terms of performance optimization but this is a topic for another post I guess.&lt;/p&gt;

&lt;p&gt;P.S. I used Rider JetBrains to write the examples. It is finally free for Non-Commercial use, go check it out if you are fed up with Visual Studio.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnetframework</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
