• jtrek@startrek.website
    link
    fedilink
    arrow-up
    8
    ·
    2 days ago

    I kind of intensely dislike that whole… natural language wrapper thing. It adds at least one whole extra layer to maintain for no real benefit. No one non technical is going to read it. If they were some magic competent person, they could just read regular doc strings.

    • 9point6@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 days ago

      That was always the fake dream that was sold, about 15 years ago there were a lot of people writing cukes

      I never saw a single business analyst or product owner ever open even one of those text files that ostensibly primarily only existed for their benefit.

      The closest we got was copy and pasting the user story from the ticket and hammering it into the shape of the existing regexes

      Then we all woke up from the fever dream about 10 years ago and I’ve basically not seen one since.

      Tbh with this AI bubble it’s only a matter of time before someone tries it again

      • jtrek@startrek.website
        link
        fedilink
        arrow-up
        3
        ·
        2 days ago

        I had an interview a few weeks ago (one of like 3 this year) where it was revealed they still write these.

        They asked how we kept all the stuff organized at my last job. All the cucumber stuff. I said we just kept the tests next to the file they’re testing- foo.py has a sibling test_foo.py- and we didn’t find much value in adding extra layers. If you want to test the API returns 403 when you request another user’s file, you can just write like

        
        def test_403_when_requesting_other_user_file() -> None:
          response = requests.get("whatever/etc")
          assert response.status_code == 403
        

        You can be pretty to the point.

        We used docstrings to explain non-obvious things. Swagger shows the API docs in a nice webpage for anyone curious and authorized.

        He wasn’t impressed and I didn’t make it to the next round.

        • 9point6@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          2 days ago

          He wasn’t impressed and I didn’t make it to the next round.

          Poor Stockholm syndrome afflicted fool

          Breaks my heart to know people are still suffering this particular hell