
Verified, Not Trusted: Expense Analysis, Part One
Expense totals need verifiable source coverage and reproducible calculations. Two prompts show how parsing, category rules, refunds, and code shape the evidence.
Updated · Markdown
Articles by Shiv Kumar on software architecture, programming, acceptance testing, and building with language models.
New and updated articles, most recent first.

Expense totals need verifiable source coverage and reproducible calculations. Two prompts show how parsing, category rules, refunds, and code shape the evidence.
Updated · Markdown

Method contracts let callers rely on completed work and let failures propagate. C# examples distinguish retrieval from search, validate domain entry points, and assign handling to its owner.
Updated · Markdown

Specific exceptions preserve failure meaning, causes, and context. A shallow C# hierarchy, Gateway translation, and middleware enrichment carry diagnostic records across service boundaries.
Updated · Markdown

Structured logs preserve the facts needed to investigate failures. Application Insights custom dimensions make them searchable, while typed progress events track long-running work.
Updated · Markdown

A growing acceptance suite stays trustworthy through explicit scenarios and owned resources. Organize by feature, keep Act visible, review complete comparisons, and retain useful CI failures.
Updated · Markdown

Random data must preserve the named test scenario. Constrained catalog sampling, immutable builders, deliberate threshold guards, and owned identities keep arrangements correct.
Updated · Markdown

Assertions must compare every required field, count, and effect. Pure asserters separate observations from comparisons and report available failures together with verified expectations.
Updated · Markdown

A green behavioral suite supports release when its evidence belongs to the build being advanced. Preserve execution receipts and verify deployed capabilities, configuration, and other release duties.
Updated · Markdown

Functional acceptance tests verify complete outcomes through the assembled system. Correct arrangements, deep assertions, and controlled observations support release confidence.
Updated · Markdown

Repeated and concurrent order requests must preserve accepted outcomes without duplicate work. Compare canonical request identity, allowed race outcomes, stored facts, and outgoing effects.
Updated · Markdown

A green suite needs correct scenarios for established requirements. An obligation map connects each rule to its arrangement, expected outcome, independent observation, and assertion.
Updated · Markdown

Acceptance tests let teammates learn requirements and production behavior together. Follow one order through Arrange, the visible Act, independent observations, and complete assertions.
Updated · Markdown

One ordering scenario verifies the caller result, stored lines, fulfillment, and confirmation. Follow its complete C# test, independent observations, and accumulated failure reports.
Updated · Markdown

Boundary testing questions concern evidence, isolation, failures, and release confidence. Compare the practice with mocks, TDD, generated checks, formal models, and production observation.
Updated · Markdown

A stable Domain Facade lets acceptance scenarios and assertions survive internal refactoring. Adapt test support behind unchanged observations and adopt complete boundary tests feature by feature.
Updated · Markdown

Failure timing determines what an order still owes. Verify refusal, real transaction rollback, post-commit action failures, and accepted effects whose completion could not be recorded.
Updated · Markdown

Real infrastructure must participate when transactions and messages are required outcomes. Provision SQL and broker topology, isolate runs, define observation windows, and verify actual rollback.
Updated · Markdown

Interface tests verify wire conversion and exception translation at their owning boundaries. Controller Hooks, middleware checks, and hosted HTTP scenarios complement domain acceptance.
Updated · Markdown

The maintained regression suite protects earlier business behavior as new features change the system. Keep approved expectations, run the required suite, and preserve lessons as permanent scenarios.
Updated · Markdown

A Test Mediator and transport spy control delivery and expose observations while production gateways run. Capture email content, script retries, and measure bounded response reads.
Updated · Markdown

Business operations are easier to trace when immutable DTOs carry facts and stateless managers validate inputs and coordinate work through named methods at the call site.
Updated · Markdown

A Factory selects and constructs a concrete descendant while callers program to an interface through the base class's public contract. C# thumbnailers show selection and polymorphic dispatch.
Updated · Markdown

A Configuration Provider hides the source and returns validated, typed settings. Useful exceptions and composed settings providers keep configuration rules in one place.
Updated · Markdown

