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.

What HN saysCommenters cite his Git rebase and Django versus Flask articles as clear and useful, and recommend his Django books.
51HN people shared it
16linked it in comments
68stories submitted
988story points
7 months agolast shared
2015people per year2026

Most-shared posts

  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
    Tips for Debugging with Print()
    3 people · 7 points · first shared 2021 · discussion on HN
  4. 4
    Python Type Hints – How to Handle Optional Imports
    2 people · 51 points · first shared 2021 · 30 comments on HN
  5. 5
    AWS H3 is the Future of Hotels (Parody)
    2 people · 7 points · first shared 2016 · discussion on HN
  6. 6
  7. 7
    Python Type Hints – How to Type a Descriptor
    2 people · 6 points · first shared 2022 · discussion on HN
  8. 8
  9. 9
    New Testing Features in Django 4.0 – Adam Johnson
    2 people · 3 points · first shared 2021 · discussion on HN
  10. 10
    Django: Profile Memory Usage with Memray
    2 people · 3 points · first shared 2026 · discussion on HN
  11. 11
    How to Split Types by Python Version – Adam Johnson
    2 people · 2 points · first shared 2022 · 1 comments on HN
  12. 12
    Python Type Hints – *args and **kwargs
    2 people · 2 points · first shared 2023 · discussion on HN
  13. 13
    Flake8-Logging
    2 people · 2 points · first shared 2023 · discussion on HN
  14. 14
    Reindexing all tables after upgrading to PostgreSQL 13
    2 people · 2 points · first shared 2021 · discussion on HN
  15. 15
    Django: Clean up unused code with Vulture
    2 people · 2 points · first shared 2023 · discussion on HN

What HN people wrote when they linked it

theryan · 2026-01-13
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.
mwpmaybe · 2024-02-23
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---upd… [1]: https://adamj.eu/tech/2022/10/15/how-to-rebase-stacked-git-branches/
smashed · 2023-09-13
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-… 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.
rlawson · 2023-02-22
On Django any of Adam Johnson or Will Vincent books are great https://adamj.eu/books/ https://wsvincent.com/books/
cafxx · 2022-04-18
> 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…
adamchainz · 2026-01-16
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/#prof… ) or py-spy. I'm excited for "tachyon", the sampling profiler coming in Python 3.15.
teagee · 2025-12-09
Check out the HTMX example in the blog, this helped me better understand how it could be used https://adamj.eu/tech/2025/12/03/django-whats-new-6.0/#render-partials…
spapas82 · 2025-12-05
I think they should. Not sure if they will. However Adam Johnson mentioned django-tasks as the reference implementation that may be included in Django here https://adamj.eu/tech/2025/12/03/django-whats-new-6.0/.
simonw · 2024-07-20
Should link here instead - my post is just a link and my own summary notes: https://adamj.eu/tech/2023/11/02/github-actions-faster-python-virtual-…
VectorLock · 2023-08-27
I'm guessing someone got inspired by https://adamj.eu/tech/2021/05/11/python-type-hints-args-and-kwargs/ IMHO mixing args and kwargs together like this - having a dict with mixed types for keys - looks kinda grotty.
viraptor · 2022-09-03
> "one url, one file" by letting Apache handle the routing Source of many issues when someone forgets the "include auth.php" equivalent in that one specific file. (not theoretical, this happened so many times) > I have to restart the application to see changes I make. https://adamj.eu/tech/2021/12/16/introducing-django-browser-reload/
howinteresting · 2021-12-31
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… * C/C++ header files But regardless, there is too much Rust code in existence to change this now.
jeroenjanssens · 2021-11-16
* [Adam Johnson](https://adamj.eu/tech/) - Ansible, AWS, Django, and Python. * [Julia Evans](https://jvns.ca/) - Linux, Rust, Debugging, Comics, HTTP.
rvrabec · 2020-09-23
Really cool - I was just reading this and worrying about cross scripting attacks: https://adamj.eu/tech/2020/02/18/safely-including-data-for-javascript-… Could see your site being really useful as a linting/ci tool. Is that where you're planning on taking it?
mtmail · 2019-12-30
When I type the same question into a web search engine I get multiple pages of answers. E.g. https://adamj.eu/tech/2019/03/21/where-to-learn-django-in-2019/ Don't wait for the perfect tutorial, start reading/learning.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close