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

Day: January 16, 2026

C#

C# String Operations Hurt Performance

- 16.01.26 - ErcanOPAK comment on C# String Operations Hurt Performance

Heavy string manipulation. WhyImmutable strings. TipUse StringBuilder in loops. var sb = new StringBuilder();  

Read More
C#

C# DateTime Bugs Appear Across Servers

- 16.01.26 - ErcanOPAK comment on C# DateTime Bugs Appear Across Servers

Same code, different results. WhyLocal time assumptions. TipAlways use UTC internally.

Read More
C#

C# LINQ Queries Allocate Too Much

- 16.01.26 - ErcanOPAK comment on C# LINQ Queries Allocate Too Much

Elegant but costly. WhyDeferred execution misunderstood. TipMaterialize once when reused. var data = query.ToList();  

Read More
SQL

SQL Deadlocks Appear Sporadically

- 16.01.26 - ErcanOPAK comment on SQL Deadlocks Appear Sporadically

Hard to reproduce. WhyInconsistent access order. TipStandardize table access order.

Read More
SQL

SQL Queries Break After Schema Changes

- 16.01.26 - ErcanOPAK comment on SQL Queries Break After Schema Changes

Query logic unchanged. WhyImplicit column order dependency. TipAlways specify column names.

Read More
Asp.Net Core

.NET Core Logs Impact Performance

- 16.01.26 - ErcanOPAK comment on .NET Core Logs Impact Performance

Logging enabled, speed drops. WhySynchronous log providers. TipUse async logging.

Read More
Asp.Net Core

ASP.NET Core Startup Becomes Slower

- 16.01.26 - ErcanOPAK comment on ASP.NET Core Startup Becomes Slower

App works, boot time grows. WhyHeavy work in ConfigureServices. TipDefer non-critical initialization.

Read More
Git

Git Branches Linger Forever

- 16.01.26 - ErcanOPAK comment on Git Branches Linger Forever

Dead branches pile up. WhyNo cleanup policy. TipAutomate stale branch deletion.

Read More
Git

Git History Becomes Hard to Read

- 16.01.26 - ErcanOPAK comment on Git History Becomes Hard to Read

Commits exist, meaning lost. WhyOverloaded commit messages. TipOne intent per commit.

Read More
Ajax / JavaScript

Ajax Requests Succeed but Data Is Stale

- 16.01.26 - ErcanOPAK comment on Ajax Requests Succeed but Data Is Stale

Correct response, old UI. WhyClient-side caching assumptions. TipExplicitly control cache headers.

Read More
JavaScript

JavaScript Apps Become Sluggish After Navigation

- 16.01.26 - ErcanOPAK comment on JavaScript Apps Become Sluggish After Navigation

SPA feels heavier over time. WhyEvent listeners not removed. TipAlways clean up listeners on teardown.

Read More
HTML

HTML Forms Submit Slower Than Expected

- 16.01.26 - ErcanOPAK comment on HTML Forms Submit Slower Than Expected

Simple forms, slow UX. WhyBlocking validation scripts. TipDefer non-critical scripts.

Read More
CSS

CSS Animations Cause Jank on Mobile

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

Smooth on desktop, choppy on phone. WhyLayout-triggering properties used. TipAnimate only transform and opacity. .element { transform: translateZ(0); }  

Read More
Windows

Windows 11 File Explorer Feels Laggy

- 16.01.26 - ErcanOPAK comment on Windows 11 File Explorer Feels Laggy

Folders open slowly. WhyPreview handlers scanning files. TipDisable unnecessary previews.

Read More
Windows

Windows 11 Laptop Battery Drains Faster After Updates

- 16.01.26 - ErcanOPAK comment on Windows 11 Laptop Battery Drains Faster After Updates

No hardware change. WhyBackground permissions reset. TipReview startup and background apps after updates.

Read More
AI

AI Prompt — Home Repair Planning

