• ugo@feddit.it
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    As a dev, I had to fix an O( n! ) algorithm once because the outsourced developer that wrote it had no clue about anything. This algorithm was making database queries. To an on-device database, granted, so no network requests, but jesus christ man. I questioned the sanity of the world that time, and haven’t stopped since.

    • UnderpantsWeevil@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      Oh yeah, I love people who stick SQL lookups in a For Loop. Even better, the coder who puts conditional if (but no then/else) clauses around a dozen raw text execution commands that fire in sequence. So you’re making six distinct lookups per iteration rather than answering your question in a single query and referencing the results from memory.

      Internal screaming