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

CSS

CSS Animations Cause Page Jank

- 02.01.26 - ErcanOPAK comment on CSS Animations Cause Page Jank

Smooth on desktop, laggy on mobile. WhyLayout-triggering properties. Fix Animate only transform and opacity. .box { transform: translateX(0); transition: transform 300ms ease; }  

Read More
Windows

Windows 11 Audio Crackles Randomly

- 02.01.26 - ErcanOPAK comment on Windows 11 Audio Crackles Randomly

specially on Bluetooth. WhyPower management throttles audio devices. Fix Disable power saving on audio drivers.

Read More
Windows

Windows 11 High CPU with “System”

- 02.01.26 - ErcanOPAK comment on Windows 11 High CPU with “System”

Nothing running, CPU burning. WhyBackground indexing + driver loops. Fix Rebuild search index and update chipset drivers.

Read More
AI

AI Prompt — Solve Complex Problems Faster

- 02.01.26 - ErcanOPAK comment on AI Prompt — Solve Complex Problems Faster

Prompt Break this problem into: – Root causes – Constraints – Non-obvious risks – Simple first steps Problem: <DESCRIBE ISSUE>  

Read More
AI

AI Prompt — SQL Performance Autopsy

- 02.01.26 - ErcanOPAK comment on AI Prompt — SQL Performance Autopsy

Prompt Act as a senior DBA. Analyze this SQL query. Identify: – Index issues – Hidden scans – Cardinality problems Suggest a rewritten query. Query: <PASTE QUERY>  

Read More
AI

AI Prompt — Debug Async Deadlocks

- 02.01.26 - ErcanOPAK comment on AI Prompt — Debug Async Deadlocks

Prompt Analyze this async code. Explain: – Where deadlocks may occur – Why synchronization context matters – How to fix without changing behavior Code: <PASTE CODE>  

Read More
Docker

Docker Container Works Once, Then Fails

- 02.01.26 - ErcanOPAK comment on Docker Container Works Once, Then Fails

First run ok, second run broken. WhyStateful data written inside container layer. Fix Always mount volumes for persistent data.

Read More
Kubernetes

Kubernetes App Randomly Loses Traffic

- 02.01.26 - ErcanOPAK comment on Kubernetes App Randomly Loses Traffic

No crashes, no errors. WhyReadiness probes failing silently. Fix Separate readiness and liveness probes.

Read More
Wordpress

WordPress Login Works Locally, Fails on Hosting

- 02.01.26 - ErcanOPAK comment on WordPress Login Works Locally, Fails on Hosting

Same credentials, different result. WhyHosting uses aggressive object caching. Fix Clear object cache on password reset hook.

Read More
Wordpress

WordPress Admin Suddenly Becomes Extremely Slow

- 02.01.26 - ErcanOPAK comment on WordPress Admin Suddenly Becomes Extremely Slow

Frontend is fast, admin unusable. WhyHeavy meta queries triggered by custom fields. Fix Disable unnecessary post meta loading using remove_meta_box.

Read More
Photoshop

Photoshop Uses GPU but Still Feels Slow

- 02.01.26 - ErcanOPAK comment on Photoshop Uses GPU but Still Feels Slow

GPU enabled, zero benefit. WhyGPU acceleration only applies to specific operations. Fix Switch document color mode to 8-bit RGB before heavy edits.

Read More
Photoshop

Photoshop Images Look Blurry After Upload

- 02.01.26 - ErcanOPAK comment on Photoshop Images Look Blurry After Upload

Sharp locally, soft online. Root causeAutomatic resampling + wrong export scaling. Fix Export at 100% scale, disable resample, then let CSS handle resizing.

Read More
Visual Studio

Visual Studio Builds Succeed but Runtime Crashes

- 02.01.26 - ErcanOPAK comment on Visual Studio Builds Succeed but Runtime Crashes

Your solution builds perfectly… yet crashes immediately. Why this happensDifferent projects target different runtime versions, but MSBuild doesn’t warn you. Fix Force a single runtime in Directory.Build.props: <Project> <PropertyGroup> <TargetFramework>net8.0</TargetFramework> </PropertyGroup> </Project> Why it worksIt guarantees consistent compilation and runtime behavior across all projects.

Read More
C#

Events Can Cause Memory Leaks

- 01.01.26 - ErcanOPAK comment on Events Can Cause Memory Leaks

Even in managed code. Why it happensUnsubscribed event handlers. FixAlways unsubscribe or use weak events.

Read More
C#

DateTime.Now Can Break Distributed Systems