- 16.01.26 - ErcanOPAK comment on AI Prompt — Home Repair Planning

Prompt: Help me plan a small home repair. Focus on: – Tools needed – Common beginner mistakes – Safety precautions Task: <DESCRIBE>  

Read More
AI

AI Prompt — Generate Edge Cases

- 16.01.26 - ErcanOPAK comment on AI Prompt — Generate Edge Cases

Prompt: Given this feature description, list edge cases developers usually miss. Be practical, not theoretical. Feature: <DESCRIBE>  

Read More
AI

AI Prompt — Refactor Without Changing Behavior

- 16.01.26 - ErcanOPAK comment on AI Prompt — Refactor Without Changing Behavior

Prompt: Refactor this code to improve readability without changing behavior or performance. Explain each refactor briefly. Code: <PASTE CODE>  

Read More
Docker

Docker Images Suddenly Grow Huge

- 16.01.26 - ErcanOPAK comment on Docker Images Suddenly Grow Huge

Same app, bigger image. WhyUnoptimized layer ordering. TipPlace rarely changed steps first in Dockerfile.

Read More
Kubernetes

Kubernetes Services Work Internally but Fail Externally

- 16.01.26 - ErcanOPAK comment on Kubernetes Services Work Internally but Fail Externally

Pods communicate, users cannot. WhyService type mismatch (ClusterIP vs LoadBalancer). TipExplicitly define service exposure strategy.

Read More
Wordpress

WordPress Pages Randomly Lose Formatting

- 16.01.26 - ErcanOPAK comment on WordPress Pages Randomly Lose Formatting

Refresh fixes it sometimes. WhyConflicting cache layers (plugin + server). TipUse a single authoritative caching layer.

Read More
Wordpress

WordPress Admin Feels Slow but Frontend Is Fast

- 16.01.26 - ErcanOPAK comment on WordPress Admin Feels Slow but Frontend Is Fast

Visitors fine, editor painful. WhyToo many admin-side hooks and plugins. TipAudit plugins that affect admin only.

Read More
Photoshop

Photoshop Uses Too Much RAM Over Time

- 16.01.26 - ErcanOPAK comment on Photoshop Uses Too Much RAM Over Time

Even idle, memory keeps growing. WhySmart objects and history states accumulate. TipLimit history states and rasterize unused smart objects.

Read More
Photoshop

Photoshop Exports Correct Colors but Looks Wrong Online

- 16.01.26 - ErcanOPAK comment on Photoshop Exports Correct Colors but Looks Wrong Online

Image looks fine locally, off on web. WhyColor profile mismatch (CMYK vs sRGB). TipAlways convert to sRGB before exporting for web.

Read More
Visual Studio

Visual Studio Builds Succeed but Output Is Wrong

- 16.01.26 - ErcanOPAK comment on Visual Studio Builds Succeed but Output Is Wrong

No errors, wrong behavior. WhyMultiple startup projects or wrong build profile selected silently. TipAlways verify the active configuration and startup project before debugging.

Read More
January 2026
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Dec    

Most Viewed Posts

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

Recent Posts

  • Why foreach Is Sometimes Slower Than for
  • The Hidden Cost of Exceptions as Flow Control
  • Why lock Can Kill Throughput
  • Indexes Can Make Queries Slower (Here’s Why)
  • Why SELECT * Slowly Destroys Performance
  • The Real Cost of IHostedService Misuse
  • Why Async Controllers Still Block Threads
  • Stop Using git pull (Yes, Really)
  • Why Git Rebase “Loses” Commits (It Doesn’t — You Did)
  • Why Fetch Requests “Randomly” Hang (But Server Is Fine)

Most Viewed Posts

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

Recent Posts

  • Why foreach Is Sometimes Slower Than for
  • The Hidden Cost of Exceptions as Flow Control
  • Why lock Can Kill Throughput
  • Indexes Can Make Queries Slower (Here’s Why)
  • Why SELECT * Slowly Destroys Performance

Social

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