Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
17 posts · #windows
Clear filters·6 min read

Light Browser · Story
Why my browser signed everyone out: the host exited first
Chromium writes its cookie store while it shuts down, and my Win32 shell quit before it finished. The fix was a shutdown barrier that waits for the engine process to exit.
In short
- Chromium saves the cookie database, site storage and an encryption key during engine shutdown. My shell closed its window and quit first.
- The fix is TeardownEngine: close every WebView, drop the environment, then wait on the engine's process handle.
- The same barrier now covers Windows sign-out, the updater restart, deep sleep and engine crashes.
#cpp#webview2#windows#debugging#shutdown
·6 min read

Light Browser · Story
My browser's import feature looked exactly like an info-stealer
Reading other browsers' saved logins is what credential stealers do, so antivirus flagged it. I moved the code into a separate on-demand exe and made the installer per-user.
In short
- Profile-reading and DPAPI code moved out of LightBrowser.exe into a separate lbimport.exe, downloaded only when someone clicks import.
- The tracked main build went from 2,345,984 to 1,323,008 bytes.
- A second commit made the installer per-user, so no UAC "unknown publisher" prompt appears on install or update.
#cpp#windows#security#antivirus#installer
·10 min read

Desktop Grid: a click-through desktop overlay in Python and Qt
I wanted labeled zones drawn on my Windows desktop that never block a click. Qt swallowed input, so I toggled one window style on a 60 ms poll. I also built a feature in 10 commits and reverted it.
In short
- The overlay is a translucent Qt window across the virtual screen, pinned just above the wallpaper, and clicks pass through because a 60 ms poll toggles the WSEXTRANSPARENT window style.
- Desktop icons are read and moved by sending list-view messages to explorer.exe and exchanging data through memory allocated inside that process.
- Icon layouts are saved per display setup, keyed like 2560x1440@1, and restored a moment after the resolution changes.
#python#pyside6#windows#ctypes
·6 min read

Making SSMS work with MySQL: a linked server and live views
SSMS only speaks SQL Server's TDS protocol, so shared-hosting MySQL was out of reach. I built a bridge in four releases in one afternoon, and the sync bugs taught me the most.
In short
- SSMS cannot open MySQL, so the bridge installs a linked server on LocalDB and creates one OPENQUERY view per MySQL table.
- Four tagged releases landed on 8 Oct 2026, from f7b7aed at 12:42 to 8f22162 at 13:22 (+0400).
- Inserts through the views failed when columns were omitted, so each view got an INSTEAD OF INSERT trigger.
#C##SQL Server#MySQL#Windows
·11 min read

TaskPad: a 1 MB WPF task editor that installs and updates itself
Notepad is too plain and VS Code is too heavy for a to-do list. I built TaskPad in C# as one 1 MB exe, and shipped 29 releases in about eleven hours. Here is what broke along the way.
In short
- The whole app is one exe: AvalonEdit is embedded as a resource and loaded through an AssemblyResolve handler, so there is no DLL next to it. The v1.9.4 build is 1,079,296 bytes.
- The same file is the portable app, the per-user installer (it detects "setup" in its own file name) and the updater, which swaps a running exe by renaming it to .old.
- Comments are stored as CriticMarkup inside the text file, so a note with a full discussion still opens in any editor.
#csharp#wpf#windows#desktop
·5 min read

TaskPad · Story
How TaskPad replaces its own running exe, and what the checksum covers
Windows will not let you overwrite a running exe, but it lets you rename it. That one fact is the whole TaskPad updater. I also show what the SHA-256 check does not protect against.
In short
- The updater downloads the new exe to Temp, checks a SHA-256, renames the running exe to .old, copies the new one in, and rolls back if the copy fails.
- The installer is the same file: it starts in setup mode when "setup" appears in its own file name.
- The checksum is only checked when the release notes contain a SHA-256: line, and it comes from the same release as the exe.
#csharp#wpf#updater#windows
·6 min read

Unfair · Story
A memory scanner with a web UI needs a guard and a test for it
Unfair can write into any process I can open, and its Flask UI has no login. The only protection is a localhost check, and the one test that proves it. Design notes from a one-commit repo.
In short
- The repository has a single commit, so this is a design story read from the code and tests, not a bug-fix history.
- The server binds to 127.0.0.1 and a beforerequest hook returns 403 for any other address.
- testweb.py asserts that a request from 10.0.0.5 is refused, so the guard is tested and not only documented.
#python#flask#security#windows
·10 min read

DiskDesk: a Windows desktop on any drive, built with Python and COM
A second Windows desktop on any drive, built by calling the shell instead of imitating it. The hard parts: context menus that came up empty, and an updater that must never ask a question.
In short
- Wherever Windows already has an API, DiskDesk calls it: context menus, thumbnails, file operations and the clipboard all go through the shell.
- Real context menus need IContextMenu2 and IContextMenu3, which pywin32 does not expose, so shellmenu.py calls raw vtable slots through ctypes and forwards menu messages from a hidden window.
- The folder menu and the real desktop's own entries are merged, and folder-scoped verbs come only from the DiskDesk folder so Paste never hits the real Desktop.
#python#windows#qt#com