r/C_Programming • u/SimoneMicu • Jul 09 '26
Question LLM for C programming
What are your opinion about using of automatic programming/vibe coding with AI agents?
I had up and down experience, I know dwarf star is fully coded by AI under orchestration of antirez, creator of Redis.
Do you not use at all? Just for refining? Creating barebone of tests? Developing with human in the loop or directly fully inspired giving direction?
0
Upvotes
5
u/LongRangeSavage Jul 09 '26
If you don’t know the language syntax, can easily read and understand someone else’s code, the languages best practices, and how to properly debug, stay as far away from vibe coding as you can. Learn the language, and how to properly code and debug first.
10
u/AndrewBorg1126 Jul 09 '26
"Vibe coding" is a stupid waste of time if you care about the quality of the result.
4
u/23-centimetre-nails Jul 09 '26
I would never trust a large language model to write anything in C. I barely even trust most people to do so. C is a very unsafe language, and it's really easy to make insidious mistakes unless you hold yourself to a much higher standard than you would with most languages — which LLMs decidedly do not meet.
9
u/pfp-disciple Jul 09 '26
IMO, AI can be a good assistive technology, especially for analysis in conjunction with proven tools. For instance, I ran Coverity on a large body of code (1700+ LOC), and found several errors and bugs. Then I used AI to review the code, and found several more. The AI had more false positives, but what it legitimately found would've been very hard to find through testing and manual review.
For code generation, I think AI is generally only mature enough to use in small portions at a time, and should be carefully reviewed by an experience developer v
1
u/SimoneMicu Jul 11 '26
one file of ds4 for example.
I don't think this is a non valid implementation for example.
With respect, if instruction on code quality and test are provided by a good C programmer like antirez (creator of redis) I guess the quality code is enough to consider it superior to your decalred standard .
This example show how necer is a lie, always is never told about generated code quality.
3
u/non-existing-person Jul 09 '26
The only thing it's good for is finding shit in documentation and possibly generating example use of some obscure library that has crappy documentation (I'm looking at you glib).
2
u/DDDDarky Jul 09 '26
Apart from the strongly negative effects on cognitive abilities of people using it, you know how in many cases you can get a good high quality product, but also a really cheap shit from some weird online stores that remotely tries to resemble it and works on a prayer?
2
u/chibuku_chauya Jul 10 '26
I found it very useful for understanding LLVM documentation because LLVM has atrocious documentation, of there’s any at all. I don’t use it to code, though.
3
u/kadal_raasa Jul 09 '26
I use it understand existing code, give me ideas and review the code I write. I don't trust auto generated AI code yet. I always prefer to do my own implementation.
1
u/pjl1967 Jul 09 '26
As I wrote about, I used an LLM to help greatly with understanding how to use a 3rd party library (specifically, libclang):
And: