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 — Debug Code Like a Production Engineer

- 06.01.26 - ErcanOPAK comment on AI Prompt — Debug Code Like a Production Engineer

Prompt: Act as a senior production engineer. Explain: – Why this code works locally but fails under load – Hidden assumptions – The most likely real-world failure point Code: <PASTE CODE>  

Read More
Docker

Docker Containers Restart in a Loop

- 06.01.26 - ErcanOPAK comment on Docker Containers Restart in a Loop

Exit code 0 but container dies. WhyMain process exits immediately. FixEnsure a blocking foreground process.

Read More
Kubernetes

Kubernetes Pods Get Killed Without Errors

- 06.01.26 - ErcanOPAK comment on Kubernetes Pods Get Killed Without Errors

No logs. Just gone. WhyOOMKill triggered before logging flush. FixIncrease memory requests, not limits.

Read More
Wordpress

WordPress REST API Returns 401 Only in Production

- 06.01.26 - ErcanOPAK comment on WordPress REST API Returns 401 Only in Production

Local works, live breaks. WhySecurity plugins block unauthenticated REST calls. FixWhitelist REST routes explicitly.

Read More
Wordpress

WordPress Pages Randomly Lose Styles

- 06.01.26 - ErcanOPAK comment on WordPress Pages Randomly Lose Styles

Refresh fixes it… sometimes. WhyCSS is served before dynamic plugins finish execution. FixForce CSS loading order and avoid inline dynamic styles.

Read More
Photoshop

Photoshop Colors Look Different After Export

- 06.01.26 - ErcanOPAK comment on Photoshop Colors Look Different After Export

Perfect inside Photoshop, wrong everywhere else. WhyMissing or incorrect color profile. FixAlways convert to sRGB before export.

Read More
Photoshop

Photoshop Uses 100% CPU While Idle

- 06.01.26 - ErcanOPAK comment on Photoshop Uses 100% CPU While Idle

Nothing is open, fans go crazy. WhyPhotoshop continuously re-renders GPU previews. FixDisable Animated Zoom and Scrubby Zoom.

Read More
Visual Studio

Visual Studio Builds Succeed but App Runs Old Code

- 06.01.26 - ErcanOPAK comment on Visual Studio Builds Succeed but App Runs Old Code

You change the code, rebuild… nothing changes. WhyVisual Studio may reuse cached binaries when project references are unchanged. ImpactYou debug a version that no longer exists. Fix Disable Fast Up-To-Date Check Force MSBuild execution <PropertyGroup> <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> </PropertyGroup>  

Read More
C#

Static State Causes Test Flakiness

- 05.01.26 - ErcanOPAK comment on Static State Causes Test Flakiness

Tests pass alone, fail together. WhyShared static state leaks between tests. Fix Avoid statics in business logic.

Read More
C#

List.ForEach Hides Exceptions

- 05.01.26 - ErcanOPAK comment on List.ForEach Hides Exceptions

Errors vanish. WhyExceptions thrown inside delegates are harder to trace. Fix Use explicit loops for critical logic.

Read More
C#

Task.Run Inside ASP.NET Core Hurts Scalability

- 05.01.26 - ErcanOPAK comment on Task.Run Inside ASP.NET Core Hurts Scalability

Seems async, kills throughput. WhyConsumes thread pool threads. Fix Use async APIs instead of offloading.

Read More
SQL

SQL Deadlocks Only Happen at Night

- 05.01.26 - ErcanOPAK comment on SQL Deadlocks Only Happen at Night

Daytime works fine. WhyBatch jobs compete for locks. FixLower isolation level for reporting jobs.

Read More
SQL

SQL Queries Slow After Adding Index

- 05.01.26 - ErcanOPAK comment on SQL Queries Slow After Adding Index

Counterintuitive but real. WhyOptimizer chooses suboptimal plan. FixUpdate statistics after index changes.

Read More
Asp.Net Core

Configuration Reload Breaks Running Requests

- 05.01.26 - ErcanOPAK comment on Configuration Reload Breaks Running Requests

Hot reload causes instability. WhyOptions snapshot changes mid-request. Fix Use IOptionsMonitor carefully.

Read More
Asp.Net Core

ASP.NET Core Background Tasks Stop Randomly

- 05.01.26 - ErcanOPAK comment on ASP.NET Core Background Tasks Stop Randomly

Works until traffic spikes. WhyTasks tied to request lifetime. Fix Use IHostedService for background work.

Read More
Git

Git Bisect Finds the Wrong Commit

