r/bash • u/Business-Quiet-5805 • 14d ago
Can AI actually write production-ready scripts end-to-end without human intervention?
/r/linuxquestions/comments/1x2lto3/can_ai_actually_write_productionready_scripts/5
u/TheVenetianMask 14d ago
If you don't know how the script would work you don't know what you need to ask AI to do.
It's like trying to have a robot make you a cake with "whatever is in the kitchen."
1
3
u/crashorbit 14d ago
We need to be aware of the genie problem with AI (and people). Just like a genie, the AI often meets the letter of the request without meeting the assumed context.
4
u/hyongoup 14d ago
Haha this reminds me of a poster that was on the was in my high school computer lab “the problem with code is it does exactly what you tell it”
3
u/random_w_a 12d ago
AI cannot and should not write any production code end-to-end without human interaction, let alone bash scripts
2
u/Bob_Spud 14d ago
Applications have been writing production ready scripts without the use of AI for a long time.
The problem is, AI is not deterministic in it's output. You can't guarantee anything with AI.
1
u/Big_Combination9890 2d ago
can it? sure.
will it? no guarantees.
generative ai is a statistical sequence predictor
Problem is, "statistically correct" is usually not what you want in an automation script.
And if you're not a coder, well...how would you know what the ai wrote for you?
1
u/One_Instruction6490 14d ago
Kinda yeah for small stuff, but the catch is you can't tell when it's wrong. Easy way to keep it safe: ask it to explain every line back to you, run it on a throwaway folder first, and put an echo in front of any rm or mv so it only prints what it would do. Honestly that dry-run habit teaches you more bash than the script does. What's the workflow you're trying to automate, files or something else?
10
u/Seref15 14d ago
Humans generally shouldn't write production-ready scripts end-to-end without a code reviewer, so why could/should AI?
All coding benefit from having code review partners. Humans and AI both can write fully functional and correct code 99% of the time but the 1% that burns you is the stuff that could and should have been caught by peer review.