BDD vs TDD is easy to mix up until you test the same feature both ways. This post checks one delivery rule with a unit test and then with a plain-language scenario, runs the unit test, and explains when each approach fits.
Running Distinct Counts: Working Around COUNT(DISTINCT) OVER
Your report wants unique customers so far, and SQL Server refuses COUNT(DISTINCT) over a window. Flag each first appearance and add up the flags instead.
Given-When-Then for Database Tests
Use Given-When-Then for readable database tests with known input, explicit THROW checks, and transaction rollback after each case.
Go Programming Language: 10 Interview Questions With Tested Answers
The Go programming language is small, so ten questions cover most of an interview. This post answers each one in plain words with a tiny program. Every program was run twice on Go 1.27.1, and the real output is shown.
statement_start_offset: Showing the Exact Statement Running Now
A stored procedure runs for forty minutes and you need the busy line. Here is how to pull it out of the batch text without the usual off-by-two mistakes.
Performance Tuning Mistakes in SQL Server: 11 Habits to Fix
Performance tuning mistakes are habits, and each one has a check. Eleven sit in one table, and five are measured on a demo database: a missing index, stale statistics, a row by row loop, a giant delete and a type that cannot be indexed.
Updatable Ledger Tables: Proving No One Quietly Changed a Row
Update a row in a ledger table and the old version stays. Then verify the history with a digest, and break the digest to see what failure looks like.







