A picture of a car with a license plate that reads LUAAAAA.

you are viewing a single comment's thread
view the rest of the comments
[–] 39 points 6 months ago (11 children)

Me writing factorio mods.

I hate non typed languages. It should be the compiler / linter's job to check I don't read a number as an array. Not my stupid brain

  • source
  • hideshow 11 child comments
  • [–] 8 points 6 months ago (10 children)

    My main pain point with python at work. I lpke to write shitty scripts with it, but django was a mistake (the ORM opens then close connection to db with each request)

  • source
  • parent
  • hideshow 10 child comments
  • [–] 6 points 6 months ago (7 children)
  • [–] 3 points 6 months ago (3 children)

    I do, and still a pain in the ass because mypy is an afterthought of python (if your models aren't in a migration then it's an error)

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 6 months ago (2 children)

    is django a requirement? because fastapi works amazingly with mypy.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 6 months ago (1 child)

    All our codebase is django and the admin is nice, and my manager is more conservative on the stack choice for the company XD

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 6 months ago

    yeah that's fair. and migrating a codebase to being typed is a nightmare. it's worth it, but fixing all the little edge cases that you didn't know you had, or just boxing with the type checker when it freaks out, is an extremely frustrating experience.

  • source
  • parent
  • [–] 3 points 6 months ago* (1 child)

    You can set a connection pool. Or use a database proxy.

    EDIT: Oh, you are using Django for shell scripts?

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 6 months ago

    Yeah, but the python runtime still needs to open sockets. We have some kafka listeners using the ORM and we got the bad surprise of openning too many connection because django would keep opening them without closing them

    We used it for some batch processing and to have the admin for some managing (specially for retries)

  • source
  • parent