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

Chiti · Story
The server took every position and stored none of them
A courier's marker moved on the map while the server quietly kept an old position. I made position reports acknowledged, then taught the socket to reconnect when the answer was stored:false.
In short
- The backend stores a position only for a socket whose handshake proved an identity, so an anonymous socket can broadcast a marker and persist nothing.
- Positions now go over the socket with an acknowledgement, and the client remembers whether the server says it stored them.
- When the answer is stored:false, or when the token changes, the socket reconnects once so the handshake reads the current token.
#socket-io#react-native#auth#reliability
·6 min read

Chiti · Story
A 10 second timeout failed an 11.3 second handshake
A socket timeout that looked generous lost every frame during reconnects. I measured the server's handshake at 11.3 seconds and moved the budget to 25.
In short
- The socket connect timeout was 10 seconds. The server's handshake measured 11.3 seconds, so the first attempt failed on exactly the connections that needed patience.
- Every failed attempt cost a full reconnect cycle with no frames, and the server replays nothing.
- I raised the budget to 25 seconds, above the server's own 20 second ping timeout, so the ping cycle decides when a link is dead.
#socket-io#react-native#debugging#timeouts
·5 min read

DailyBrief · Story
A stray PowerShell error turned my digest into 391 MB
One unsuppressed script call inside a foreach expression put a .NET error object into DailyBrief's digest. The same commit fixed a Georgian text repair that had never worked.
In short
- A call inside a foreach expression leaked an error object into the captured array, and ConvertTo-Json serialized its whole object graph.
- The fix is $null = ... 2>$null, plus a comment so nobody removes it.
- fixMojibake inverted a cp1252 corruption with latin1, so it always rejected its own output.
#powershell#debugging#encoding#electron
·5 min read

DailyBrief · Story
Every AI run died in 2 seconds, and nothing said why
A one-kilobyte stub where the claude binary should be made every DailyBrief run end silently. The fix was checking file size, and a second silent failure taught me the same lesson.
In short
- After a global npm install, claude.cmd was present but bin\claude.exe was a tiny text stub that Windows refused to run.
- Test-Path says yes to a stub, so the fix checks the binary's size, in one shared file instead of four hardcoded paths.
- Five days later a swallowed ENOENT made the app blame the CLI for a problem it did not have (c452d06).
#powershell#windows#claude-cli#debugging
·5 min read

DailyBrief · Story
Stripping claude -p down, then planning with Haiku first
A plain headless Claude call carries about 30k tokens of my own setup. A lean runner cut the recorded baseline to about 1.2k, and splitting code execution into two models cut its turns.
In short
- claude -p loads your whole personal setup. core/claude-run.ps1 switches each part off with a flag.
- The script comment records a baseline of about 1.2k tokens instead of about 30k, taken from the code and not from a benchmark I ran for this post.
- Code execution became two calls: a Haiku plan with read-only tools, then a Sonnet implement call with 25 turns instead of 40.
#claude-cli#powershell#ai#cost
·5 min read

DailyBrief · Story
A 72 MB upload kept dying, so I moved releases off my laptop
Pushing the DailyBrief installer from a home uplink took 14 minutes or ended in ECONNRESET, and left tags with no files. A tag-triggered GitHub Actions workflow made the upload local.
In short
- electron-builder created the release first and then died uploading the installer, leaving a tag with no assets.
- A GitHub Actions workflow now builds, tests and publishes on a runner that sits inside GitHub's network.
- scripts/publish-assets.js stays as a manual repair path, with the sha512 the updater checks and retries on every upload.
#github-actions#electron#ci#auto-update
·6 min read

Desktop Grid · Story
Ten commits for a Desktop Grid feature, then one revert
I built a dragging mode for Desktop Grid in 30 minutes, with each commit patching the last one, and then reverted all of it. The history does not say why, and I will not invent a reason.
In short
- The dragging mode took 10 feature commits between 04:59 and 05:25, and almost every one fixed a side effect of the one before.
- One revert commit, cfb8b58 at 05:29, removed 270 lines and added back 27. v1.0.0 was published two minutes later.
- The commit messages tell what the feature was doing. They do not tell why I reverted it.
#python#pyside6#git#scope
·6 min read

Desktop Grid · Story
Desktop Grid: my Qt overlay swallowed every click on the desktop
I ported Desktop Grid to PySide6 and the overlay blocked the whole desktop. The fix, three minutes later, was a 60 ms timer that flips one Windows window style.
In short
- tkinter got click-through from a colour key. Qt's per-pixel alpha window does not, and WMNCHITTEST with HTTRANSPARENT did not forward clicks to other processes.
- A timer polls the cursor every 60 ms and toggles WSEXTRANSPARENT on the overlay.
- Changing window flags in Qt recreates the native window and wipes extended styles, so they are reapplied each time.
#python#pyside6#qt#win32