Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #3565

D

death and gravity

Personal blog · death.andgravity.comprogrammingweb

death and gravity is a personal blog at death.andgravity.com about programming and web. Since 2021, 20 different Hacker News readers have linked it 53 times, most often “Learn by reading code: Python standard library design decisions explained”. It is still writing: the last post was on 2026-06-24, and you can follow it by feed.

Visit the blog
53mentions?
20HN people?
2021–2026first – last linked?
Links on Hacker News per year · peak 22 in 2021

Too few sampled comments (6) to say how often HN recommends it.?

Why HN links it

HN readers link death and gravity for its Python newcomer post, praised for empathy and actionable advice, and for technical posts on run.sh scripts as a Makefile alternative and searching a 37 GB file.

Summarised by Claude from a sample of 6 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

Most-linked posts?

  1. Learn by reading code: Python standard library design decisions explained
    4 people · 5 mentions · first linked 2021-04-14
  2. /pwned
    3 people · 3 mentions · first linked 2022-12-16
  3. Limiting concurrency in Python asyncio: the story of async IMAP_unordered()
    3 people · 3 mentions · first linked 2023-03-28
  4. Caching a Lot of Methods in Python
    2 people · 3 mentions · first linked 2023-02-14
  5. Python sentinel objects, type hints, and PEP 661
    2 people · 2 mentions · first linked 2021-06-14
  6. When to use classes? When your functions take the same arguments
    2 people · 2 mentions · first linked 2023-06-16
  7. How I almost failed to search a 37 GB text file in under 1 millisecond
    2 people · 2 mentions · first linked 2022-12-13
  8. ProcessThreadPoolExecutor: when I/O becomes CPU-bound
    2 people · 2 mentions · first linked 2025-04-22
  9. Inheritance over Composition, Sometimes
    2 people · 2 mentions · first linked 2025-07-22

