Welcome

👋 I’m Benny, a software engineer and aspiring entrepreneur. Here I like to write about computers, life hacks and ideas.

Entity Resolution and the Instability Problem

The Problem Solution 1: Make the API record‑centric, not entity‑centric Solution 2: Introduce your own stable external Entity ID and map it to Senzing 2.1. Public vs internal IDs 2.2. Handling merges 2.3. Handling splits 2.4. Pros / Cons Solution 3: Provide an entity change feed (events) for downstream sync 3.1. Why? 3.2. Event model Solution 4: Treat entity IDs as ephemeral handles with TTL semantics Solution 5: Event‑sourcing / versioned entities (for heavy compliance/audit use‑cases) FrankenRes Internals API surface Detecting Splits and Merges with Senzing 1. What Senzing actually provides 2. Minimum state you need to track 3. Robust per-event processing pattern Concurrency safeguard Split vs Merge Detection Detecting splits Detecting merges A simplier way without splits and merges Senzing Lifecycle Detector C# Implementation Single-file example Usage TL;DR The Problem The classic entity resolution gotcha: the thing that looks like a primary key (e.g. Senzing’s entity ID) is actually a volatile cluster ID that can legitimately change as the engine learns. Senzing explicitly says their resolved entity ID is not a globally unique persistent identifier and that it’s just an identifier for a grouping that may be transient. (senzing.zendesk.com) ...

December 2, 2025 · 23 min

Shadcn UI Quick Reference

wat components.json The cn() Helper globals.css & Theming Dark Mode Dependencies Explained CVA Example Blocks vs Components Quick Start Workflow Forms with TanStack + shadcn/ui Claude Code + MCP Tips Essential Commands Mental Model wat shadcn/ui is a set of beautifully-designed, accessible components and a code distribution platform. Works with your favorite frameworks and AI models. Open Source. Open Code. components.json Controls how CLI installs components, paths, and styling preferences. ...

December 1, 2025 · 5 min

React v19

React React No Frills Tools npm Prettier ESLint Vite Vite Proxy TypeScript Bleeding Edge and Alternative Tools JSX DOM control Styling Rendering Lists Handling Events Passing Parameters to Event Handlers Passing JSX as Props React Hooks useState useEffect Custom Hooks useContext Forms and User Input Push Cart to Server React Ecosystem TanStack Router Vite Setup routeTree.gen.ts Router Setup TanStack Query Resources React React is a JavaScript library for building component based interactive UI’s. ...

May 5, 2019 · 26 min

Derivatives Trading

This post captures foundational knowledge that will help master Australian derivates trading. Options Fundamentals Call Option Analogy: Renting the Right to Buy a House Later Put Option Analogy: Renting the Right to Sell a House Later American vs European Buyer vs Seller Options Bring Flexibility The Value of an Option Call Value Example Option Premiums End-To-End Call Walkthrough Portfolio Strategies Covered Calls Covered Puts Spread Trading Bull Call (debit) Bull Put (credit) Bear Put (debit) Bear Call (credit) Condor (debit) Iron Condor (credit) Indicators Stochastics Bollinger Bands 50-Day Moving Average (50-DMA) Volume Options Trading Cheat Sheet FAQ Glossary Options Fundamentals An option is a contract that gives you the right, but not the obligation, to buy or sell a stock at a specific price (called the strike price) before a certain date (the expiration date). ...

October 11, 2025 · 22 min

.NET Clean Architecture

