This post documents the new syntax features I learned about while reading cpython internals. You can create more than one context manager on a single line. So for example Shaken Fist contains code like this: with open(path + '.new', 'w') as o: with open(path, 'r') as i: … That can now be written like this:…
cpython internals
I have been paid money to write Python code since about 2006, so I figured it was probably time that I should understand some of the inner workings of Python. I therefore picked up two books on the topic, this one being the first of the two. This book to be honest isn’t completely what…
Shift
This is the second book in the Silo series, following on the Wool, which I recently read. I think to a certain extend this book is better than the first one — I certainly found it compelling. An excellent read that explains how the universe described in Wool came to be, but yet also sets…
Solve for Happy
Mo Gawdat was kind of a big deal, at IBM, Microsoft, and then Google. But he was unhappy, so he decided to take an engineering approach and try to systematically “solve for happy” and work out why adding more money, shiny objects, and adoration of others didn’t actually make him happy. Title: Solve for Happy…
Starter Villain
Now, I might be biased because I like John Scalzi’s stuff, but this book was really good. It starts slower than a normal Scalzi book, and takes a couple of chapters to really get going, but I am glad I was patient with it. Apart from that its a quick easy read. Its a typical…
Wool
Chet bought me this book and demanded I read it, and honestly that was a good call. The book reminds me a bit of Oryx and Crake, but perhaps that’s unfair given I read that one eight years ago and have probably forgotten some important details. The book is well paced and engaging. Despite being…
Understanding Compression
I bought this book on a whim, because I was trying to understand a compression scheme and had trouble finding good documentation on it. The book overall is written in a quite conversational style that I find a bit distracting from the content, and the introduction is a bit repetitive — yes I get it,…
Validating a keystone token
Once again I venture into the lands of poorly documented keystoneauth1 calls. This time, I want to be able to validate if a stored keystone authentication token is valid. Here’s the best I could come up with, I’d be interested in others have something better. For this to work, we need a service account to…
Cult of the Dead Cow
A very readable history of the early US hacking scene, including the roots of Def Con and Blackhat security conferences. The book is filled with a cast of characters many of whose names and exploits I recognize — although I’ve only met one or two in person. The book is definitely US-centric in it’s coverage…
Project Hail Mary
I enjoyed Andy Weir’s two previous books, so I guess it’s not a surprise that I enjoyed this one too. I feel like this one is closer to The Martian than to Artemis, so perhaps Weir is finding his sweet spot in terms of content choices. This book follows a school science teacher doing foolhardy…