What Hacker News says?

  1. 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

    Comment linking /run-sh

    on “I Like Makefiles”
  2. Submitted The unreasonable effectiveness of f-strings and re.verbose as a story · 304 points

    HN discussion
  3. jono_wilson · 2022-02-07Recommends
    I've really enjoyed: https://death.andgravity.com/

    Comment linking /

    on “Ask HN: Great Blogs by Programmers”
  4. Submitted Learn by reading code: Python standard library design decisions explained as a story · 282 points

    HN discussion
  5. I cover The Architecture of Open Source Applications as well, here: https://death.andgravity.com/aosa :D

    Comment linking /aosa

    on “Learn by reading code: Python standard library design decisions explained”
  6. Submitted Write an SQL query builder in 150 lines of Python as a story · 141 points

    HN discussion
  7. For one, it can output more than one flavor of SQL: https://pypika.readthedocs.io/en/latest/3_advanced.html#hand... Since SQL is ever-so-slightly different across databases, I imagine trying to cover all of them as a single dev is a nightmare (especially if that's not the problem you're trying to solve). I wrote my own query builder because I know for sure I'm only targeting SQLite. The second I need my feed reader…

    Comment linking /own-query-builder

    on “Write an SQL query builder in 150 lines of Python”
  8. Submitted Namedtuple in a Post-Dataclasses World as a story · 113 points

    HN discussion
  9. Yup, after my own initial research I found it as well, and I like it a lot. I talk more about it here: https://death.andgravity.com/own-query-builder#sqlbuilder-py...

    Comment linking /own-query-builder

    on “Write an SQL query builder in 150 lines of Python”
  10. Submitted How I almost failed to search a 37 GB text file in under 1 millisecond as a story · 33 points

    HN discussion
  11. Hey, this has roughly the same philosophy as mine, I might add it to my survey: https://death.andgravity.com/own-query-builder#sqlbuilder-mi...

    Comment linking /own-query-builder

    on “Write an SQL query builder in 150 lines of Python”
  12. Submitted Dealing with YAML with arbitrary tags in Python as a story · 12 points

    HN discussion
  13. That's what the fancier __init__() at the end of the article[1] is for :) Here's the tl;dr of a real-world example[2]: query = Query().SELECT(...).WHERE(...) for subtags in tags: tag_query = BaseQuery({'(': [], ')': ['']}, {'(': 'OR'}) tag_add = partial(tag_query.add, '(') for subtag in subtags: tag_add(subtag) query.WHERE(str(tag_query)) It can be shortened by making a special subclass, but I only needed this once…

    Comment linking /query-builder-how

    on “Write an SQL query builder in 150 lines of Python”
  14. Submitted Learn by reading code: Python standard library design decisions explained as a story · 5 points

    HN discussion
  15. It's not either-or; I'm using the query builder to build _parametrized_ queries. Here are two examples: https://death.andgravity.com/query-builder-why#introspection https://github.com/lemon24/reader/blob/10ccabb9186f531da04db...

    Comment linking /query-builder-why

    on “Write an SQL query builder in 150 lines of Python”
  16. Submitted ProcessThreadPoolExecutor: when I/O becomes CPU-bound as a story · 4 points

    HN discussion
  17. I cover this solution here: https://death.andgravity.com/own-query-builder#jinjasql-sqlp...

    Comment linking /own-query-builder

    on “Write an SQL query builder in 150 lines of Python”
  18. Submitted Python sentinel objects, type hints, and PEP 661 as a story · 4 points

    HN discussion
  19. I wrote an entire article about why I didn't do that: https://death.andgravity.com/own-query-builder#sqlalchemy-co... 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).

    Comment linking /own-query-builder

    on “Write an SQL query builder in 150 lines of Python”
  20. Submitted Inheritance over Composition, Sometimes as a story · 3 points

    HN discussion
  21. Sometimes you need dynamic SQL, because the DB doesn't have stored procedures you can use for the same purpose (e.g. SQLite). I talk more about this use case here: https://death.andgravity.com/query-builder-why#the-problem

    Comment linking /query-builder-why

    on “Write an SQL query builder in 150 lines of Python”
  22. Submitted Process Thread Pool Executor: when I / O becomes CPU-bound – death and gravity as a story · 3 points

    HN discussion
  23. > In that sense, if anything this is a downgrade from regular SQL. It likely is. Ideally, instead of dynamically building queries, one would use stored procedures. I'm using this with SQLite, which doesn't have stored procedures, so it's an acceptable downgrade for me. Appending strings to lists gets messy quickly, example: https://death.andgravity.com/query-builder-why#preventing-co...

    Comment linking /query-builder-why

    on “Write an SQL query builder in 150 lines of Python”
  24. Submitted Learn by reading code: Python standard library design decisions explained (2021) as a story · 3 points

    HN discussion
  25. Glad to hear that :D One of my main goals was to show the entire progression of how I approached the problem, instead of just saying "here's the final result". I have another article that covers profiling in more detail, you might find it useful: https://death.andgravity.com/fast-conway-cubes#intro-to-prof... Note that besides the cProfile text output, there are better, graphical tools for profiling; I've personally…

    Comment linking /fast-conway-cubes

    on “How I almost failed to search a 37 GB text file in under 1 millisecond”
  26. Submitted Reader 3.0 released – a Python feed reader library as a story · 3 points

    HN discussion
  27. 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

    Comment linking /pwned

    on “How I almost failed to search a 37 GB text file in under 1 millisecond”
  28. Submitted Learn by reading code: Python standard library design decisions explained as a story · 3 points

    HN discussion
  29. Indeed that's discussed in the article, under "Position heuristic" - https://death.andgravity.com/pwned#position-heuristic

    Comment linking /pwned

    on “How I almost failed to search a 37 GB text file in under 1 millisecond”
  30. Submitted Asyncio-thread-runner: you can have a little async (as a treat) as a story · 2 points

    HN discussion

Search all of HN for death.andgravity.com

Linked by the same people?