A Gateway presents business operations, translates service models and transforms failures into domain exceptions, keeping external service details behind one boundary.
Updated · Markdown

Factory Method lets consumer subclasses choose dependencies through an overridable creation hook. C# examples show its two class families and distinguish it from a separate Factory.
Updated · Markdown

AI generation exposed an already flawed SDLC: faster code review moves the queue to verification, which needs functional acceptance testing at the boundary.
Updated · Markdown

An AI-native SDLC engineers both gates through certified code review, functional acceptance tests at the boundary ratified by humans, and verification against the specification.
Updated · Markdown

Jev makes bounded semantic judgments with Choice, Score, and Noul; code handles exact work and policy, while evaluation and confidence gates determine when to act or escalate.

Jev can shorten LLM context by scoring which tool events a current question still needs. A recorded Noul response and Python retention code show what stays and why the threshold matters.

Composition keeps a configuration provider's capabilities limited to what its project needs. The refactor uses self-contained settings providers, a shallow base, and restrained reuse.
Updated · Markdown

Use a cast instead of `as` when the type is expected, so a mismatch raises InvalidCastException. Use `is` when the type genuinely varies and keep only guards backed by a real case.
Updated · Markdown

Validate and clean data at the front and back doors; skip checks on internal formal arguments. Immutable DTOs preserve trust, one exception reports all errors, and black box tests exercise the doors.
Updated · Markdown

Build a working baseline, then change the design for a concrete benefit; a log parser evolves through a switch, delegates, and Strategy to test that judgment.
Updated · Markdown

Async streams let callers process database rows before the full result exists. An async iterator combines await and yield return, keeping its reader open during enumeration.
Updated · Markdown

Dependency injection exposes private collaborators to callers when used for every internal relationship. Keep classes self-contained and let business code choose real variation.
Updated · Markdown

C# interfaces do not inherently create contracts or loose coupling. Composition handles hierarchy conflicts; capability interfaces and structural typing let consumers see only what they need.
Updated · Markdown

Keep project-specific helpers as static methods: extension methods hide behavior behind namespaces and can change meaning with imports. Use them when they serve the wider C# community.
Updated · Markdown

A library boundary owns the application's contract even when its terms match the library's. It contains provider types, validation, failures, and configuration, and keeps replacement possible.
Updated · Markdown

A model should express required fields, genuine absence, and distinct variants in its type. Python unions and C# records encode those promises, while boundaries check external values.
Updated · Markdown

Asynchronous I/O frees server threads during waits and can improve capacity under load. IIS request flow, Task.WhenAll, and load tests show where the benefit ends.
Updated · Markdown

Test whole features through the public surface so regression tests survive later design changes. Class mocks bind tests to internals; transport doubles cover rare external failures.
Updated · Markdown

When a useful answer is enough, and when you also have to demonstrate that a prescribed procedure was followed.
Updated · Markdown

An application logging adapter can accept a DTO and expose its fields as structured state. ILogger.Log<TState> separates that context from the formatted message.

Repeated work can hide inside a short LINQ query. A customer-filtering benchmark separates string conversions, lookup choices, iteration and changed behavior.

Named ValueTuples make small results readable. Positional fields, copy behavior and Deconstruct methods explain the syntax and the limits of tuple return types.

A one-to-many map must enforce unique values and return a key from a value. Shared tests and four implementations show how correctness shapes a benchmark.

LINQ rewrites can add work while removing repetition. Customer filters expose query projections, lookup choices and why benchmarks must compare equal results.

A terminal request delegate exposes the work behind an ASP.NET Core endpoint. A movie-service experiment compares a narrow handler with the controller pipeline.

StringBuilder suits growing results, but can cost more for fixed concatenation. Compiler output, allocations and benchmark checks explain when to choose it.

.NET generics retain runtime type arguments. Typed lists avoid boxing value-type elements, while CLR specialization and code sharing preserve distinct types.

C# embeds constants and default parameter values in compiled callers. Library-only builds and IL inspection explain why callers must be rebuilt to adopt changed values.

C# construction order determines which fields are ready. Field initializers, constructor chaining, virtual dispatch and static initialization explain what runs when.

