In the future, more code will be written by AI.
That AI will be trained by looking at existing code and documentation on the web.
For new libraries, APIs, functionality, etc. AI will first learn from the documentation, because there are no other examples to learn from.
Documentation and demo code contains unnecessary details and comments. It's also usually verbose and does not include many important considerations, like security, performance, logging, error handling, etc.
If that's all there is, how will the AI learn what better will look like?
It's already happening.
When I have AI generate test cases, it frequently includes comments that only make sense in the context of teaching someone how to write test code. Why else would you include the single word "Assert" in a comment above a line that asserts whether a condition is met? Is such a comment necessary when the next line starts "Assert.IsTrue("? The AI does this because that's what it "saw" in the training data. And that training data included these comments because it was an instructional example, or was included in code that copied directly from examples like that.
Maybe it doesn't matter.
Maybe AI will learn to overcome this.
Maybe it's an indication that while AI may be able to write code that appears to work, it will still require people who have a different (and broader) understanding to ensure it works well, efficiently, and does everything that's needed. Not just what you might see in a demo.
0 comments:
Post a Comment
I get a lot of comment spam :( - moderation may take a while.