Generative Coding
February 25, 2024
Overview
Generative Coding breaks new ground in the fight against information asymmetry, helping to increase productivity by providing an advanced form of autocomplete directly in your IDE.
Table of Contents
How It Works
These Generative Coding tools use the internet to send prompts to a Back-End service that has access to LLM models that were trained using actual source code from projects.
Generative Coding Tools
Below are just a few of the Generative Coding Tools that are available. You could also use tools like ChatGPT to provide working code snippets, however, it does not provide these suggestions automatically through your IDE (as of the time of this blog post).
GitHub Copilot
GitHub Copilot leverages the fact that GitHub is the largest host of source code in the world. This not only provides Copilot with a massive volume of training data to use when generating suggestions, but it also means that the examples are up-to-date with current trends.
Amazon CodeWhisperer
Amazon CodeWhisperer provides code snippets that are especially tailored for work that involves AWS services and their SDKs.
Intellicode
Intellicode integrates seamlessly with Microsoft's Visual Studio and Visual Studio Code IDEs. Intellicode's training data is not as vast as Copilot, but they do prioritize quality of code when training their models.
Benefits
Writing any code using a new language or library carries risk, because the underlying implementation details are unknown. Even if those details in that underlying layer are learned, then there's the layer below that which is unknown. And so on and so forth. The code snippets and templates that are suggested should be based off of production code that has been tested and verified to be sound. However, any vulnerabilities that exist in that code would also be suggested. This risk is real, however, it's the same risk that exists when updating any software. When you update your phone's operating system, there's always a chance that a vulnerability will actually be introduced.
These suggested code snippets can also accelerate learning by introducing new concepts and paradigms to the user.
Criticism
Some critics believe that the use of Generative Coding is unfair. They argue that a true coder should be able to write code without any help from these tools, or even from the internet altogether. These individuals are important, and they hold an important role in society. If a catastrophe such as a solar flare were to wipe out all information stored on electronic devices and data centers, then these greats would be able to help to replenish that information. Much of that information does not exist in books. Within the millennia (or longer) between such events, opting against the use of such technologies equals lost productivity with no benefit (other than socially).
Concerns about dependency on generative AI tools and their potential to promote laziness are valid. However, we must embrace these tools and build on top of them, just as we did with the internet. Calculators didn't end the need for mathematical understanding, but enhanced our ability to dive deeper and solve even more complex problems.
Conclusion
Just like the advent of the internet and search engines, developers who fail to adapt will inevitably find themselves falling behind.