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

Git

Git Shows Changes That Don’t Exist

- 03.01.26 - ErcanOPAK comment on Git Shows Changes That Don’t Exist

Confusing diffs. WhyCRLF vs LF normalization. FixConfigure .editorconfig.

Read More
Git

Git History Looks Clean but Lies

- 03.01.26 - ErcanOPAK comment on Git History Looks Clean but Lies

Hard to debug regressions. WhyAggressive squash merges remove context. FixAvoid squashing critical feature branches.

Read More
Ajax / JavaScript

Ajax Works Locally but Fails in Production

- 03.01.26 - ErcanOPAK comment on Ajax Works Locally but Fails in Production

No errors, no data. WhyCORS preflight blocked. FixAllow OPTIONS requests on server.

Read More
JavaScript

JavaScript Async Loops Fail Silently

- 03.01.26 - ErcanOPAK comment on JavaScript Async Loops Fail Silently

Code runs, logic breaks. WhyforEach ignores await. Fix for (const item of items) { await process(item); }  

Read More
HTML

HTML Forms Submit Twice

- 03.01.26 - ErcanOPAK comment on HTML Forms Submit Twice

Looks like a JavaScript bug. WhyButtons default to type=”submit”. Fix <button type=”button”>Save</button>  

Read More
CSS

CSS Animations Cause Jank on Mobile

- 03.01.26 - ErcanOPAK comment on CSS Animations Cause Jank on Mobile

Smooth on desktop, laggy on phones. WhyLayout-triggering properties. Fix .element { transform: translateY(0); transition: transform 300ms ease; }  

Read More
Windows

Bluetooth Audio Quality Drops Randomly

- 03.01.26 - ErcanOPAK comment on Bluetooth Audio Quality Drops Randomly

Sudden “phone call” quality. WhyHands-Free profile overrides stereo mode. FixDisable Hands-Free Telephony in device settings.

Read More
Windows

Windows 11 High CPU While Idle

- 03.01.26 - ErcanOPAK comment on Windows 11 High CPU While Idle

Nothing running, fans screaming. WhyBackground indexing + faulty drivers. FixRebuild search index and update chipset drivers.

Read More
AI

AI Prompt — Solve Any Complex Problem Faster

- 03.01.26 - ErcanOPAK comment on AI Prompt — Solve Any Complex Problem Faster

Prompt Break this problem into: – Root cause – Constraints – Hidden risks – Fastest safe solution Problem: <DESCRIBE ISSUE>  

Read More
AI

AI Prompt — SQL Performance Autopsy

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

Prompt You are a senior DBA. Analyze this SQL query. Identify: – Missing indexes – Parameter sniffing – Hidden scans Rewrite it with explanation. Query: <PASTE QUERY>  

Read More
AI

AI Prompt — Diagnose Hidden Async Bugs

- 03.01.26 - ErcanOPAK comment on AI Prompt — Diagnose Hidden Async Bugs

Prompt Act as a senior .NET engineer. Analyze this async code. Explain: – Deadlock risks – Thread pool starvation – Sync-over-async issues Provide safe fixes. Code: <PASTE CODE>  

Read More
Kubernetes

Kubernetes Pods Restart Without Logs

- 03.01.26 - ErcanOPAK comment on Kubernetes Pods Restart Without Logs

No errors, no stack traces. WhyThe container is killed before logs flush (OOMKill). FixInspect pod events, not container logs.

Read More
Docker

Docker Image Is Huge and Slow

- 03.01.26 - ErcanOPAK comment on Docker Image Is Huge and Slow

Builds take forever. WhyDependencies and source copied in wrong order. Fix COPY *.csproj ./ RUN dotnet restore COPY . .  

Read More
Wordpress

WordPress Login Loop Behind CDN or Proxy

- 03.01.26 - ErcanOPAK comment on WordPress Login Loop Behind CDN or Proxy

Correct password, infinite redirects. WhyHTTPS detection fails behind reverse proxies. Fix $_SERVER[‘HTTPS’] = ‘on’;

Read More
Wordpress

WordPress Becomes Slow After Adding “Just One Plugin”

- 03.01.26 - ErcanOPAK comment on WordPress Becomes Slow After Adding “Just One Plugin”

Classic production nightmare. WhyMany plugins hook into init and run on every request. FixProfile with Query Monitor and remove unnecessary hooks.

Read More
Photoshop

Photoshop Eats RAM Without Warning

- 03.01.26 - ErcanOPAK comment on Photoshop Eats RAM Without Warning