- 01.01.26 - ErcanOPAK comment on DateTime.Now Can Break Distributed Systems

Time is harder than it looks. Why it happensTime zones + daylight saving. FixUse DateTimeOffset.UtcNow.

Read More
C#

C# Value Types Copied More Than You Think

- 01.01.26 - ErcanOPAK comment on C# Value Types Copied More Than You Think

Structs aren’t always faster. Why it happensLarge structs passed by value. FixUse in parameters.

Read More
SQL

SQL COUNT(*) Isn’t Always Cheap

- 01.01.26 - ErcanOPAK comment on SQL COUNT(*) Isn’t Always Cheap

Especially on large tables. Why it happensFull scan required. TipUse metadata counts when possible.

Read More
SQL

SQL Queries Slow Down After Data Grows

- 01.01.26 - ErcanOPAK comment on SQL Queries Slow Down After Data Grows

Same query, worse performance. Why it happensMissing covering indexes. FixInclude frequently selected columns.

Read More
Asp.Net Core

Configuration Values Change Between Environments

- 01.01.26 - ErcanOPAK comment on Configuration Values Change Between Environments

Works locally, breaks in prod. Why it happensConfiguration providers load order. FixLog final configuration on startup.

Read More
Asp.Net Core

ASP.NET Core Requests Hang Randomly

- 01.01.26 - ErcanOPAK comment on ASP.NET Core Requests Hang Randomly

CPU low, threads exhausted. Why it happensBlocking calls inside async pipeline. FixRemove .Result and .Wait().

Read More
Git

Git History Looks Clean But Lies

- 01.01.26 - ErcanOPAK comment on Git History Looks Clean But Lies

Squash merges hide context. Why it mattersDebugging regressions becomes harder. TipAvoid squashing critical feature branches.

Read More
Git

Git Merge Conflicts Appear “Out of Nowhere”

- 01.01.26 - ErcanOPAK comment on Git Merge Conflicts Appear “Out of Nowhere”

Nothing changed… or did it? Why it happensLine-ending normalization (CRLF vs LF). FixConfigure .gitattributes.

Read More
Ajax / JavaScript

AJAX Requests Work Locally But Fail in Production

- 01.01.26 - ErcanOPAK comment on AJAX Requests Work Locally But Fail in Production

No errors, no data. Why it happensCORS preflight blocked by server config. FixAllow OPTIONS requests explicitly.

Read More
JavaScript

JavaScript forEach Can’t Be awaited

- 01.01.26 - ErcanOPAK comment on JavaScript forEach Can’t Be awaited

Silent async bugs everywhere. Why it happensforEach ignores promises. FixUse for…of or Promise.all.

Read More
HTML

HTML5 Forms Submitting Twice

- 01.01.26 - ErcanOPAK comment on HTML5 Forms Submitting Twice

Looks like a JS bug — often isn’t. Why it happensButton defaults to type=”submit”. FixAlways declare button types explicitly.

Read More
CSS

CSS position: sticky Not Working?

- 01.01.26 - ErcanOPAK comment on CSS position: sticky Not Working?

It’s not broken — it’s constrained. Why it happensParent container has overflow: hidden. FixRemove overflow or move sticky element.

Read More
Windows

Bluetooth Audio Sounds “Bad” Randomly

- 01.01.26 | 01.01.26 - ErcanOPAK comment on Bluetooth Audio Sounds “Bad” Randomly

Sudden quality drop mid-call. Why it happensHands-Free profile overrides stereo mode. FixDisable Hands-Free Telephony in device settings.

Read More
Windows

Windows 11 Laptop Battery Drains While Idle

- 01.01.26 - ErcanOPAK comment on Windows 11 Laptop Battery Drains While Idle

No apps open, battery dying. Why it happensBackground apps + wake timers. FixDisable unnecessary startup tasks + check powercfg wake sources.

Read More
AI

AI Prompt — Decision Making Under Uncertainty

- 01.01.26 - ErcanOPAK comment on AI Prompt — Decision Making Under Uncertainty

Useful for everyone, not just developers. Prompt Help me make a decision. List: – Best case – Worst case – Hidden risks – Opportunity cost Decision: <DESCRIBE SITUATION>  

Read More
AI

AI Prompt — Safe Refactoring Without Side Effects

- 01.01.26 - ErcanOPAK comment on AI Prompt — Safe Refactoring Without Side Effects

Prompt Refactor this code. Rules: – No behavior change – No public API changes – Explain WHY each change is safe Code: <PASTE CODE>  

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