D
death and gravity
death.andgravity.com · Personal blog · on HN since 2021
The author writes detailed Python articles on standard library design, asyncio, performance, and when to use classes.
What HN saysHN commenters recommend it as a clear, empathetic guide for newcomers, and the author links their own posts to explain design choices.
20HN people shared it
7linked it in comments
36stories submitted
945story points
5 months agolast shared
2021people per year2026
Most-shared posts
- 1How I almost failed to search a 37 GB text file in under 1 millisecond5 people · 35 points · first shared 2022 · 6 comments on HN
- 2Learn by reading code: Python standard library design decisions explained4 people · 294 points · first shared 2021 · 43 comments on HN
- 3Limiting concurrency in Python asyncio: the story of async imap_unordered()3 people · 3 points · first shared 2023 · discussion on HN
- 4ProcessThreadPoolExecutor: when I/O becomes CPU-bound2 people · 7 points · first shared 2025 · 1 comments on HN
- 5Python sentinel objects, type hints, and PEP 6612 people · 6 points · first shared 2021 · discussion on HN
- 6Inheritance over Composition, Sometimes2 people · 5 points · first shared 2025 · discussion on HN
- 7Caching a Lot of Methods in Python2 people · 5 points · first shared 2023 · discussion on HN
- 8When to use classes? When your functions take the same arguments2 people · 1 points · first shared 2023 · discussion on HN
- 9The unreasonable effectiveness of f-strings and re.verbose1 people · 304 points · first shared 2022 · 90 comments on HN
- 10Write an SQL query builder in 150 lines of Python1 people · 141 points · first shared 2021 · 103 comments on HN
- 11Namedtuple in a Post-Dataclasses World1 people · 113 points · first shared 2021 · 88 comments on HN
- 12Dealing with YAML with arbitrary tags in Python1 people · 12 points · first shared 2022 · discussion on HN
- 13Reader 3.0 released – a Python feed reader library1 people · 3 points · first shared 2022 · discussion on HN
- 14SQL query builder in 150 lines of Python1 people · 2 points · first shared 2021 · discussion on HN
- 15Reader 3.4 released – 5 years, 2000 commits1 people · 2 points · first shared 2023 · discussion on HN
What HN people wrote when they linked it
genericlemon24 · 2021-08-27
I wrote an entire article about why I didn't do that: https://death.andgravity.com/own-query-builder#sqlalchemy-core-peewee-…
In general, SQLAlchemy is an excellent choice; in my specific case (single dev with limited time), the overhead would be too much (even with my previous experience with it).
jono_wilson · 2022-02-07
I've really enjoyed:
https://death.andgravity.com/
ac130kz · 2024-09-21
I do like "just" being suggested, but I strongly prefer using a very simple bash run script for tasks that do not require "make"'s extras, especially given that most modern build tools do parallelism and artifact caching internally.
Inspired by:
https://github.com/adriancooney/Taskfile
https://death.andgravity.com/run-sh
_dain_ · 2023-06-16
Have you read this? It's one of the few I've come across that has the appropriate degree of empathy for the confused newcomer + actionable advice:
https://death.andgravity.com/same-arguments
And it doesn't fall into the "Dog inherits from Animal" taxonomic crap.
Mogzol · 2022-12-16
They did mention they tried that, and got similar results to the binary search they were already doing: https://death.andgravity.com/pwned#position-heuristic
foota · 2022-12-16
They actually discuss that: https://death.andgravity.com/pwned#position-heuristic
jffry · 2022-12-16
Indeed that's discussed in the article, under "Position heuristic" - https://death.andgravity.com/pwned#position-heuristic