Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access

Day: January 22, 2026

C#

C# Dictionary Lookups Are Slower Than Expected

- 22.01.26 - ErcanOPAK comment on C# Dictionary Lookups Are Slower Than Expected

O(1) isn’t always fast. Why it happensBad hash distribution. Why it mattersHigh-frequency code suffers. Smart fixUse value types with good hash codes.

Read More
C#

C# Records Cause Unexpected Copies

- 22.01.26 - ErcanOPAK comment on C# Records Cause Unexpected Copies

Performance drops silently. Why it happensValue-based equality. Why it mattersLarge objects get copied. Smart fixUse records for small immutable models only.

Read More
C#

C# Async Methods Look Async But Aren’t

- 22.01.26 - ErcanOPAK comment on C# Async Methods Look Async But Aren’t

Await everywhere, still blocking. Why it happensSynchronous IO inside async methods. Why it mattersThread starvation. Smart fixUse true async APIs only.

Read More
SQL

SQL Date Comparisons Kill Indexes

- 22.01.26 - ErcanOPAK comment on SQL Date Comparisons Kill Indexes

Indexes exist, unused. Why it happensFunctions on columns. Why it mattersFull table scans. Smart fixCompare ranges instead. WHERE CreatedAt >= ‘2024-01-01’ AND CreatedAt < ‘2024-02-01’  

Read More
SQL

SQL Queries Slow After Index Added

- 22.01.26 - ErcanOPAK comment on SQL Queries Slow After Index Added

Index made it worse. Why it happensWrong column order. Why it mattersOptimizer chooses bad plans. Smart fixIndex on filter columns first.

Read More
Asp.Net Core

.NET Core Background Services Block Shutdown

- 22.01.26 - ErcanOPAK comment on .NET Core Background Services Block Shutdown

App hangs on exit. Why it happensNo cancellation handling. Why it mattersContainers fail to stop. Smart fixAlways pass CancellationToken.

Read More
Asp.Net Core

ASP.NET Core APIs Spike Memory Suddenly

- 22.01.26 - ErcanOPAK comment on ASP.NET Core APIs Spike Memory Suddenly

No traffic spike, memory spike. Why it happensObject pooling misuse. Why it mattersUnexpected restarts. Smart fixAvoid pooling large objects.

Read More
Git

Git Repos Become Heavy Over Time

- 22.01.26 - ErcanOPAK comment on Git Repos Become Heavy Over Time

Clone gets slower. Why it happensLarge files tracked forever. Why it mattersCI pipelines slow down. Smart fixUse Git LFS early.

Read More
Git

Git Merges Look Correct But Logic Breaks

- 22.01.26 - ErcanOPAK comment on Git Merges Look Correct But Logic Breaks

No conflicts, still bugs. Why it happensSemantic conflicts are invisible. Why it mattersProduction errors. Smart fixRebase for logic clarity.

Read More
Ajax

Ajax Responses Arrive Out of Order

- 22.01.26 - ErcanOPAK comment on Ajax Responses Arrive Out of Order

Old data overwrites new. Why it happensRequests return unpredictably. Why it mattersUI shows wrong state. Smart fixCancel previous requests.

Read More
JavaScript

JavaScript Timers Drift Over Time

- 22.01.26 - ErcanOPAK comment on JavaScript Timers Drift Over Time

Intervals lose accuracy. Why it happenssetInterval stacks delays. Why it mattersAnimations and polling drift. Smart fixUse recursive setTimeout.

Read More
HTML

HTML Inputs Behave Differently Across Browsers

- 22.01.26 - ErcanOPAK comment on HTML Inputs Behave Differently Across Browsers

Same markup, different results. Why it happensBrowser-specific default behaviors. Why it mattersForms break silently. Smart fixAlways specify input types explicitly.

Read More
CSS

CSS Layout Breaks on Mobile Only

- 22.01.26 - ErcanOPAK comment on CSS Layout Breaks on Mobile Only

Desktop perfect, mobile chaos. Why it happensFixed widths ignore viewport. Why it mattersMobile users bounce. Smart fixUse min() and max(). .container { width: min(100%, 1200px); }  

Read More
Windows

Windows 11 File Explorer Is Slow

- 22.01.26 - ErcanOPAK comment on Windows 11 File Explorer Is Slow

Opening folders lags. Why it happensQuick Access cache bloats. Why it mattersDaily productivity loss. Smart fixClear Quick Access history.

Read More
Windows

Windows 11 Fans Spin After Sleep

- 22.01.26 - ErcanOPAK comment on Windows 11 Fans Spin After Sleep

Laptop wakes up hot. Why it happensFast Startup conflicts with drivers. Why it mattersBattery drains overnight. Smart fixDisable Fast Startup.

Read More
AI

AI Prompt — Life / Work Clarity (General)

- 22.01.26 - ErcanOPAK comment on AI Prompt — Life / Work Clarity (General)

Help me simplify this decision. Identify what actually matters vs what feels urgent. Context: <DESCRIBE>  