Domain centric architectures, like clean architecture, have inner architectural cores that model the domain. Dependency inversion is king, with inner layers defining abstractions and interfaces and outer layers implementing them. Clean architecture is a good fit when aligning to Domain Driven Design (DDD), dealing with complex business logic, high testability is desirable and/or working in a large team, as the architecture can enforce design policies. Guiding Principles Clean Architecture Layers Domain layer Entities Value Objects Domain Events Domain Services Interfaces Results and Exceptions Application layer: The Use Case Orchestrator Application Layer Key Responsibilities Use Case Orchestration Higher Order Business Logic Cross Cutting Concerns Exception Translation & Handling Dependency Injection Hub What the Application Layer Does NOT Do Example Application Service Dependency Injection and MediatR Bootstrapping CQRS Abstractions Handling Domain Events Cross Cutting Concerns with MediatR Pipelines Logging Pipeline Validation Pipeline with FluentValidation Infrastructure layer Infrastructure Layer Key Responsibilities Data Persistence and Access External Service Integration Cross Cutting Concerns Implementation Event Handling Infrastructure What the Infrastructure Layer Does NOT Do Example Concrete Provider for IDateTimeProvider EF Core Setup Integrating Domain Entities with EF Core Publishing Domain Events in the Unit of Work Handling Race Conditions with Optimistic Concurrency Distributed Cache Service Presentation layer Presentation Layer Key Responsibilities What the Presentation Layer Does NOT Do API Controllers and Endpoints Seed Data and EF Migrations Authentication (authn) with Keycloak Authorization (authz) Role-based Authorization Permission-based (Policy) Authorization Resource-based Authorization Structured Logging Health Checks .NET Implementation Tips General .NET Tips Domain Layer .NET Tips Application Layer .NET Tips Infrastructure Layer .NET Tips Presentation Layer .NET Tips Structured Logging Serilog Serilog and Seq Setup Guide Outbox Pattern The Problem The Solution Key Benefits Outbox .NET Implementation Outbox Message Definition Transactionally Publish Domain Events as Outbox Messages Background Worker Job with Quartz.NET Hookup Dependency Injection ASP.NET Core Minimal APIs Controller to Minimal API Conversion Cookbook Centralising Route Opinions with Route Groups Testing Domain Layer Unit Testing Application Layer Unit Testing Mocking with NSubstitute Application Layer Integration Testing with TestContainers Troubleshooting Accessing Internal Symbols Bonus: Contemporary .NET gems Primary Constructors Switch Expressions Records Async Tips MediatR IRequest and IRequestHandler - Request/Response Publishing INotification and INotificationHandler - Pub/Sub Publishing MediatR.Contracts Package Visual Studio and Roslyn Code Quality Level Ups dotnet CLI Tips Guiding Principles High level qualities that a good software architecture should (and enforce) strive for; maintainability, testability and loose coupling. ...

May 29, 2025 · 57 min

Business Cheat Sheet

