Fascinating: AI Generated Code
If you’re in marketing or technology, Artificial Intelligence has clearly won the “Topic of the Year” award and we’re not even through the month of May. Anyone who’s explored AI knows it’s an amazing tool that can be leveraged to expedite tasks while often educating the user. Code generation tools like Github’s Copilot and Amazon's CodeWhisperer have arrived, promising to revolutionize how developers do their job. Our team at Alloy Digital is currently experimenting with code generators and we’ve got some interesting insights to share from Darron Jennings, Tech Lead, and Sean Walsh, Director of UX.
On Development and Testing with AI:
AI writes code at a remarkable speed, so it’s difficult for developers to test the amount of code and variations being produced at the rate and quantity that they’re being generated. Darron highlights an intriguing shift in concerns from development to testing when utilizing AI. He poses the question as to whether developers can actually trust AI to effectively test the code it’s writing. Will the tests be reliable? Should developers test on the test? This presents an interesting challenge, as testing is a crucial and time-consuming aspect of software development. The final product's stability and quality are directly related to thorough testing.
Additionally, Darron considers the benefits of pitting Github Copilot against Amazon's CodeWhisperer in order to explore coding capabilities side-by-side. In comparing their outputs, developers can gain insights into the strengths and weaknesses of each tool, allowing them to make informed decisions based on specific project requirements. It's worth noting that Darron has experienced each tool excelling in different aspects of code writing, which further emphasizes the need for a comprehensive evaluation and you guessed it, tests!
Sean dove deep into the AI code-generating pool and found that it's definitely an involved iterative process, much like traditional development. And while AI can assist in generating a workable React Native app or help overcome roadblocks, it still has limitations. Developers must possess code knowledge and understand what they're doing in order to feed the AI a useful prompt to generate meaningful output. AI tools serve as valuable aids, but it’s clear they cannot replace the expertise and experience of humans.
Pros of AI in Code Generation:
Based on Sean's exploration, AI can help you think through complex problems, offering fresh perspectives and potential solutions. It can also assist in debugging by identifying errors or locating misplaced elements within code that may elude detection such as a comma. It also excels at writing consistent code, drawing on extensive knowledge of design patterns. Tools like ChatGPT also support code analysis and refinement by providing instant feedback. It will quickly summarize a page of code, giving you insight into the results of the code, which speeds up the overall coding process.
Limitations and Considerations:
Despite the advantages, Sean points out that AI has limited understanding and cannot write overly complex code. It relies on the data it has ingested, which means it may struggle to function. More to the point Sean says “If a brand new framework is launched and the AI you are using hasn’t been fed that code, it might not be able to do anything with it.”
Wrapping Up, For Now…
Both Darron and Sean have experienced how AI-powered code generation tools have the potential to significantly impact the software development process by accelerating its speed, presenting coding options, debugging, and solving problems. However, they caution to approach the output with a balanced perspective and recognize the limitations of AI to generate complex accurate code. It’s by no means a one-and-done effort, and the developer is ultimately responsible for the quality of the coding outcome. Just as a Swiss Army knife requires expertise to use each tool effectively, AI requires expertise to utilize it to its full potential. By combining the power of AI with human expertise, we think developers can leverage the best of both worlds and enhance their productivity and efficiency in the ever-evolving landscape of software development.