I have been using generative AI for code creation for two years now, more heavily in recent months. I have found it incredible to the point that I am doing programming at a level I would have never thought possible.
I wrote my first program as an undergraduate in 1969 using Fortran. I had just returned to Auburn University after 30 months in France as a missionary for The Church of Jesus Christ of Latter-day Saints. I had already had the introductory course in Aerospace Engineering where programming was taught, so my advisor told me I should take a course in the Chemical Engineering Department. Given that I knew very little of the subject matter from which the programming assignments, it was tough to say the least. I managed to squeak out an A, but not without many hours working on projects.
Fast forward to today: I am currently developing software as a service missionary for the Church. My task is to facilitate the translation of documents from English to 14 other languages. The work requires the processing of Word and PowerPoint documents to submit those to machine translation (Microsoft Translator) in the preparation of multicolumn documents using Word: English appears in one column and the target language in the other.
Translators are then able to review the machine translation without needing either computer-assisted translation (CAT) software or worrying about formatting. CAT tools are very powerful, but require more training and expertise than is available for our volunteer translators.
The bottom line is that I have been able to create some fairly sophisticated software in Visual Basic (VB.net). This language is closer to other programming languages I have used in the past. In addition, it provides much more complete access to the underlying content of Word and PowerPoint documents using the OpenXML library. This library provides very complete access to the the Office Open XML thatis used in Word in PowerPoint.
This combination of tools (Visual Basic, the OpenXML library. and AI tools such as OpenAI’s ChatGPT (the first system I used) and Claude from Anthropic (the system I have found even more useful than ChatGPT for several reasons) happens to be very powerful. Even so, there are problems, many of which I have to chalk up to my not using the tools in the best way possible. They can “hallucinate,” provide incorrect code, and even remove functionality that I had in my code before seeking to add other capabilities or simply improve the code (refactoring).
As I have worked for the past couple of days to return some capability to the software, inadvertenly omitted by one of the systems I use, I came up with what seems to be a great metaphor for describing generative AI (ChatGPT, Claude, etc.) for coding. It occurred to me this morning that it would be great fun to have AI assesss the quality of the metaphor.
To do this, I decided to use a research system LMSYS.org, which “originated from a multi-university collaboration involving UC Berkeley, Stanford, UCSD, CMU, and MBZUAI in 2023.”). The system provides free access to many AI systems, with the only requirement to be to provide feedback on the quality of the results received.
Here is how this exploration of the metaphor came out! (Note: Model A is from Google. I am not sure where Model B “raspberry” is from.)
My query posted on the LMSYS Chatbot Arena: Tell me how Generative AI for coding can be compared to Dr Jekyll and Mr Hyde.
Model A: raspberry
The comparison of Generative AI for coding to Dr. Jekyll and Mr. Hyde from Robert Louis Stevenson’s novella is a compelling analogy that highlights the dual nature of this technology—its potential for great benefit as well as its inherent risks.
The Dr. Jekyll Aspect: Benefits of Generative AI in Coding
Enhanced Productivity:
- Automation of Repetitive Tasks: Generative AI can automate mundane and repetitive coding tasks, allowing developers to focus on more complex and creative aspects of software development.
- Speeding Up Development: By generating boilerplate code, suggesting improvements, and even writing entire functions, Generative AI can significantly reduce the time required to develop software.
Improved Code Quality:
- Error Reduction: AI can help identify and correct coding errors, leading to more robust and reliable software.
- Best Practices: Generative AI can enforce coding standards and best practices, resulting in cleaner, more maintainable code.
Learning and Education:
- Assisting Novices: Beginners can learn from the code generated by AI, understanding patterns and best practices.
- Continuing Education: Experienced developers can stay updated with the latest coding trends and technologies by leveraging AI-generated examples.
Innovation:
- Inspiration: Generative AI can provide novel solutions and ideas that human developers might not consider, fostering innovation.
Conclusion
Generative AI for coding, much like Dr. Jekyll and Mr. Hyde, presents a dual-edged sword. When used responsibly, it can greatly enhance productivity, improve code quality, and foster innovation. However, it also poses significant risks that must be carefully managed to prevent negative outcomes.
Model B: gemini-1.5-flash-002
The analogy of Generative AI for coding being like Dr. Jekyll and Mr. Hyde is a compelling one, highlighting the dual nature of this technology. Both the fictional character and the AI reflect a powerful duality: immense potential for good juxtaposed with significant risks and unforeseen consequences.
Dr. Jekyll (the good): Benefits of Generative AI
- Increased Productivity: Just as Jekyll aimed for self-improvement and a better understanding of the human condition, Generative AI aims to improve developer productivity. It can automate repetitive tasks, generate boilerplate code, suggest improvements, and even help debug, freeing up developers to focus on more complex and creative aspects.
- Accessibility and Democratization: Jekyll’s transformation was, in a way, a quest for knowledge and understanding. Similarly, Generative AI can democratize access to coding. Individuals without extensive programming experience might use it to build basic applications or automate tasks.
- Innovation and Exploration: Jekyll’s experiments, though ultimately disastrous, were driven by a desire for knowledge. Generative AI can similarly foster innovation. It can help explore new coding paradigms and generate novel solutions to problems.
Mr. Hyde (the bad): Potential Dangers
- Security Vulnerabilities: Hyde’s violent nature mirrors the potential for Generative AI to produce insecure code. If the AI is trained on flawed or malicious data, it can generate code containing vulnerabilities or security risks.
- Lack of Transparency: Hyde’s unpredictable actions reflect the “black box” nature of some Generative AI models. It can be difficult to understand why the AI generated a particular piece of code.
- Bias and Ethical Concerns: Hyde’s inherent wickedness stems from a lack of moral compass. Similarly, Generative AI can perpetuate and amplify biases present in the training data.
- Job Displacement: Hyde’s destructive actions can be likened to the fear of job displacement among programmers. While AI can augment human capabilities, there’s concern about potential job losses.
- Over-reliance and Skill Degradation: Over-reliance on Generative AI might lead to a decline in core programming skills if developers become too dependent on it.
In conclusion, Generative AI for coding embodies a powerful duality. The key is to control the “Hyde” within the “Jekyll” – to use the technology responsibly and thoughtfully, ensuring its transformative potential benefits humanity as a whole.