• AlecSadler@sh.itjust.works
    link
    fedilink
    arrow-up
    112
    arrow-down
    1
    ·
    4 months ago

    In my defense, the backend contracts change so often in early development the any just made sense at first…

    …and then the delivery date was moved up and we all just had to ship it…

    …and then half of us got laid off so now there are no resources to go back and fix it…

    …rinse, wash, repeat

    • count_dongulus@lemmy.world
      link
      fedilink
      arrow-up
      22
      ·
      4 months ago

      Use the unknown type so at least someone might have enough brain cells to validate before casting because squiggles

    • bleistift2@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      18
      ·
      4 months ago

      In my defense, the backend contracts change so often in early development the any just made sense at first…

      Refactorings and changes are the prime reason to use TypeScript. You edit your data objects and get squigglies everywhere shit won’t work anymore. A godsend!

      • AlecSadler@sh.itjust.works
        link
        fedilink
        arrow-up
        10
        ·
        4 months ago

        110% agree. But…

        One job I worked at wouldn’t let us do this because it created too large of a QA impact (lol). We were only allowed to modify code in the smallest section possible so that testing could be isolated and go faster.

        At another job they mandated that TypeScript wasn’t allowed because it “slowed down development”. It was soooo laughable. The number of bugs introduced that could have been readily caught was absurd, but management never put the two pieces together.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      4 months ago

      I’d guess the lack of defined backend contracts is caused by the same issue that made you unable to fix those any later.

      Anyway, the frontend / backend split is stupid and ridiculous. It’s even worse because both sides usually include tasks that do need to be split up.