Notes for week 19 of 2021
Another week heavy on the errands. I still managed to do quite some progress on the Graveyard, especially mentally as I finally reconciled two access control models.
It was a rainy week here, leading to some local floods. It has a wonderful effect on nature though: I haven’t seen such lush greenery in a while. It is a proper spring.
Random
- I’ve walked 42 km. I’ve been active for 9 hours during 8 activities. This week’s max speed was 16.2 km/h. Cycling is suspended for few more weeks because of fototoxicity.
- Excellent thread by Cory Doctorow about tech rent-seeking: Dishwashers that only allow their own overpriced detergent. Tesla disabling safety features on resell. The SaaSification of the real world continues.
- My insurance company allows random medical questions with 6h GP SLA and 24h specialist SLA. I’ve tried for the first time and it’s awesome.
- I missed some aspects of the Naomi Wu story and got sucked in re-reading her side of the story. The part about being detained in China for getting a spotlight from the West is horrifying. From a different aspect, the story of her deplatforming (in the same article) and censorship by social media is hair-raising. If you don’t know her story, I strongly suggest digging in, especially if you are in any way affected or around the current cultural wars around minorities, races, women in tech etc.: same area, very different perspective. Here is her wikipedia page with a link to the Vice article that started the drama and I’ll not linked to here (although some related stories were covered by Newsweek), for her perspective start at the beginning of her Medium series.
- Only on Stack Overflow: an answer to whether you should use crc32 as a hashing algorithm by…the author or Adler32
Graveyard
- Again it showed up that trying to develop anything without tests is slower even in the relative short run. I was trying to just display part of the old side and rabbit-holed into the old access control model, laden with bugs. It got much more clear and faster after I’ve bitten the bullet1 and started from test
- I uploaded the new higher-quality logo to all appropriate places, thanks to Wynn
- I wanted to shorten a text to use it as a cache key. In this particular instance, hash collision was not a big issue. I reviewed options:
- My first thought was to use a checksum algorithm, namely CRC32. It has more variants than I remember.
- Thanks to a friend’s recommendation, I’ve learned about FNV Hash
- I’ve learned about Adler32. Originally wanted to use that, but then I learned it has a weak error detection for short input size, which was my use-case. Also a first time I saw a usage of „:)“ smiley in a RFC
- I subsequently got a bit lost in an excellent overview of general purpose hash functions
Python
- I’ve missed Python supports enums since 3.4, very useful for magic constant handling
- If you want to have the enum string name or representation, you have to call
EnumClass.ENUM_NAME.name
orEnumClass.ENUM_NAME.value
, calling instr(EnumClass.ENUM_NAME)
only gives youEnumClass.ENUM_NAME
- If you have an enum
value
(like from DB) and need to map it back to enum class, that’s done usingEnumClass(value)
- If you want to have the enum string name or representation, you have to call
Recommended Readings From This Week
-
The Education of a Libertarian: Peter Thiel writing “I no longer believe that freedom and democracy are compatible.” in 2009 is not surprising to me, as well as naïvete of “Politics gets people angry, destroys relationships, and polarizes peoples’ vision: the world is us versus them; good people versus the other.”, but puts his subsequent actions into perspective.
-
Notes on technology in the 2020s: The make-or-break is the distribution of benefits across the population. But future can be exciting and I am also hopeful for the mRNA treatment potential:
And mRNA technology can be deployed against more than just viruses. Both Moderna and BioNTech have personalized vaccine candidates targeting cancer. Although called a “cancer vaccine,” the treatment is only administered once the subject has cancer—it isn’t preventative. The companies use an algorithm to analyze the genetic sequences of the tumor and the patient’s healthy cells and predict which molecules could be used to generate a strong immune response against the cancer. “I was actually witnessing the cancer cells shrinking before my eyes,” said Brad Kremer, a melanoma patient who received the BioNTech treatment.
-
Why not conneg: Why content negotiation is a failure.
-
Death of a Smart City: Usual playbook: 1) citizens horrified after learning how casually Valley collects data, 2) doesn’t matter unless a billionaire steps in. Good observation about a client state though; I’ll use that
-
Shenzhen Tech Girl Naomi Wu: My experience with Sarah Jeong, Jason Koebler, and Vice Magazine: I only vaguely remember the original Naomi story and completely missed she was hard-doxxed. Yikes. And the follow-up fallout is, well, really terrible.
-
Google and Facebook’s “Kill Zone”: “We’ve Taken the Focus Off Of Rewarding Genius and Innovation to Rewarding Capital and Scale”: Kill Zone is a good name
-
Geeks for Monarchy: The Rise of the Neoreactionaries: This explains quite a bit
-
Adversarial Interoperability: Reviving an Elegant Weapon From a More Civilized Age to Slay Today’s Monopolies: “Adversarial Interoperability” is a very nice term
-
Effective testing for machine learning systems.: Good inspiration!
-
Your ‘Surge Capacity’ Is Depleted — It’s Why You Feel Awful: Operating on a surge capacity during a pandemic
-
How Hindu supremacists are tearing India apart: OK, this is sad and scary as fuck
-
50 Ideas That Changed My Life: A good list, gives names to concepts
-
Skill up loop: How to get skills
-
The bullet were not the tests themselves, but the necessary infrastructure for fixtures and resource creation. The old architecture doesn’t really allow for testing in isolation and it felt like going through this will make the whole feature development very non-incremental. I was proven wrong. ↩︎
Published in Weekly Notes and tagged graveyard • python • Weekly Notes