Artificial intelligence, specifically generative AI powered by large language models (LLMs), has the potential to disrupt the livelihoods of many coders. However, experts argue that AI won’t immediately replace human programmers.

Tanishq Mathew Abraham, a Ph.D. candidate in biomedical engineering at the University of California, Davis and the CEO of MedARC, a medical AI research center, warns that individuals should be concerned about AI users replacing them. In light of this, here are some tips and techniques for software developers to survive and thrive in a generative AI world.

Stick to the Basics and Best Practices

While AI-based coding assistants can aid with code completion and generation, the fundamental principles of programming remain crucial. These include the ability to comprehend and reason about code, both your own and that of others, as well as understanding how your code fits into a larger system.

Priyan Vaithilingam, a Ph.D. student specializing in human-computer interaction and programming languages at Harvard University, emphasizes that software engineering encompasses more than just code generation. Eliciting user requirements, debugging, testing, and other aspects are essential and go beyond what AI can currently offer. Problem-solving skills, in particular, remain a highly valued expertise for human coders.

Additionally, good software engineering practices hold even more value now. Planning the system design and software architecture provides a context for AI-based tools to predict the required code more effectively. The responsibility of structuring code, defining abstractions, and establishing interface requirements still lies with human coders and is central to software engineering practice.

Find the Right Tool for You

Choosing the appropriate AI-based tool is crucial. Each tool has its own unique way of interaction, and integrating it into your development workflow may vary. For example, GitHub Copilot and other AI coding assistants can enhance programming by providing suggestions as you code, while ChatGPT and Google’s Bard act as conversational AI programmers, capable of answering API-related questions or generating code snippets.

The key is to experiment with different tools, familiarize yourself with their functioning, consider the quality of their outputs, and remain open to exploring other options. AI is a rapidly evolving field, so adaptability to new tools is vital.

Consider the appropriate use cases for generative AI tools. They can expedite learning new programming languages or frameworks and serve as a quicker way to initiate small projects or create prototypes.

Clear and Precise Communication Is Key

When using AI coding assistants, provide detailed explanations of your requirements and view it as an iterative process. Tanishq Mathew Abraham suggests writing a comment that describes the code you need, enabling the assistant to generate relevant suggestions.

For conversational AI programmers, framing prompts effectively is important. This is where prompt engineering comes into play. Abraham proposes a chain-of-thought prompting approach, dividing problems into smaller steps to be tackled individually. Asking the model to perform too much at once can lead to issues. Therefore, breaking down information into manageable chunks allows for better collaboration with the model.

Precision and clarity are vital in prompt engineering. Clearly state your requirements, ask for specific tasks, and follow up on the generated outputs.

Being familiar with the basic concepts of AI and machine learning, as well as understanding how large language models operate, their strengths, and weaknesses, can provide valuable context about the results. You don’t need to delve deep into these topics, but a general understanding is beneficial.

Be Critical and Aware of the Risks

Software engineers should approach the outputs of large language models critically. These models can produce inaccurate or incorrect code. It is important to check the generated code and be cautious of potential bugs. Although verifying code may add an extra step, it is often easier than writing it from scratch.

To put model outputs into perspective, consider the training data used, what was excluded, theversion of the programming language or software package, and the age of the training data. These factors can impact the results and provide additional context.

Developers should exercise caution when inputting proprietary code into these models. Some companies offer enterprise versions of AI coding assistants that respect privacy while still learning an organization’s coding patterns and style.

Copyright is another consideration, although it is less of a concern when using these tools for small or common code tasks compared to generating larger code chunks.

Security is a significant issue, as generated code may contain vulnerabilities. Following software development best practices such as code reviews and strong test pipelines can help mitigate this risk. Experienced software engineers bring an awareness of common code vulnerabilities and red flags, and these skills will become even more crucial in the future.

To thrive in a generative AI world, programmers must embrace AI as a tool and incorporate it into their workflow. They should recognize the opportunities and limitations of these tools while relying on their human coding capabilities. By striking a balance between AI and human expertise, programmers can adapt and succeed in the evolving landscape of coding.