No crash, just slower and slower. WhyHidden Smart Objects and deep history stacks. FixReduce History States and rasterize unused layers.

Read More
Photoshop

Photoshop Exports Look Sharp Locally but Blurry Online

- 03.01.26 - ErcanOPAK comment on Photoshop Exports Look Sharp Locally but Blurry Online

Perfect on your machine, ugly on the web. Root causePhotoshop resamples images silently when exporting. FixExport at 100% scale, disable resampling, resize via CSS.

Read More
Visual Studio

Visual Studio Debug Mode Lies About Performance

- 03.01.26 - ErcanOPAK comment on Visual Studio Debug Mode Lies About Performance

Your app is slow in Debug, fast in Release — or the opposite. Why this happensDebug disables JIT optimizations, inlining, and adds tracking hooks. Why it mattersYou may “fix” a problem that doesn’t exist in production. Life-saving ruleAlways profile Release build + Attach to Process.

Read More
C#

Exceptions Used for Flow Control

- 02.01.26 - ErcanOPAK comment on Exceptions Used for Flow Control

Works… until scale. WhyExceptions are expensive. Fix Use Try-patterns instead.

Read More
C#

LINQ Causing Hidden Allocations

- 02.01.26 - ErcanOPAK comment on LINQ Causing Hidden Allocations

Clean code, slow runtime. WhyDeferred execution + boxing. Fix Materialize once when needed.

Read More
C#

C# Async Methods Still Block Threads

- 02.01.26 - ErcanOPAK comment on C# Async Methods Still Block Threads

Looks async, isn’t. WhyCPU-bound work inside async. Fix Offload CPU work explicitly. await Task.Run(() => HeavyCalculation());  

Read More
SQL

SQL Index Exists but Not Used

- 02.01.26 - ErcanOPAK comment on SQL Index Exists but Not Used

Planner ignores it. WhyLow selectivity. Fix Include filtered indexes.

Read More
SQL

SQL Queries Randomly Slow Down

- 02.01.26 | 03.01.26 - ErcanOPAK comment on SQL Queries Randomly Slow Down

Same query, different speed. WhyParameter sniffing. Fix Use OPTION (RECOMPILE) selectively. 🐌 Same Query, Different Speed Nothing changed. Except the parameters. If a query sometimes runs in 10 ms and sometimes in 10 seconds,you’re probably not looking at a missing index. You’re looking at parameter sniffing. 🚨 The Core Problem SQL Server creates an execution […]

Read More
Asp.Net Core

Middleware Order Breaks Security

- 02.01.26 - ErcanOPAK comment on Middleware Order Breaks Security

Auth enabled, still vulnerable. WhyMiddleware pipeline order matters. Fix Authentication must come before authorization.

Read More
Asp.Net Core

ASP.NET Core Memory Grows Forever

- 02.01.26 - ErcanOPAK comment on ASP.NET Core Memory Grows Forever

No leaks detected. WhySingleton services holding scoped dependencies. Fix Avoid injecting scoped services into singletons.

Read More
Git

Git Shows No Changes but Files Differ

- 02.01.26 - ErcanOPAK comment on Git Shows No Changes but Files Differ

Confusing diffs. WhyWhitespace normalization. Fix Configure .editorconfig.

Read More
Git

Git Rebase Broke Everything

- 02.01.26 | 03.01.26 - ErcanOPAK comment on Git Rebase Broke Everything

History rewritten, chaos. WhyForce-push on shared branch. Fix Only rebase local branches. 💥 Git Rebase Broke Everything History rewritten. Chaos followed. Git rebase is powerful.Used incorrectly, it’s destructive. Most Git disasters don’t come from bugs —they come from rewriting shared history. 🚨 The Core Problem git rebase rewrites commit history. That’s fine only if you’re […]

Read More
Ajax / JavaScript

Ajax Requests Timeout Only in Production

- 02.01.26 - ErcanOPAK comment on Ajax Requests Timeout Only in Production

Local works, prod fails. WhyReverse proxy timeout limits. Fix Increase server timeout or chunk responses.

Read More
JavaScript

JavaScript Memory Leaks Without Errors

- 02.01.26 - ErcanOPAK comment on JavaScript Memory Leaks Without Errors

Page slows over time. WhyDetached DOM references. Fix Null unused references.

Read More
HTML

HTML Forms Break Accessibility

- 02.01.26 - ErcanOPAK comment on HTML Forms Break Accessibility

Looks fine, fails screen readers. WhyMissing explicit label bindings. Fix Always link label with for.

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