The type a foreach loop sees determines its enumeration path. Array lowering, list enumerators and yield state machines explain the work behind the syntax.

Delegates let callers supply behavior to reusable methods. Lambda syntax and SingleElseException show how higher order functions add useful failure details.

Choose static classes when instances serve no purpose. Shared type state, autonomous methods and immutable inputs explain the discipline that makes them useful.

C# passes arguments by value by default. Integer, string and object examples explain what gets copied, how ref works and which changes reach the caller.

A benchmark tests whether a change improves the same operation. BenchmarkDotNet makes input choice, setup, timing and allocation costs visible for .NET code.

CPU caches reward useful data kept close together. Pipelines, branch prediction and cache lines explain why memory access patterns matter to .NET performance.

.NET allocation costs follow what gets stored and copied. Structs, classes, arrays and strings explain object layout, references and garbage collection.

Run database tests on Visual Studio Online by creating a LocalDB instance, publishing a dacpac, and invoking the batch file from the build definition's Pre Test Script.

Azure role startup configuration affects IIS administration. An OnStart impersonation example and a later elevated Runtime update explain the approaches explored.

Use a local MSMQ queue to move large-file processing out of an Azure WebRole request, then install the queue service with a startup task and deploy its batch file.

Cross-domain CRUD needs changes on both sides: a Web API DelegatingHandler handles origin headers and method overrides while jQuery sends the matching requests.

Store a complete JSON object in a dynamic element's data attribute, then retrieve it with jQuery.data() to populate a form without extracting each attribute.

A generic HttpClient wraps asynchronous RESTful CRUD operations and JSON formatting. A MemberRepository and console client show how to use it with typed resources.

Map member CRUD operations to HTTP methods and resource URIs, then implement an ApiController with response status codes, Location headers, and error responses.

An X-HTTP-Method-Override header lets POST requests carry PUT or DELETE intent. A Web API DelegatingHandler translates the method before controller dispatch.

A JsonMediaTypeFormatter subclass wraps JSON in a callback for JSONP responses. Registration and controller-level control explain both the solution and its limits.

Use HttpClient to send GET, POST, PUT, and DELETE requests, serialize Customer objects with ObjectContent, and read typed responses from a self-hosted Web API.

Run an ASP.NET Web API in a console process with HttpSelfHostServer, register routes, and exercise a CustomersController backed by an in-memory customer list.

Add an ApiController to an ASP.NET WebForms project and register its HTTP route in Global.asax, then test customer requests and inspect JSON or XML responses.

PUT and DELETE requests can stop at IIS before reaching a REST API. Add the verbs to the extensionless handler through IIS Manager or IIS Express configuration.

Roslyn syntax trees and semantic information drive a C# to HTML highlighter, with a SyntaxWalker and explicit handling for type names whose definitions are unavailable.

The World Wide Net vision connects people through programmable devices, native applications, and an operating-system sandbox that reaches beyond the browser.

Build a WCF service and client around Customer contracts, then configure transport bindings, create client proxies, and publish metadata through WSDL and MEX.

Use the Response.Redirect overload with endResponse set to false to avoid ThreadAbortException, then structure request handling so execution finishes deliberately.

HttpWebRequest callbacks and Task.Factory.FromAsync support asynchronous GET and POST calls, with five approaches compared for collecting concurrent responses.

SelectMany flattens related sequences into a single result. Categories and posts explain its collection selector, result selector, joins, and nested foreach behavior.

Data parallelism distributes compute-bound work across cores. Prime-counting examples compare PLINQ, Parallel.For, thread-local state, partitioning, and measured timings.

WMI queries expose core counts, logical and physical processors, bitness, and architecture in C#, with narrower queries returning only the CPU information required.

Expose an existing synchronous method through Begin and End operations using delegates and IAsyncResult, carrying callback state while reusing the original computation.

A C# UrlEncode implementation preserves unreserved characters and percent-encodes others, with character-by-character comparisons against HttpUtility.UrlEncode.

Group lessons by AddedDate and select groups containing more than one item to find duplicates with LINQ, retaining the shared date and all matching lesson objects.