Read More
AI

AI Prompt — Performance Root Cause (Coding)

- 22.01.26 - ErcanOPAK comment on AI Prompt — Performance Root Cause (Coding)

Assume this code is slow in production. List 5 realistic performance bottlenecks and how to verify each. Code: <PASTE CODE>  

Read More
AI

AI Prompt — Legacy Code Understanding

- 22.01.26 | 22.01.26 - ErcanOPAK comment on AI Prompt — Legacy Code Understanding

Explain what this code does as if I will maintain it for 5 years. Highlight risks, assumptions, and hidden dependencies. Code: <PASTE CODE>  

Read More
Docker

Docker Containers Randomly Exit on Windows

- 22.01.26 - ErcanOPAK comment on Docker Containers Randomly Exit on Windows

Works on Linux, fails on Windows. Why it happensLine endings break shell scripts. Why it mattersCross-platform builds fail unexpectedly. Smart fixForce LF endings.

Read More
Kubernetes

Kubernetes Pods Restart Without Errors

- 22.01.26 - ErcanOPAK comment on Kubernetes Pods Restart Without Errors

No crash logs, still restarts. Why it happensLiveness probe fails silently. Why it mattersYour app is healthy — Kubernetes thinks it isn’t. Smart fixSeparate readiness and liveness logic.

Read More
Wordpress

WordPress Database Grows Without Content Growth

- 22.01.26 - ErcanOPAK comment on WordPress Database Grows Without Content Growth

Same content, bigger DB. Why it happensPost revisions accumulate silently. Why it mattersBackups slow down, queries degrade. Smart fixLimit revisions. define(‘WP_POST_REVISIONS’, 5);  

Read More
Wordpress

WordPress Cron Jobs Run at the Worst Time

- 22.01.26 - ErcanOPAK comment on WordPress Cron Jobs Run at the Worst Time

Scheduled tasks slow down visitors. Why it happensWP-Cron runs on page load. Why it mattersTraffic spikes = slow site. Smart fixDisable WP-Cron and use real server cron.

Read More
Photoshop

Photoshop Blurs Look Dirty Instead of Smooth

- 22.01.26 - ErcanOPAK comment on Photoshop Blurs Look Dirty Instead of Smooth

Gaussian blur ruins the image. Why it happensLow bit-depth images cause banding. Why it mattersPrints and exports lose quality. Smart fixSwitch to 16-bit before blurring.

Read More
Photoshop

Photoshop Feels Laggy Even on Powerful Machines

- 22.01.26 - ErcanOPAK comment on Photoshop Feels Laggy Even on Powerful Machines

GPU is strong, RAM is plenty… still lag. Why it happensScratch disk is using a slow drive. Why it mattersEvery heavy operation hits disk, not RAM. Smart fixMove scratch disk to fastest SSD.

Read More
Visual Studio

Visual Studio Builds Are Fast — Debug Is Slow (And Why)

- 22.01.26 - ErcanOPAK comment on Visual Studio Builds Are Fast — Debug Is Slow (And Why)

Your build finishes instantly, but debugging takes ages. Why it happensThe debugger loads symbols, evaluates locals, and tracks breakpoints before execution. Why it mattersYou think your code is slow, but the bottleneck is the debugging layer. Smart moveDisable unnecessary symbol loading and reduce watch expressions. Tools → Options → Debugging → Symbols Uncheck unused symbol […]

Read More
January 2026
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Dec    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (924)
  • How to add default value for Entity Framework migrations for DateTime and Bool (819)
  • Get the First and Last Word from a String or Sentence in SQL (815)
  • How to select distinct rows in a datatable in C# (789)
  • How to make theater mode the default for Youtube (687)
  • Add Constraint to SQL Table to ensure email contains @ (565)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (544)
  • Average of all values in a column that are not zero in SQL (512)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (466)
  • Find numbers with more than two decimal places in SQL (432)

Recent Posts

  • Why foreach Is Sometimes Slower Than for
  • The Hidden Cost of Exceptions as Flow Control
  • Why lock Can Kill Throughput
  • Indexes Can Make Queries Slower (Here’s Why)
  • Why SELECT * Slowly Destroys Performance
  • The Real Cost of IHostedService Misuse
  • Why Async Controllers Still Block Threads
  • Stop Using git pull (Yes, Really)
  • Why Git Rebase “Loses” Commits (It Doesn’t — You Did)
  • Why Fetch Requests “Randomly” Hang (But Server Is Fine)

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (924)
  • How to add default value for Entity Framework migrations for DateTime and Bool (819)
  • Get the First and Last Word from a String or Sentence in SQL (815)
  • How to select distinct rows in a datatable in C# (789)
  • How to make theater mode the default for Youtube (687)

Recent Posts

  • Why foreach Is Sometimes Slower Than for
  • The Hidden Cost of Exceptions as Flow Control
  • Why lock Can Kill Throughput
  • Indexes Can Make Queries Slower (Here’s Why)
  • Why SELECT * Slowly Destroys Performance

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com