news
Programming Leftovers
-
Dayvi Schuster ☛ Most Code Should Be Boring
Every clever line you write is a loan against the future. You get a small amount of time back right now, because compressing six lines into one and having it still pass the tests feels fantastic. That’s a real feeling and I’m not going to pretend it isn’t. But the interest gets charged to whoever reads it next, and that’s almost always you, usually later, usually tired, and usually looking at it for a completely different reason than the reason you wrote it.
The thing that gets people is that the clever version never announces itself. It doesn’t throw a warning. It doesn’t show up in your logs and say hey, this function is doing something you are going to hate. It just quietly costs people forever and you’ll never see that invoice, which is exactly what makes it so easy to keep doing.
-
Perl / Raku
-
Python
-
Adam Johnson ☛ Django: serve apple-app-site-association and assetlinks.json
These files can do more than link handling. Both can also associate apps with your site for password autofill and passkeys, so users can sign in to your apps with credentials saved from your site.
In this post, we’ll look at serving these two files from Django, with tests. It follows the same pattern as my recent post on serving a security.txt file, but with JSON and a few gotchas covered below.
-