TekinAli ⎇ main

Blog · 13 files

NameTagsDateRead
October 2026 · 3 posts
first-row-per-group-sql.md Top-N per group in SQL: matching the query to your data A guide to selecting the first or top-N row per group in SQL Server, PostgreSQL, EF Core and Spark: how each pattern executes, why data distribution decides which one wins, which indexes they need, and how to verify the choice in the plan. Databases #sql #sql-server #postgresql #performance 8 min
calling-async-from-sync-csharp.md Calling async code from sync code in C#: deadlocks, the thread pool and the right approach How blocking on a Task deadlocks UI apps and starves the thread pool in ASP.NET Core, what to do when blocking is unavoidable, where ConfigureAwait(false) and .NET 8's ConfigureAwaitOptions matter, and how hidden async void crashes processes. .NET #dotnet #csharp #async 7 min
upsert-sql-server-postgresql-sqlite-guide.md Concurrency-safe upserts in SQL Server, PostgreSQL and SQLite How upserts break under concurrency and how to write them safely: UPDLOCK and SERIALIZABLE or MERGE in SQL Server, ON CONFLICT, MERGE and RETURNING in PostgreSQL, native UPSERT in SQLite, and why INSERT OR REPLACE is not one. Databases #sql #sql-server #postgresql #sqlite 7 min
September 2026 · 5 posts
spark-repartition-vs-coalesce-aqe.md Partitioning in Spark: repartition(), coalesce() and Adaptive Query Execution How partition count shapes Spark performance, what repartition() and coalesce() really do, why coalesce(1) can push a whole job onto one task, and how Adaptive Query Execution (on by default since Spark 3.2) handles most partition tuning at runtime. Big Data #spark #pyspark #performance 6 min
why-nolock-is-still-wrong.md Beyond NOLOCK: row versioning, RCSI and SQL Server 2025 optimized locking How NOLOCK really behaves (dirty reads, skipped and duplicated rows, error 601), how RCSI and SNAPSHOT isolation replace it, and what SQL Server 2025 optimized locking adds on top, including its limits. Databases #sql-server #concurrency #performance 7 min
swift-6-2-main-thread-and-weak-self.md Main actor, @concurrent and [weak self]: concurrency habits for Swift 6.2 How Swift 6.2's default main-actor isolation, nonisolated(nonsending) and @concurrent change where your code runs, why async does not mean background, and when [weak self] in a Task still matters. iOS #ios #swift #concurrency 8 min
ios-keyboard-covering-text-field.md Keeping text fields above the keyboard in UIKit and SwiftUI How the software keyboard interacts with your layout, and the modern tools for it: UIKeyboardLayoutGuide in UIKit, the keyboard safe area in SwiftUI, and @FocusState, onSubmit and scrollDismissesKeyboard for focus and dismissal. iOS #ios #uikit #swiftui 7 min
passing-data-between-screens-observable.md Data flow between screens: from UIKit injection to SwiftUI's @Observable Passing data forward and back between UIKit view controllers without singletons, sharing state in SwiftUI with @Observable, @State, @Environment and @Bindable, value-based navigation, and what changed about @State initial values in Xcode 27. iOS #ios #swift #uikit #swiftui 8 min
August 2026 · 5 posts
how-this-site-works.md How this site works Why I put my CV inside an IDE and a real SQLite database, and how the SQL console below is kept safe. .NET #dotnet #sqlite #security 1 min
sqlite-insert-performance-ios.md Fast and safe bulk inserts in SQLite: transactions, WAL and iOS Why SQLite bulk inserts are slow by default, the three techniques that fix it, what synchronous=OFF and journal_mode=MEMORY really risk, why WAL with synchronous=NORMAL is a safer default, and how it all applies to Core Data, SwiftData and .NET. iOS Databases #sqlite #ios #dotnet #performance 8 min
transient-scoped-singleton-captive-dependency.md Service lifetimes in ASP.NET Core: transient, scoped, singleton and the captive dependency trap What transient, scoped and singleton really mean, how a scoped DbContext gets trapped in a singleton, how scope validation catches it, and how to handle background services, thread safety, keyed services (.NET 8) and HttpClient lifetimes. .NET #dotnet #aspnet-core #dependency-injection 6 min
ef-core-bulk-insert-update-delete.md Bulk inserts, updates and deletes in EF Core: from SaveChanges batching to SqlBulkCopy How EF Core's batched SaveChanges differs from the EF6-era approach, how ExecuteUpdate/ExecuteDelete work and where they bite, EF Core 10's conditional setters, SqlQuery for unmapped types, and when to switch to SqlBulkCopy or PostgreSQL COPY. .NET #dotnet #efcore #performance 7 min
openai-api-token-counting-conversation-state.md Token counting, conversation state and 429 errors in the OpenAI Responses API How the OpenAI API has changed, how to count input tokens before a request, three ways to keep conversation state (manual replay, previous_response_id, Conversations API), and how to tell quota errors from rate limits on a 429, with Python and C# examples. AI #openai #ai #python #dotnet 7 min
tekinali.db · read-only · ● connected

SQLite 3.53.3 · 8 tables, 2 views.

Click a table on the left, pick a query below or write your own. Help: \?

↑↓ select · Enter open · Esc close