Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    A

    Adam Johnson

    adamj.eu · Personal blog · on HN since 2015

    Adam Johnson is a Django core developer who writes practical posts on Django, Python, Git, and testing.

    Visit blogRSSHN submissions
    ProgrammingWeb DevelopmentOpen Source & Linux
    What HN says

    Commenters cite his Git rebase and Django versus Flask articles as clear and useful, and recommend his Django books.

    Stats for nerds
    51HN people shared it
    68linked in comments
    988story points
    Jan 2026last shared
    2019people per year2026

    Top posts on HN

    1. 1
      Django: what’s new in 6.0
      4 people · 385 points · first shared 2025 · 125 comments on HN
    2. 2
      Expectations of professional software engineers
      3 people · 224 points · first shared 2022 · 108 comments on HN
    3. 3
      How to Find and Stop Running Queries on PostgreSQL
      1 person · 125 points · first shared 2022 · 15 comments on HN
    4. 4
      Solving Algorithmic Problems in Python with Pytest (2019)
      1 person · 77 points · first shared 2020 · 43 comments on HN
    5. 5
      Python Type Hints – How to Handle Optional Imports
      2 people · 51 points · first shared 2021 · 30 comments on HN
    6. 6
      Django: Fix a view using a debugger with breakpoint()
      1 person · 16 points · first shared 2024 · 14 comments on HN
    7. 7
      Tips for Debugging with Print()
      3 people · 7 points · first shared 2021 · Discussion on HN
    8. 8
      AWS H3 is the Future of Hotels (Parody)
      2 people · 7 points · first shared 2016 · Discussion on HN
    9. 9
      Python Type Hints – How to Type a Descriptor
      2 people · 6 points · first shared 2022 · Discussion on HN
    10. 10
      Dry-run data imports in Django with roll-back transactions
      2 people · 6 points · first shared 2022 · Discussion on HN

    What HN people wrote when they linked it

    • cafxxApr 2022

      > Via its incr and decr commands, memcached provides a built-in way to atomically add k to a number. But it doesn’t provide other arithmetic operations; in particular, there is no “atomic multiply by” operation.
      Your programming challenge: Add a mult command to memcached.

      Protip for people in junior roles: if you're interviewing for a more senior position, the correct answer would *not* be to jump in straight and waste 3 hours implementing something that then you have to maintain forever.

      The best answer, from an *engineering*[1] perspective, would instead be noticing (or knowing) that memcached supports a CAS command (https://github.com/memcached/memcached/wiki/Commands#cas) that would allow to implement equivalent functionality without changes in memcached, and try to confirm why that would not be a viable solution. If, and only if, CAS is confirmed not to be a viable solution (e.g. excessive contention, unacceptable pX latency, ...) then you should spend the 3 hours (+ all the maintenance effort required until the end of life for that solution).

      The risk, in case you jump acritically on the solution, is to show you did not spend any time trying to actually understand the problem and you did not consider the pros and cons of viable alternatives (and this is a problem both during an interview, as well and especially when you're doing actual work), something that is normally frowned upon in senior roles.

      Obviously, being an interview, it's all play pretend so you'll…

    • smashedSep 2023

      This article is a few years old but it compares both really well:

      https://adamj.eu/tech/2019/04/03/django-versus-flask-with-single-file-applications/

      Flask works for simple projects but as your needs grow, the built-in and extensive Django ecosystem will have you covered. And as seen above, Django in its simplest form is no more complex.

      Some people really don't like the Django ORM, so in this case you might avoid Django altogether. It's possible to use Django without its data layer but it's a big part of its value.

      Also if you are building a pure API project, FastAPI is worth checking out for a streamlined process. Django Rest Framework works too, but is an extension.

    • mwpmaybeFeb 2024

      If you're interested in some of these concepts (i.e. smaller, more incremental PRs and stacked branches) but don't want to jump whole-hog into using a new product or tool, I highly recommend taking a look at `git rebase --update-refs`[0] to grease the wheels so to speak of implementing a similar approach with stock tooling. There's a great write-up on the feature and how it can help you here[1].

      [0]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---update-refs

      [1]: https://adamj.eu/tech/2022/10/15/how-to-rebase-stacked-git-branches/

    • howinterestingDec 2021

      I don't think there is a moral justification for circular dependency scopes to always be individual files, especially given that import statements count as circular. The same issue in other languages where circular scopes are individual files leads to some horrible workarounds:

      * Python TYPE_CHECKING https://adamj.eu/tech/2021/05/13/python-type-hints-how-to-fix-circular-imports/

      * C/C++ header files

      But regardless, there is too much Rust code in existence to change this now.

    • adamchainzJan 2026

      OP here. Thanks.

      Yeah, profilers are very varied in Python, and none are super easy. I often use either cProfile + pstats (per this post: https://adamj.eu/tech/2025/05/20/python-quick-cprofile-recipe-pstats/), cProfile + gprof2dot (per this post: https://adamj.eu/tech/2024/03/23/django-optimizing-system-checks/#profiling-the-checks ) or py-spy. I'm excited for "tachyon", the sampling profiler coming in Python 3.15.

    • theryanJan 2026

      While it is a bit of a pain, it can be made a lot easier with the --keep-base option. This article is a great example https://adamj.eu/tech/2022/03/25/how-to-squash-and-rebase-a-git-branch/ of how to make rebasing with merge conflicts significantly easier. Like you said though, it's not super user-friendly but at least there are options out there.

    Related

    Django Blogdjangoproject.com312 people

    Happy 20th Birthday, Django

    Django Blog
    Company · last shared 2026
    Reinout van Reesreinout.vanrees.org31 people

    PostgreSQL when it is not your job

    Reinout van Rees
    Personal · last shared 2026
    Simon Willisonsimonwillison.net957 people

    How to succeed in MrBeast production (Leaked PDF)

    Simon Willison
    Personal · last shared 2026
    James Bennettb-list.org95 people

    Let’s talk about usernames

    James Bennett
    Personal · last shared 2026
    Andrew Godwinaeracode.org68 people

    Hello, This Is London Rising: 3D Printing Maps from LIDAR Data

    Andrew Godwin
    Personal · last shared 2025
    Jacob Kaplan-Mossjacobian.org196 people

    Embrace the Grind

    Jacob Kaplan-Moss
    Personal · last shared 2026
    Will Vincentwsvincent.com16 people

    The Next WordPress

    Will Vincent
    Personal · last shared 2025
    Luke Plantlukeplant.me.uk135 people

    Why I’m Leaving Elm

    Luke Plant
    Personal · last shared 2026