DBCC CHECKIDENT resets an identity seed to a chosen value. A table example explains why the reseed value precedes the desired next identifier after test data is deleted.

Start, stop, and restart Windows services from C# using net commands or ServiceController, with redirected process output, error handling, and completion waits.

A JsonSerializer streams IEnumerable<T> directly to JSON, preserving DataMember names and supporting JSONP while a DbDataReader wrapper avoids building an intermediate list.

Configure WCF tracing in Web.config and open the resulting .svclog in svcTraceViewer to find the exception hidden behind a vague service error message.

Matlus recorded high YSlow and PageSpeed scores after moving to Orion, with ShowSlow rankings and Google crawl charts illustrating the site's performance in 2011.

Orion powered Matlus with Quartz for ASP.NET and Windows Live Writer support. Its original release explains the Visual Studio solution and required Quartz project reference.

An IMetaWeblogProvider separates blog operations from XML and HTTP. MetaWeblogManager translates requests, while an IHttpHandler connects the library to a blog engine.

Stored-procedure metadata drives ADO.NET code generation and typed DbDataReader wrappers, supporting streamed results or materialized lists according to how callers use the data.

An OAuth 1.0 C# library handles request and access tokens across providers. A web application demonstrates authorization redirects and a later request for user information.

A Factory decouples payment processing from concrete classes, discovers implementations, and caches constructor delegates built with DynamicMethod and ILGenerator.

A Data Access Layer isolates business logic from the logical data model through domain-specific methods, stored procedures, and results shaped for the business layer.

Create a BusinessModule in HttpApplication.Init to reuse it across requests. The proposed ASP.NET design relies on application-instance ownership and stateless business layers.

Typed DbDataReader wrappers centralize field access and null handling. Examples compare reusing one wrapper through IEnumerable<T> with creating objects for a List<T>.

Quartz composes ASP.NET pages through a Builder, reusable HTML templates, and view objects. The walkthrough covers their relationships and Visual Studio templates.

ChangeType<T> converts request strings through registered binders, handling numbers, arrays, enums, and custom DTOs while keeping conversion calls consistent across web pages.

A Razor host wrapper parses templates and compiles generated C# outside ASP.NET. A custom base class supplies execution and output methods for a desktop example.

ASP.NET MVC's indirect access to views spreads responsibilities across controllers and templates. ViewData, child actions, and typed view instances frame the critique.

Razor makes C# mixed with HTML easier to read through its @ syntax, code blocks, layouts, and sections. Worked templates show the output and the limits of view responsibilities.

XMLHttpRequest and FormData upload files while the page stays open. File metadata, progress events, and completion handlers build a working HTML5 example.

IE 9 Beta improves performance and standards support, while its tabs and navigation need work. A 2010 assessment connects browser controls with everyday use.

Connecting a desktop computer to an HD TV keeps familiar applications and browser access. The setup covers video, audio, wireless controls, and online video quality.

Flash Player needs broader codec support and HTTP Range requests to compete with HTML5 video. The 2010 argument weighs video quality, hardware decoding, and seeking.

The HTML5 video poster should remain until playback begins. A 2010 critique explains why selected thumbnails matter more than automatically showing the first frame.

Find links to a target domain with HtmlAgilityPack and C#. A LinkFinder downloads HTML, selects anchor elements, and returns their text and attributes.

Expand code listings beyond fixed-width page layouts with jQuery. A wrapper supplies titles and icons, while a temporary overlay displays the full listing.

MPEG LA's 2010 announcement extends royalty-free treatment for Internet video that is free to viewers, while leaving H.264 product and browser licensing distinct.

IIS FTP 7.5 can authenticate IIS Manager Users with isolated directories. Folder permissions, provider settings, and C# user creation complete the setup.

Flash Mobile performance comparisons need equivalent workloads. A 2010 critique separates shared bandwidth, extra downloads, and execution costs from unsupported conclusions.

HTML5 video playback varied across browsers in 2010. Tests compare HD playback, CPU use, codec support, and full-screen behavior with Flash and native players.