Live data from Hacker News

Viewing profile — Suor

Suor

HN member
Joined
Wed, Oct 26, 2011, 9:44 AM UTC
HN karma
614
Public activity
65 items

About Suor

No profile information was provided.

Recent public activity

  1. comment
    Comment #35327202

    Writing things directly is tightly coupling code. Sometimes quite distant portions of it, i.e. database access and presentation logic. With ORM and some smarter lazy technics or in…

  2. comment
    Comment #35325130

    Never used this, but I see that it provides a context manager/decorator, which you can use to "shield" any code. And also some shortcuts for DjangoREST or something. Regarding extr…

  3. comment
    Comment #35325105

    cacheops is more of a general purpose ORM caching with automatic invalidation.

  4. comment
    Comment #35322678

    For that fetching in chunks is usually a way to go. I use something of these usually https://handy.readthedocs.io/en/latest/db.html#queryset_iter...

  5. comment
    Comment #35322580

    GraphQL makes it even more fun :)

  6. comment
    Comment #35321704

    I usually use `.values()` and `.values_list()` only when model creation is really slow. Usually many rows fetched.

  7. comment
    Comment #35321555

    Actually there is such thing already https://pypi.org/project/django-auto-prefetch/ Not a monkey patch though, so will only work on the models you inherit from this.

  8. comment
    Comment #35321537

    Here is an example of such thing https://github.com/Suor/django-cacheops/blob/8b3a79de29b2545...

  9. comment
    Comment #35321523

    Should be easy enough to implement. You only need a context manager that adds 1 to some threadlocal flag on enter and subrracts on exit then check this flag in the monkey patch. No…

  10. comment
    Comment #35321476

    cacheops can do the same, but it never came to my mind to actually go this way. I would rather write some special code to fetch with `id__in=[...]` and then cache individually.

  11. story
  12. story
  13. comment
    Comment #35314339

    HN keeps automatically replacing the URL. It used to be a redirect before, but not anymore

  14. story
  15. comment
  16. story
  17. story
  18. story
  19. story
  20. story
  21. story
  22. story
  23. comment
    Comment #9168483

    Using framework has its cost, so you can be better of if you understand clearly what you are doing. OTOH, framework brings structure so it's less probable you skrew up your design.…

  24. comment
    Comment #9168473

    There are sure some things I haven't covered. The major one is components, which make a big deal in factor, reuse and composition. But the post started to be too long and loosing p…

  25. comment
    Comment #9166077

    I've already emailed there, won't make a difference probably anyway. I hate this HN tricky rating, one my post got dumped from top 5 cause there were too many comments! Reddit kind…