Hacker

Mike de Kok

@mdk25

Joined Nov 2026Data Engineer at CGINetherlands

Projects

  • FlagSmith Typed

    Flagsmith Experimentation HackathonNov 2026

    I built Flagsmith Typed, a VS Code extension that catches mistyped Flagsmith experiment names while you type: wrong flag names, wrong event names and wrong variant values. In a Flagsmith experiment, the code and Flagsmith each keep their own copy of names like checkout_button, buy_now and checkout_completed, and nothing checks that they match. A typo gives no error and no warning. The experiment keeps running and quietly collects useless data. We showed this on a real Flagsmith with 400 simulated users per scenario: 1. Wrong flag name ('checkout-button'): the flag isn't found, every user sees the default, and the experiment records zero exposures. 2. Wrong event name ('checkoutCompleted'): users see the right variant, but none of the 97 conversions are counted. 3. Wrong variant value ('buy-now'): nobody ever sees the new button, yet both groups are enrolled. The experiment compares two identical groups and can "conclude" the wrong thing. The team typically finds out much later, when the results come back empty or misleading. By then the traffic is spent and the decision may already be made. The extension moves that discovery to the moment the typo is typed. Who would use it, and how does it work? Who: developers who implement Flagsmith experiments and feature flags in JavaScript or TypeScript (web front-ends, React, Node). Indirectly it also serves the product managers and analysts who rely on the experiment's results being trustworthy. How it works: 1. Install and connect once. Install the .vsix, run Flagsmith: Connect, enter the Flagsmith URL (Cloud or self-hosted), paste an organisation API key (kept in VS Code's secret storage), and pick the environment. The project doesn't need any setup or generated files. 2. Load the real names. The extension reads the environment's flags, active experiments, variant values and metric events from the Flagsmith Admin API, using read-only requests. It refreshes them every 5 minutes and caches them, so checks keep working offline. 3. Check the code as you type. It parses each JS/TS file with the TypeScript parser and finds getExperimentFlag('…'), trackEvent('…'), and comparisons such as flag.value === '…', including through variables, switch cases and ?? 'control' fallbacks. Every name that doesn't exist in Flagsmith is underlined with a clear explanation of the consequence, for example "so these conversions are not counted". 4.Fix in one click. A quick fix (Ctrl+.) suggests the intended name, for example Change to 'checkout_completed'. The status bar shows which Flagsmith environment the code is being checked against.