A glossary of the key terms, acronyms, and ratios commonly considered business basics. Finance and Metrics Term Description Accrual Accounting Records revenue when earned and expenses when incurred, regardless of cash movement - gives a truer picture than cash accounting ARPU Average Revenue Per User: Revenue ÷ total customers Useful in SaaS B2B Business to Business: Selling to other companies Often longer sales cycles, higher ticket B2B2C Business sells to another business that serves end consumers (eg, Shopify → merchants → buyers) B2C Business to Consumer: Selling directly to end users Usually higher volume, lower ticket BAMFAM Book A Meeting From A Meeting: Sales discipline to never leave a conversation without scheduling the next step [100M Closing Playbook §Closes] Bottom Line Net profit after all expenses; the final measure of profitability. CAC Customer Acquisition Cost: Total cost to acquire a new paying customer (ads + sales + marketing overhead ÷ new customers) [100M Leads p208] Churn % of customers who cancel in a given time period Inverse of retention [100M Retention Playbook §Churn Math] Churn Rate Percentage of customers lost over a specific period. Close Rate Percentage of leads or prospects that convert to paying customers. COGS Cost of Goods Sold: The direct cost of purchasing the goods a company sells, and it is a key expense that directly impacts profit. It includes expenses like raw materials, direct labor, and manufacturing overhead, but not indirect costs like marketing or salaries. Cost to Value The perceived value must significantly exceed the price paid; customers buy when the benefit outweighs the cost CRO Conversion Rate Optimisation: Improving the percentage of visitors who take a desired action (e.g., purchase, sign up). EBITDA Earnings Before Interest, Taxes, Depreciation, and Amortization: A cleaner view of profitability before financial structuring FCF Free Cash Flow: Cash left after operating expenses + capital expenditures Critical because cash pays bills, not “profits” [100M Money Models p233] Funnel The stages a prospect moves through before becoming a customer (e.g., awareness, interest, decision, action). Grand Slam Offer Offer so good people feel stupid saying no [100M Offers p22] Gross Margin (Revenue – Cost of Goods Sold) ÷ Revenue High gross margin = scalable business Gross Margin / Gross Profit The revenue remaining after deducting the Cost of Goods Sold (COGS). Gross vs Net Gross = before costs (top-line) Net = after costs (bottom-line) Industry CAC Benchmark Varies heavily Rule of thumb: aim for CAC ≤ 1/3 of LTGP [100M Leads p208] Lead Magnet A valuable piece of content or service (e.g., a free PDF guide, training video, or consultation) offered to a prospect in exchange for their contact information. LTGP Lifetime Gross Profit: LTV × Gross Margin % More accurate than LTV since it accounts for cost of goods sold [100M Money Models p228] LTGP:CAC Ratio Healthy is ~3:1 (spend $1 to acquire, get $3+ in gross profit) If <1:1, you’re losing money; if 10:1, you’re under-investing [100M Leads p208] LTV Lifetime Value: The total revenue expected from a customer over their relationship with you [100M Money Models p226] Marketplace Connects buyers and sellers, takes a cut (Airbnb, Uber) Net Margin Net profit ÷ Revenue Bottom-line profitability after all costs Offer The combination of a product or service, its price, payment terms, incentives (bonuses), and guarantees presented to a prospect. Online Ads Attribution The process of identifying which marketing touchpoints (e.g., specific ads, campaigns, or channels) were responsible for a customer’s conversion or purchase. Outbound Outreach Proactively reaching out to potential customers via calls, emails, or ads. Recurring/Subscription Predictable monthly revenue Gold standard for valuations Return on Ad Spend (ROAS) The revenue generated for every dollar spent on advertising. Calculated as: (Revenue from Ads / Cost of Ads). Risk Reversal Guarantees that shift risk from buyer to seller [Playbook – Guarantees §Hard Guarantees] Sales Velocity A measure of how quickly a business can move qualified leads through its sales pipeline and turn them into customers, and how much value those customers represent. Scarcity/Urgency Limiting supply or time to push action [100M Offers p113] Ticket Price The price paid for a product or service; often refers to average sale amount. Top Line Total revenue before any costs or expenses are deducted. Transactional/One-off One-time purchases, low predictability Value Equation (Dream Outcome × Perceived Likelihood of Achievement) ÷ (Time Delay × Effort & Sacrifice) [100M Offers p47] Healthy Business Ratios Ratio Amount Description LTGP:CAC > 3:1 3:1 is the minimum healthy rule of thumb [100M Leads p208] Churn < 5% monthly Strong retention [100M Retention Playbook §Churn Math] Payback Period ≤ 12 months CAC recovered within a year [100M Lifetime Value Playbook §Payback] EBITDA Margin 15–30% Common range for service & SaaS businesses

September 28, 2025 · 4 min

Entity Resolution with Senzing and the .NET SDK

Context Record vs Entity vs Relationship Data Quality Issues ER Addresses Senzing Repository Key Senzing Attributes Resolution Concepts Features Feature Scores Match Levels Senzing V4 SDK Setup on Metal Native Senzing SDK Setup .NET SDK Setup Setup Local NuGet Source Senzing V4 C# Snippets Senzing V4 CLI Tools sz_configtool listFeatures listAttributes listRules listFragments principles sz_explorer get how (tree) Senzing Weirdness Typed models vs loose JSON strings TODO Info Messages aka SZ_WITH_INFO Senzing Best practices Resources Context The process of identifying and linking records that refer to the same real-world entity across different data sources, even when the records contain variations, errors, or incomplete information. ...

September 19, 2025 · 15 min

PostgreSQL

PostgreSQL (postgres or pgsql) is a powerful open source relational database known for reliability, extensibility, and standards compliance. It features: Advanced SQL support (window functions, CTEs, JSON, full-text search) ACID compliance and strong transactional integrity Rich indexing (B-tree, GIN, GiST, BRIN, hash, SP-GiST) Extensible with custom types, operators, and functions MVCC for high concurrency and performance Robust security, authentication, and role management Active community, frequent releases, and excellent documentation Ideal for everything from small apps to large-scale, mission-critical systems. ...

July 14, 2018 · 7 min

What Two Years Taught Us

