• _danny@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    8 months ago

    You absolutely can ask it for code you plan to use as long as you treat chatgpt like a beginner dev. Give it a small, very simple, self contained task and test it thoroughly.

    Also, you can write unit tests while being quite unfamiliar with the syntax. For example, you could write a unit test for a function which utilizes a switch statement, without using a switch statement to test it. There’s a whole sect of “test driven development” where this kind of development would probably work pretty well.

    I’ll agree that if you can’t test a piece of code, you have no business writing in the language in a professional capacity.