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

AI

AI Prompt — Find Hidden Performance Bottlenecks

- 01.01.26 - ErcanOPAK comment on AI Prompt — Find Hidden Performance Bottlenecks

Prompt Act as a senior performance engineer. Analyze the following code. Identify: – Hidden allocations – Blocking calls – Thread pool starvation risks Suggest fixes with reasoning. Code: <PASTE CODE>  

Read More
Docker

Docker Build Is Slow Even With Cache

- 01.01.26 - ErcanOPAK comment on Docker Build Is Slow Even With Cache

You changed one line… everything rebuilt. Why it happensCOPY instructions invalidate layers. FixCopy dependency files first, source files last.

Read More
Kubernetes

Kubernetes Pod Restarts With No Error Logs

- 01.01.26 - ErcanOPAK comment on Kubernetes Pod Restarts With No Error Logs

Looks healthy… until it isn’t. Why it happensThe container is killed before logging (OOMKill). How to confirmCheck pod events, not container logs.

Read More
Wordpress

WordPress Login Keeps Failing Behind Cloudflare

- 01.01.26 - ErcanOPAK comment on WordPress Login Keeps Failing Behind Cloudflare

Correct password, endless redirects. Why it happensX-Forwarded-Proto header missing → HTTPS confusion. FixForce SSL detection in wp-config.php.

Read More
Wordpress

WordPress Suddenly Gets Slow After “Just One Plugin”

- 01.01.26 - ErcanOPAK comment on WordPress Suddenly Gets Slow After “Just One Plugin”

Classic WordPress horror story. Why it happensPlugins hook into init and wp_loaded, running on every request. Life-saving moveDisable plugins one by one while profiling (Query Monitor).

Read More
Photoshop

Photoshop Slows Down Over Time Without Crashing

- 01.01.26 - ErcanOPAK comment on Photoshop Slows Down Over Time Without Crashing

No errors, no warnings — just pain. Root causeHistory states and hidden smart objects silently eat RAM. FixLower History States + periodically rasterize unused layers.

Read More
Photoshop

Photoshop Export Looks Different on Every Screen

- 01.01.26 - ErcanOPAK comment on Photoshop Export Looks Different on Every Screen

Your design looks perfect… except everywhere else. Why it happensWide-gamut monitors + unmanaged color profiles = visual chaos. FixConvert image to sRGB IEC61966-2.1 before export.

Read More
Visual Studio

Visual Studio Runs Fine… Until You Attach Debugger

- 01.01.26 | 01.01.26 - ErcanOPAK comment on Visual Studio Runs Fine… Until You Attach Debugger

Ever noticed your app slowing down only when debugging? Why it happensThe debugger disables certain JIT optimizations and adds tracking hooks. Why it mattersPerformance bugs may disappear in Release but appear in Debug — or vice versa. Life-saving tipAlways reproduce performance issues using Release + Attach to Process.

Read More
C#

C# — GC.Collect() Hurts More Than It Helps

- 31.12.25 - ErcanOPAK comment on C# — GC.Collect() Hurts More Than It Helps

Manual GC kills performance. Rule Let the runtime decide.

Read More
C#

C# — async void Event Handlers Swallow Exceptions

- 31.12.25 - ErcanOPAK comment on C# — async void Event Handlers Swallow Exceptions

Crashes disappear silently. Fix Wrap logic with try/catch and logging.

Read More
C#

C# — Equals Without Operator Overload Is Inconsistent

- 31.12.25 - ErcanOPAK comment on C# — Equals Without Operator Overload Is Inconsistent

== and Equals() behave differently. Fix Override both consistently.

Read More
SQL

SQL — LIKE ‘%text%’ Forces Full Table Scan

- 31.12.25 - ErcanOPAK comment on SQL — LIKE ‘%text%’ Forces Full Table Scan

Leading wildcard kills indexes. Fix Use full-text search where possible.

Read More
SQL

SQL — ROW_NUMBER() Without Index Is Expensive

- 31.12.25 - ErcanOPAK comment on SQL — ROW_NUMBER() Without Index Is Expensive

Pagination becomes slow on big tables. Fix Index the ORDER BY column.

Read More
Asp.Net Core

.NET Core — IHttpContextAccessor Is Not Free

- 31.12.25 - ErcanOPAK comment on .NET Core — IHttpContextAccessor Is Not Free

It adds overhead per request. Tip Avoid in hot paths.

Read More
Asp.Net Core

.NET Core — Thread Pool Starvation Looks Like CPU Idle

- 31.12.25 - ErcanOPAK comment on .NET Core — Thread Pool Starvation Looks Like CPU Idle

