Common Mistakes about Generational Garbage Collection
(Thanks to Nelson Elhage and Saivickna Raveendran for their feedback on earlier drafts. All mistakes that remain are mine.)
When talking about garbage collection, the notion of "generational collection" comes up. The usual motivation given for generational garbage collection is that "most objects die young". Therefore, we put the objects …read more
The Conference That Was Almost Called "Pythaluma"
As my friend Thursday said in her excellent talk (sadly, not up as of this time) naming things is important. Avoiding in-jokes is, in general, a good idea.
It is with mixed feelings, therefore, that my pun-loving heart reacted to Chris's disclosure that the most common suggestion was to call …read more
Why No Dry Run?
(Thanks to Brian for his feedback. All mistakes and omissions that remain are mine.)
Some commands have a
which simulates running the command but without taking effect.
Sometimes the option exists for speed reasons:
just pretending to do something is faster than doing it.
more often this …
(Thanks to Mark Rice for his helpful suggestions. Any mistakes or omissions that remain are my responsibility.)
Some Python projects are designed to be libraries, consumed by other projects. These are most of the things people consider "Python projects": for example, Twisted, Flask, and most other open source tools. However …read more
Tests Should Fail
(Thanks to Avy Faingezicht and Donald Stufft for giving me encouragement and feedback. All mistakes that remain are mine.)
"eyes have they, but they see not" -- Psalms, 135:16
Eyes are expensive to maintain. They require protection from the elements, constant lubrication, behavioral adaptations to protect them and more. However …read more
Thank you, Guido
When I was in my early 20s, I was OK at programming, but I definitely didn't like it. Then, one evening, I read the Python tutorial. That evening changed my mind. I woke up the next morning, like Neo in the matrix, and knew Python.
I was doing statistics at …read more
Avoiding Private Methods
MyClass._dangerous(self) is a private method.
We could have implemented the same functionality without a private
method as follows:
- Define a class
InnerClasswith the same
InnerClass.dangerous(self)with the same logic of
MyClassinto a wrapper class over
PyCon US 2018 Twisted Birds of Feather Open Space Summary
We would like Twisted to support contextvars -- this would allow cross-async libraries, like eliot to do fancy things.
Klein is almost ready to be used as-is. Glyph has the good branch which adds
- CSRF protection
But it is too big, and we need to break it to …read more
PyCon 2018 US Docker Birds of Feather Open Space Summary
We started out the conversation with talking about writing good Dockerfiles. There is no list of "best practices" yet. Hynek reiterated for us "ship applications, not build environments". Moshe summarized it as "don't put gcc in the deployed image."
We discussed a little bit what we are trying to achieve …read more