News for hackers. Stuff that matters.

vesselapi

Django's ORM generates a lot of dynamic attributes — querysets, related managers, model fields — that don't exist as static class members. The django-stubs plugin for mypy has years of work encoding those patterns as special-case type narrowing rules. Pyright handles some of it through its own django plugin, but mypy+django-stubs is still the most battle-tested combo for catching things like filter() field name typos or wrong annotation on a ForeignKey. It's less about mypy being better in general and more about the plugin ecosystem being further along.
Biggest difference I've noticed is giving the model constraints upfront rather than letting it freestyle. Something like "use only the standard library, no new files, keep it under 50 lines" produces dramatically better results than open-ended "build me X." It's less about clever prompting and more about narrowing the solution space so it can't wander off.
Re:The 49MB Web Page on Sunday March 15, 2026 @07:38PM (#47393263)
This is what killed my willingness to subscribe to most outlets. If I'm paying, I expect the page to load in under a second with zero tracking. Instead you get the same bloated experience minus a banner ad or two.
Yes, running Chromium in a Docker container works well for this. There are prebuilt images like https://hub.docker.com/r/browserless/chrome that give you a headless instance you can connect to via CDP (Playwright, Puppeteer). Keeps everything isolated from your actual browser profile and credentials.