- 05.01.26 - ErcanOPAK comment on Git Bisect Finds the Wrong Commit

Debugging goes nowhere. WhyNon-deterministic tests. FixStabilize tests before bisecting.

Read More
Git

Git Shows Merge Conflicts That Make No Sense

- 05.01.26 - ErcanOPAK comment on Git Shows Merge Conflicts That Make No Sense

Files look identical. WhyWhitespace or encoding differences. FixNormalize file encoding across repo.

Read More
Ajax / JavaScript

Ajax Requests Randomly Return Empty Responses

- 05.01.26 - ErcanOPAK comment on Ajax Requests Randomly Return Empty Responses

No errors, no data. WhyServer closes connection before body flush. FixExplicitly flush response on server side.

Read More
JavaScript

JavaScript Timers Drift Over Time

- 05.01.26 - ErcanOPAK comment on JavaScript Timers Drift Over Time

Intervals lose accuracy. WhysetInterval accumulates delay. Fix Use recursive setTimeout with timestamps.

Read More
HTML

HTML5 Input Autofill Breaks Layout

- 05.01.26 - ErcanOPAK comment on HTML5 Input Autofill Breaks Layout

Unexpected styling appears. WhyBrowser injects default styles. Fix input:-webkit-autofill { transition: background-color 9999s; }  

Read More
CSS

CSS position: fixed Jitters on Mobile

- 05.01.26 - ErcanOPAK comment on CSS position: fixed Jitters on Mobile

UI shakes while scrolling. WhyMobile browsers repaint fixed layers. Fix will-change: transform;  

Read More
Windows

Windows 11 Screen Locks Randomly

- 05.01.26 - ErcanOPAK comment on Windows 11 Screen Locks Randomly

Even while working. WhyPower plan misconfiguration. FixAdjust advanced power plan sleep timers.

Read More
Windows

Windows 11 Apps Take Forever to Open

- 05.01.26 - ErcanOPAK comment on Windows 11 Apps Take Forever to Open

CPU idle, disk quiet. WhyBroken app indexing and corrupted app cache. FixReset Windows app cache.

Read More
AI

AI Prompt — Make Better Decisions Under Pressure

- 05.01.26 - ErcanOPAK comment on AI Prompt — Make Better Decisions Under Pressure

Prompt Help me decide. List: – What I might be overlooking – Second-order consequences – A safe first step Decision: <DESCRIBE SITUATION>  

Read More
AI

AI Prompt — Review Code Like a Senior Engineer

- 05.01.26 - ErcanOPAK comment on AI Prompt — Review Code Like a Senior Engineer

Prompt Review this code. Focus on: – Hidden edge cases – Long-term maintainability risks – Performance pitfalls Explain WHY each issue matters. Code: <PASTE CODE>  

Read More
AI

AI Prompt — Explain Why This Bug Only Happens in Production

- 05.01.26 - ErcanOPAK comment on AI Prompt — Explain Why This Bug Only Happens in Production

Prompt You are a senior engineer. Analyze this issue. Explain: – Why it may only appear under production load – Which assumptions break at scale – How to reproduce locally Issue description: <DESCRIBE ISSUE>  

Read More
Docker

Docker Build Cache Suddenly Stops Working

- 05.01.26 - ErcanOPAK comment on Docker Build Cache Suddenly Stops Working

Every build starts from scratch. WhyBuild context changes invalidate cache layers. FixUse .dockerignore aggressively.

Read More
Kubernetes

Kubernetes Pods Restart Without Scaling Events

- 05.01.26 - ErcanOPAK comment on Kubernetes Pods Restart Without Scaling Events

Traffic increases, no scale-out. WhyRequests never hit resource thresholds. FixTune resource requests, not limits.

Read More
Wordpress

WordPress Updates Fail on Shared Hosting

- 05.01.26 - ErcanOPAK comment on WordPress Updates Fail on Shared Hosting

Everything works… except updates. WhyFile ownership mismatch between FTP and PHP user. FixForce direct filesystem method in config.

Read More
Wordpress

WordPress Shortcodes Break Page Caching

- 05.01.26 - ErcanOPAK comment on WordPress Shortcodes Break Page Caching

Pages randomly show dynamic content. WhyShortcodes execute on every render phase. FixReplace shortcodes with cached blocks or template partials.

Read More
Page 42 of 69
« Previous 1 … 37 38 39 40 41 42 43 44 45 46 47 … 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 (837)
  • 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 (449)

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 (837)
  • 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