CPU low, requests slow. Cause Blocking async code. Fix Eliminate .Wait() / .Result.

Read More
Git

Git — git clean Can Delete Important Files

- 31.12.25 | 31.12.25 - ErcanOPAK comment on Git — git clean Can Delete Important Files

git clean -fd is destructive. Fix Always dry-run: git clean -n  

Read More
Git

Git — Rebase Can Rewrite Shared History

- 31.12.25 - ErcanOPAK comment on Git — Rebase Can Rewrite Shared History

Rebasing public branches breaks teammates. Rule Only rebase local, private branches.

Read More
Ajax / JavaScript

AJAX — Network Requests Blocked by Mixed Content

- 31.12.25 - ErcanOPAK comment on AJAX — Network Requests Blocked by Mixed Content

HTTPS page calling HTTP endpoint fails silently. Fix Serve everything over HTTPS.

Read More
JavaScript

JavaScript — map() Without Return Creates Undefined Arrays

- 31.12.25 - ErcanOPAK comment on JavaScript — map() Without Return Creates Undefined Arrays

Easy-to-miss bug. Fix Always return explicitly inside map.

Read More
HTML

HTML5 — defer Beats async for Script Order

- 31.12.25 - ErcanOPAK comment on HTML5 — defer Beats async for Script Order

async breaks dependency order. Fix Use defer for predictable loading.

Read More
CSS

CSS — aspect-ratio Fixes Responsive Media Instantly

- 31.12.25 - ErcanOPAK comment on CSS — aspect-ratio Fixes Responsive Media Instantly

Stop using padding hacks. video { aspect-ratio: 16 / 9; }  

Read More
Windows

Windows 11 — Bluetooth Lag Kills Headphones Quality

- 31.12.25 - ErcanOPAK comment on Windows 11 — Bluetooth Lag Kills Headphones Quality

Hands-free profile switches silently. Fix Disable Hands-Free Telephony in device settings.

Read More
Windows

Windows 11 — Random App Freezes? It’s Hardware GPU Scheduling

- 31.12.25 - ErcanOPAK comment on Windows 11 — Random App Freezes? It’s Hardware GPU Scheduling

GPU scheduling can cause instability. Fix Disable Hardware-accelerated GPU scheduling.

Read More
AI

AI Prompt — SQL Performance Tuning Assistant

- 31.12.25 - ErcanOPAK comment on AI Prompt — SQL Performance Tuning Assistant

Prompt: You are a SQL performance expert. Analyze this query and execution plan. Return: – Index suggestions – Query rewrites – Expected performance impact SQL: <QUERY>  

Read More
AI

AI Prompt — Refactor Code Without Breaking Behavior

- 31.12.25 - ErcanOPAK comment on AI Prompt — Refactor Code Without Breaking Behavior

Prompt: Refactor the following code for readability and performance. Rules: – No behavior change – No new dependencies – Explain every important change briefly Code: <PASTE CODE>  

Read More
AI

AI Prompt — Debugging a Production Error (High Signal)

- 31.12.25 - ErcanOPAK comment on AI Prompt — Debugging a Production Error (High Signal)

Prompt: You are a senior software engineer. Analyze the following error log. Explain: 1) Root cause 2) Why it happens intermittently 3) How to fix it safely in production 4) How to prevent it in the future Log: <PASTE LOG HERE>  

Read More
Docker

Docker — Containers Slow Because of OverlayFS

- 31.12.25 - ErcanOPAK comment on Docker — Containers Slow Because of OverlayFS

OverlayFS slows heavy file IO. Fix Use volumes for write-heavy paths.

Read More
Kubernetes

Kubernetes — Pod Restarts Without Errors

- 31.12.25 - ErcanOPAK comment on Kubernetes — Pod Restarts Without Errors

Pod restarts but logs are empty. Cause OOMKill (Out Of Memory) Fix Check: kubectl describe pod  

Read More
Wordpress

WordPress — REST API Auth Failures Behind CDN

- 31.12.25 - ErcanOPAK comment on WordPress — REST API Auth Failures Behind CDN

CDNs often strip auth headers. Fix Whitelist Authorization header in CDN config.

Read More
Wordpress

WordPress — Admin AJAX Causing High CPU Usage

- 31.12.25 - ErcanOPAK comment on WordPress — Admin AJAX Causing High CPU Usage

admin-ajax.php can be abused by plugins. Fix Limit or cache AJAX calls; audit plugins.

Read More
Page 47 of 69
« Previous 1 … 42 43 44 45 46 47 48 49 50 51 52 … 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 (859)
  • 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 (754)
  • 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 (448)

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 (859)
  • 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 (754)

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