Python trivia: x+(1+1) is faster than x+1+1 because the former bytecode can be optimised. The latter cannot because x may have __add__.
miniblog.
Related Posts
I still find C-style format strings to be more readable than Rust format strings.
"Player %s has score %d" vs "Player {} has score {}".
The former feels a little easier to visualise how it will look in practice.
Have I missed anything? Every format string specification I've ever looked at is surprisingly big.
Finding security vulnerabilities, trying to report issues to the former prime minister, and the most entertaining blog post I've read a very long time:
@cstanhope In theory it's not giving them much more data: I already have to give the company meter readings.
https://www.telegraph.co.uk/money/consumer-affairs/six-reasons-say-no-smart-meter/ and https://www.the-ambient.com/explainers/smart-meters-2020-uk-guide-explainer-2153/ persuaded me against getting a smart meter though. The former link suggests I won't save money or escape confusing bills, and the latter suggests the early standards haven't won.
It'll probably win eventually, for better or worse.


