Hacker News new | ask | show | jobs
by vokracko 1365 days ago
Please don't recommend django, its a dumpster fire in terms of code quality.

Opening random file on github: django.core.serializers.python https://github.com/django/django/blob/main/django/core/seria...

  - function name doesn't match pep8
  - name doesn't match its behavior
  - docstring is trying to explain what it does instead of proper function name, see 2
  - 60 line for cycle
    - what does d mean in for d in object_list? perhaps d as an object/instance/item? Good luck remembering that when you reach end of this for 60 lines later
    - using comments instead of functions
      - Handle M2M relations could be replaced with handle_m2m_relations(...)
      - Handle FK fields could be replaced with handle_fk_fields(...)
      - and so on ..
  - using/catching generic exceptions
  - using isinstance instead of proper polymorphism
  - **options
And I've seen way worse things inside django than this. Please don't recommend django. Please