←back to thread

183 points WolfOliver | 2 comments | | HN request time: 0.45s | source
Show context
kstenerud ◴[] No.45067234[source]
“If it takes longer to explain to the system all the things you want to do and all the details of what you want to do, then all you have is just programming by another name”

If it's taking you that long to direct the AI, then either you're throwing too small a problem at it, or too big a problem at it, or you're not directing its attention properly.

In a way, your prompts should feel like writing user documentation:

    Refactor all of the decode functions in decoder.rs to return the number of bytes decoded
    in addition to the decoded values they already return. While refactoring, follow these principles:

    * Use established best practices and choose the most idiomatic approaches.
    * Avoid using clone or unwrap.
    * Update the unit tests to account for the extra return values, and make sure the tests check the additional return values.

    When you're finished, run clippy and fix any issues it finds. Then run rustfmt on the crate.
replies(3): >>45067250 #>>45067334 #>>45091387 #
1. MarcelOlsz ◴[] No.45067250[source]
And then for some bizarre reason sometimes it doesn't really work, AI added a bunch of random shit, then you can feel your rage bubbling up in real-time as you have to re-prompt it.
replies(1): >>45067293 #
2. kstenerud ◴[] No.45067293[source]
I've yet to have that happen. But then again so far I've only used it for Rust, and it's hard for the AI to maintain hallucinations with such a strict compiler.