Notes
Things that took me a while to figure out.
The project write-ups cover what these systems do. This page is the other half — the small problems that don't show up until something is actually running somewhere other than your own computer. Most of these cost me an afternoon or two.
Client Map
A map that took ten seconds to answer anything
Client Map shows our customer sites along with what kind of rock is under each one, since that determines what a screen at that site is actually processing. The geology comes from a public state database — about 116,000 mapped areas, in a file a bit over 100 MB.
The first version worked and was unusable. Every time you clicked a site, it loaded the entire file and then checked all 116,000 areas one at a time to see which one you'd clicked in. Several seconds per click, and it held about a gigabyte of memory the whole time the program was open.
The fix was to sort the map data into a grid first, so each area is filed under whichever grid squares it sits in. Now a click only checks the handful of areas in that one square instead of all of them. Clicks went from seconds to instant, and the memory problem went away entirely.
The part I'd point at, though, is smaller. The map data is simplified, which means neighbouring rock formations sometimes have tiny gaps between them where they should meet. Click in one of those gaps and you technically match nothing, even though you're obviously inside a mapped area. So when nothing matches exactly, it looks at the surrounding squares for the nearest area within a mile or two — and marks that result as approximate so the map shows it as a best guess rather than a fact. Simplified data will confidently tell you the wrong thing unless you label it.
Manual Sorting
Thousands of folders that were mostly the same folder
Our manuals were filed by machine serial number — one folder per serial, thousands of folders. The large majority were identical to each other, because the same manual set gets copied for every serial in a production run. Nothing recorded which serial numbers shared which set.
The approach was to give each folder a fingerprint based on the contents of the files inside it rather than the folder's name. Two folders holding identical files get the same fingerprint no matter what they're called. Group by fingerprint, then collapse each group's serial numbers into ranges.
The result was a small spreadsheet with a start and end serial for each distinct manual set. Thousands of folders became a few dozen rows, and the parts department got a lookup table instead of a directory tree to dig through. There's no AI anywhere in it — it's the simplest thing here and one of the more useful.
Smaller ones
Field notesWatching a network folder doesn't work the usual way
Programs can normally be told to wake up when a folder changes. That doesn't work on a Windows network share — it just silently never fires, so you have to check on a timer instead. And you have to wait a moment before reading a new file, or you'll open one the other system is still halfway through writing.
The Desktop folder usually isn't where you'd think
On most company machines OneDrive is backing up the Desktop, which quietly moves it. The obvious location points at an old empty folder nobody sees. You have to ask Windows where it actually is rather than assume.
Restarting a Linux service isn't always what you'd expect
Asking a service to stop nicely means the system treats it as intentional and doesn't restart it. Stopping it abruptly gets counted as a crash — which is what actually triggers the automatic restart onto the new version. Ugly, but it works and it's written down.
Set the timezone, don't inherit it
The lightning monitor only runs during working hours. It was fine on my computer, and would have been five hours off once it moved to a server — servers default to UTC. Worth setting explicitly before you move anything.
Check you're reading the right field
Three versions of the lightning monitor read the wrong field out of the weather service's response. It never showed an error — it just came back empty every time and reported clear skies. A monitoring system that fails silently is worse than one that crashes.
Confirm the hardware actually moved
Telling a gate to open isn't the same as the gate opening. The relay gets triggered, then the system asks the controller whether it actually fired, and reports a failure if it didn't. Assuming success on something physical is a lie with a delay on it.
Some APIs need the very top permission
Our phone system's API returns a permission error for every role below the highest one — including the one literally called System Admin, which sounds like it should be enough. Hours spent debugging access that was working correctly the whole time.
Never read a spreadsheet by column position
Reading a shared spreadsheet by "the third column" works until somebody inserts a column. Then every lookup is silently wrong and nothing errors. Match on the column heading instead.
Short pages are the ones people search for
The manuals system originally skipped any page with hardly any text on it. Those are the spec plates, the warning pages and the torque tables — exactly what a technician goes looking for. Now they're kept, with a note explaining why so it doesn't get "tidied up" again later.
A barcode scanner is just a very fast typist
There's no way to ask whether input came from a scanner or a keyboard. But people take about a tenth of a second between keystrokes and a scanner takes almost none, so measuring the gap tells you which it was — no separate scanner field needed.
iPhones won't open the camera without a secure connection
Safari refuses camera access on anything that isn't https, and gives you nothing useful to explain why. A plain internal address will never work for a phone camera feature no matter how correct everything else is. That constraint shaped the whole approach.
Local files can't always load their neighbours
A packaged desktop app silently failed to draw its map overlay. The page was loading fine and the data file was valid — but a local page isn't allowed to fetch a file sitting next to it. No error worth reading, just nothing on screen.
Happy to go into more detail
Any of these is a longer conversation if it's useful.