Parsing sensor frames from a serial port with struct
Serial devices do not respect your read boundaries. A parser has to cope with half frames, garbage and bad checksums, and resynchronise on its own.
Serial devices do not respect your read boundaries. A parser has to cope with half frames, garbage and bad checksums, and resynchronise on its own.
Slicing bytes copies the data. When you parse a big buffer piece by piece, that adds up. memoryview slices share the memory instead.
Start in report-only mode, read the reports for a while, then enforce. The order matters more than the policy you write first.
A new service worker installs, then waits. Until you understand why, deployments seem to have no effect on some users for days.
Every OPTIONS request in your logs is a preflight the browser decided it needed. Knowing the rules lets you remove half of them.
The token is signed, not encrypted. Pin the algorithm, check the claims, and think twice about where you store it and how you will ever revoke it.
Choosing Argon2id, scrypt, bcrypt or PBKDF2 is the easy part. Setting the cost, upgrading old hashes and avoiding bcrypt truncation is where audits find problems.
Removing a key from the latest commit does nothing for the copies that already exist. The order of the response matters more than the cleanup tool.
OPcache is on by default in most builds, but the defaults check files on every request and quietly evict scripts when memory runs out. Two settings and one deploy step fix that.
Technologies