#python
- The capacity check that let all nine throughNine writers hit one limited slot at the same moment and all nine got on. The capacity check ran for every one of them, the lock was the right lock, and a one-user test passes it every time.
- My deploy ran my tests, and my tests ran my deployMy desktop ran out of memory five times in two days, once killing 29,082 processes at a stroke. Two files that were each sensible on their own had made a loop with no way out.
- Railway shows my request counts but won't export themRailway's dashboard knows how many requests my app served, but there's nothing for Prometheus to scrape. Turning its per-minute figures into a counter goes wrong three ways.
- A third of my request was the garbage collectorA slow grid in a Flask app I maintain had an obvious suspect. The biggest cost was Python re-checking 134,000 objects that would never be freed.
- The badge that said 21 for a count of 1I added a small shield badge showing how many months someone had won a challenge. On my own profile, with one win, it said 21. The sample render I had checked it against said 1.
- Running SQLite in production (yes, really)I deployed a Flask app to Railway with SQLite as the only database. Here is why that was the right call, and the five things that actually bite when you do it.
- Use secrets, not random, and remember the shufflePython's random module is the wrong tool for passwords, and swapping it for secrets is only most of the fix. The shuffle at the end catches people out.
- Parsing Markdown by alternating on odd and evenThe nicest idea I met while building boot.dev's static site generator: parse inline Markdown by splitting on the delimiter and alternating, and get validation free from the section count.
- The particle fade that never fadedI wrote fade-out code for explosion particles in a Pygame project, and it looked fine to me for months. It never faded once, and the reason is a quiet rule about how Pygame draws.
- Space has no drag, so I added someThe guided version of Asteroids moves the ship directly: press a key, move; release, stop. I wanted it to feel like space, which meant momentum, and momentum turned out to need a compromise.