What worked, what didn’t, and concrete recommendations for future projects. My in the trenches opinions, observations and reflections of building a complex distributed software system across multiple geographically dispersed teams. Key Successes Technical Achievements Process Improvements Project Management Challenges Forgotten Agile Principle 1: Individuals and Interactions over Processes and Tools Forgotten Agile Principle 2: Working Software over Comprehensive Documentation Forgotten Agile Principle 3: Customer Collaboration over Contract Negotiation Forgotten Agile Principle 4: Responding to Change over Following a Plan Challenges and Learnings Technical Challenges Team and Communication Architecture Decisions What Worked Well Technology Stack Team Dynamics Recommendations for Future Projects Personal Growth Lessons for Future Projects Key Successes Technical Achievements Successfully built a big data horizontally scalable ingestion system using Kubernetes and leaned into cloud native approaches early on Established heavy use of Python type hints early on, which improved code quality and editor aid Evangelised Elasticsearch early in the design phase: Led the adoption of Elasticsearch for read workloads, in the face of aprehension and inexperience in the broader team Implemented and tuned sophisticated text analysis pipelines Optimised search with ngram tokenizers, stemming, and asciifolds Designed efficient denormalised document structures and indexing strategies Lesson learned how important it is to make the the most appropriate data storage and management choices, make or break analytic solutions such as the one we collectively built. What consistency guarantees do are required? How fast? How are you going to calculate aggregations? What kind of read or write workloads need to be handled? Can these be separated and tackled as different problems? Elasticsearch is a HUGE reason why we were successful Created flexible hierarchy layering design, allowing differing customers to stamp the data with their own ways of doing things. Integrated OpenTelemetry for comprehensive observability Developed optimistic locking scheme and deep linking capabilities Automated deployments and quality verification with a gigantic test suite investment (unit and integration), linting, autoformatting, all orchestrated with a Makefile frontend and Bamboo CI pipeline The team embraced containers heavily from day 1. From running local vendor infra containers (redis, mongo, elasticsearch, etc) to running repeatable build workloads. Process Improvements Adopted Make for development automation, significantly boosting productivity Leveraged code generation effectively for complex scenarios, an ever powerful technique Implemented comprehensive integration testing with containerization Successfully broke down the system into functional components early Established well-defined data schemas upfront, which provided stability Project Management Challenges This project mangaged to defy every Agile Manifesto Principle. ...

June 20, 2025 · 8 min

How to Win Friends and Influence People

Key Lessons Fundamental People Handling Techniques If you want honey, don’t kick the beehive - avoid criticism The big secret of people - appreciation Those who can do this have the whole world - arose eagerness Make People Like You Do this and be welcome anywhere - be interested in others Make a good first impression - smile Mini essay by Elbert Hubbard Don’t be headed for trouble - names Become a good conversationalist - listen How to interest people - others interests How to Make People Like You Instantly - make others feel important How To Win People To Your Way Of Thinking You Can’t Win an Argument - avoid like the plague Disagreement Handling Cheat Sheet A Sure Way of Making Enemies and Avoiding It - respect others opinions If You’re Wrong, Admit It - admit wrongs quickly A Drop of Honey - be friendly The Sun and The Wind The Secret of Socrates - focus on agreeable points, not differences A Safety Value in Handling Complaints - talk less, listen more How to Get Cooperation - don’t take credit, plant seeds A Formula That Will Work Wonders - see things from others perspective What Everybody Wants - sympathy An Appeal That Everybody Likes - nobler motives Hollywood Does It - dramatize ideas When Nothing Else Works - stimulate competition Leadership If Must Find Fault, Begin This Way - sandwich technique How to Criticise and Not Be Hated But To And - highlight others mistakes indirectly Talk About Your Own Mistakes First - start with your own shortcomings No One Likes to Take Orders - ask questions Let Others Save Face - be respectful of others pride How to Spur People on to Success - praise every improvement Give A Dog A Good Name - give others a grand reputation to strive for Make The Fault Seem Easy to Correct - encouragment Making People Glad To Do What You Want - empathy Changing Peoples Attitudes Cheat Sheet Dale Carnegie’s flagship “How to Win Friends and Influence People” is a foundational book on communication, relationship-building, and personal effectiveness. First published in 1936, its principles remain relevant for anyone seeking to improve their social skills, leadership, and influence. ...

June 11, 2025 · 54 min