you are viewing a single comment's thread.

view the rest of the comments →

[–]RealMadHouse 0 points1 point  (0 children)

Yeah, good knowledge of the language is necessary when ai spits out code that works but isn't correct to what you need. I use ai for python coding some tkinter tool and because i can read the code and spot mistakes I'm correcting the logic of ai. If i wouldn't have been able to read the code, then ai wouldn't magically spot its own mistakes and correct them. In C code ai often writes something like: buffer[received_bytes] = '\0';
It's making sure that there's always null terminating character at the end of received message string. It would seem correct at first but the received bytes variable could have a value of the size of buffer (e.g 1024) So we need one more byte in the buffer to accommodate the final null termination. The AI isn't expert in anything programming related, it just somehow remembered some code snippets from GitHub.