Posts

Nugget 25: Code Representation and Information Density

Image
The previous two Nuggets ( N23 , N24 ) explored how, Primary Constructor, and Comments have a direct influence in Token Economy Management (TEM). These  examples, show that reducing code verbosity shift TEM in our favor.  However, consider the following: // Represents a customer identifier that must match our internal // regular expression format public string CustId { get; set; } And compare with: public CustomerId  Id { get; set; } This is not only a reduction of tokens. There is a transfer of information from natural language documentation into the programming language type system. There is semantics in the type. This is Typographic Semantics . The type  CustomerId now encapsulates validation rules. There is a caveat in this because the type must actually enforce the rules described in the documentation, and the LLM must have access to its definition when needed. However, TEM benefits from this approach. From this particular scenario, it becomes evident that we ...

Nugget 24: Token Economy Management — Comments Are Not Free

Image
Expanding, just a little, on Nugget 23 , where the fundamental idea is "Token Economy Management" (TEM), I found something literally disturbing: The Cost of Good Habits → Comments. Computer science professors have always told us that someone else will need to read our code and that, after we have departed, other software engineers and developers will look at what we did. Let them know with comments. For the following test, the file IEnumerator from System.Collections was selected. TEM was analyzed. These are the findings: ================================================== Traditional Comments vs. No Comments ================================================== Commented Function Token Count:    295 Non-Commented Token Count:            65 Tokens Saved:                                  230 Context Window Reduction:          77.97% ===========...

Nugget 23: Modern C# Features Help You Keep Token Money in your Wallet!

Image
Recently I was looking at a C# feature, introduced for classes with C# 12 in 2023. The feature in   question is the introduction of a Primary Constructor.  The feature itself is a sensible evolution. It helps reduce, what is considered today "boiler plate code," even if we are talking about the glorified constructor used to inject dependencies and set parameters. You may push back and say that, it is all sugar coating an old donut. Ok, sure, but I invite you to look at it closer from a different perspective. This Nugget is not about the merits of Primary Constructor, but about  Token Economy Management (TEM) when you pay attention at what the feature does through the lens of AI-Code Generation and AI-Analysis Tools. While the feature was originally designed for humans to reduce keyboard typing, the timing of its evolution—expanding from records in C# 9 to classes in C# 12 —perfectly aligns with the boom in LLM-driven development. Microsoft would likely object. "Nonsense,...

Nugget 22: Performance Optimization When Implementing User Input Debouncing in a Blazor QuickGrid Application

Image
I discovered this Nugget after comparing the same search interaction against SQL Server with and without user input debouncing. You can read about the problem WORKS Commons experienced in this  GitHub Issue 133 .  The problem was that sending a barrage of queries to the database caused conflicts and interruptions. In turn, EF Core aborted execution of the batch and threw an exception. The solution to this problem was presented in Nugget 21 . Having the two branches side by side made it possible to run this experiment. For the comparison, two SQL Server Profiler traces were captured. These were the properties of the trace: Experiment Setup This is how to set up the experiment. Open SQL Server Management Studio. From the menu bar, select Tools → SQL Server Profiler. Connect to the database under study. The only events tracked were RPC:Completed and SQL:BatchCompleted . All available columns were collected. In both cases, the user attempted to perform the same UI steps by typing...

Nugget 21: Preventing SqlClient.SqlException Transient Failure In a Blazor Application

Image
  In WORKS Commons, a QuickGrid loading job applications provides a search function for users to filter job applications by Company Name. The search is pushed by EF to the server. However the way this was implemented had a fatal flaw: With every character typed by the user, a request is sent to the server. This causes conflicts or interruptions on MSSQL Server, which in turn cases EF execution to abort the batch and an exception is thrown: 2026-10-19 16:13:30.746 -07:00 [WRN] Unhandled exception rendering component: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call. System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call. ---> Microsoft.Data.SqlClient.SqlException (0x8013190...

Case Study: The Ghosting Reality—Turning Silent Rejections into Actionable Signals

Image
A recent USA Today analysis highlighted a frustrating trend in today’s job market: the overwhelming number of applications that simply go into a black hole. WORKS Commons data tells the exact same story. To manage this without manual overhead, WOKS Commons now includes an automated, event-driven pipeline: Automated Time-Decay: A daily background process flags applications with no employer response after 30 days. Event-Driven Processing: The system emits a rejection event, which an event processor dequeues and passes via an asynchronous channel to a background reader. LLM Gap Analysis: The reader sends the job description alongside my targeted profile to an LLM, generating structured diagnostic signals analyzing potential skill gaps or alignment issues. The user can view the analysis result when viewing the declined application. As the data shows, nearly half of all applications simply decay without a response. This is the rejection pipeline. The user can decline manually after receivin...

Nugget 20: Git Alias to Remove a local, and Remote Branch and checkout the "Main" branch

Image
I have been using this alias successfully. It removes the local and remote branch and checks out main (formerly "master") branch.  Assume you have a branch named  event-processing-pipeline, the change request has been completed and merged to main; the branch is no longer needed . You can run your custom alias, on your computer, like this: git destroy-branch event-processing-pipeline Use it with caution. Do a little test first.  Create a test-branch and push it to remote.   git checkout -b test-branch                                                                             git push -u origin test-branch                                              ...