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
  • Privacy Policy

Author: ErcanOPAK

Photoshop

Photoshop File Size Explodes After Minor Edits

- 23.01.26 - ErcanOPAK comment on Photoshop File Size Explodes After Minor Edits

Same image, double size. Why it happensHidden metadata and history states. Why it mattersSlow loading pages and heavy assets. Vital fix File → Export → Remove Metadata  

Read More
Photoshop

Photoshop Exports Look Sharp on Screen but Soft on Web

- 23.01.26 - ErcanOPAK comment on Photoshop Exports Look Sharp on Screen but Soft on Web

Looks fine locally, blurry online. Why it happensIncorrect resampling during export. Why it mattersYour design loses perceived quality. Vital fix Use Export As → Resample: Bicubic Sharper

Read More
Visual Studio

Visual Studio Breakpoints Randomly Stop Working

- 23.01.26 - ErcanOPAK comment on Visual Studio Breakpoints Randomly Stop Working

Breakpoints are set… but never hit. Why it happensThe running assembly is not the one you built. Shadow copies or stale DLLs are loaded. Why it mattersYou debug the wrong binary and waste hours. Vital fix Clean Solution Delete bin / obj Disable “Just My Code” temporarily  

Read More
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 | 15.02.26 - ErcanOPAK comment on Docker Containers Randomly Exit on Windows

The Mystery: Your Docker image builds perfectly on Linux or CI/CD, but the moment you or a teammate tries to run it on Windows, the container exits instantly with a cryptic exec format error or standard_init_linux.go:211: exec user process caused “no such file or directory”. The Culprit: It’s not your code; it’s the invisible characters […]

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
C#

C# String Concatenation in Loops

- 21.01.26 - ErcanOPAK comment on C# String Concatenation in Loops

Simple loop, big cost. Why it happensImmutable strings. Why it mattersMemory churn. Smart fixUse StringBuilder. var sb = new StringBuilder();  

Read More
C#

C# Exceptions Used for Flow Control

- 21.01.26 - ErcanOPAK comment on C# Exceptions Used for Flow Control

Code “works”, performance suffers. Why it happensExceptions are expensive. Why it mattersHidden CPU cost. Smart fixUse conditional checks instead.

Read More
Page 33 of 69
« Previous 1 … 28 29 30 31 32 33 34 35 36 37 38 … 69 Next »

Posts navigation

Older posts
Newer posts
April 2026
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  
« Mar    

Most Viewed Posts

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

Recent Posts

  • C#: Use Init-Only Setters for Immutable Objects After Construction
  • C#: Use Expression-Bodied Members for Concise Single-Line Methods
  • C#: Enable Nullable Reference Types to Eliminate Null Reference Exceptions
  • C#: Use Record Types for Immutable Data Objects
  • SQL: Use CTEs for Readable Complex Queries
  • SQL: Use Window Functions for Advanced Analytical Queries
  • .NET Core: Use Background Services for Long-Running Tasks
  • .NET Core: Use Minimal APIs for Lightweight HTTP Services
  • Git: Use Cherry-Pick to Apply Specific Commits Across Branches
  • Git: Use Interactive Rebase to Clean Up Commit History Before Merge

Most Viewed Posts

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

Recent Posts

  • C#: Use Init-Only Setters for Immutable Objects After Construction
  • C#: Use Expression-Bodied Members for Concise Single-Line Methods
  • C#: Enable Nullable Reference Types to Eliminate Null Reference Exceptions
  • C#: Use Record Types for Immutable Data Objects
  • SQL: Use CTEs for Readable Complex Queries

Social

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