How Programmers Can Survive and Thrive in the ChatGPT World

AI Basics


Artificial intelligence, especially generative AI powered by large language models (LLMs), has the potential to change the lives of many programmers. But some experts argue that AI won’t replace human programmers, at least not anytime soon.

“You have to worry about people using AI replacing you,” says Dr. Tanishuk Matthew Abraham. He is a biomedical engineering candidate at the University of California, Davis, and he is CEO of the Medical AI Research Center, MedARC.

So how can software developers become more useful and relevant in the coming era of LLM-centric coding? Here are some techniques.

Stick to the basics and best practices

Myriad AI-based coding assistants help with code completion and code generation, but the ability to read and reason about your own and others’ code, understanding how the code you write fits into a larger system The basics of programming still remain.

“We believe that AI can dramatically improve the productivity of software developers, but software engineering involves more than just generating code; It’s included,” says PhD Priyan Vaitilingam. A student at the John A. Paulson School of Engineering and Applied Sciences at Harvard University who works at the intersection of human-computer interaction and programming languages.

One of the most essential programming skills remains the realm of human programmers: problem solving. Analyzing a problem and finding an elegant solution to it is still highly valued coding expertise.

“There’s a creative side to it, and a lot of the skills you have with how you approach a problem are more important than the actual language or tools,” says Python Software Foundation Fellow and co-founder and CEO of software company Explosion. says one Ines Montani. He specializes in developer tools for AI and natural language processing. “Don’t fall into the trap of comparing yourself to AI. AI is more or less the statistical output of a large model. There is a difference between what developers do and what models output. Becoming is more than just writing arbitrary lines of code.”

Moreover, good software engineering practices are proving more valuable than ever before. These practices include system design and software architecture planning. They serve as the right context for AI-based tools to better predict what code you need next.

“It is still the human programmer who needs to understand the structure of the code, the appropriate abstractions to organize it, and the requirements of the various interfaces,” said Armando Solar-Lezama, Associate Director and COO. I’m here. He is in the Computer He Sciences and Artificial Intelligence Laboratory at MIT, where he leads the Computer Aided Programming group. “These are all core software engineering practices, and they aren’t going away anytime soon.”

Find the tool that fits your needs

Finding the right AI-based tools is critical. Each tool has its own way of working, and there are many ways to incorporate each tool into your development workflow, such as automating unit test creation, generating test data, or creating documentation.

For example, GitHub Copilot and other AI coding assistants can enhance your programming by providing suggestions while you’re coding. ChatGPT and Google’s Bard, on the other hand, act like a conversational AI programmer and can be used to answer questions about APIs (application programming interfaces) and generate code snippets.

The trick is to experiment. Try AI tools, get a feel for how they work, and consider the quality of their output. But keep an open mind about other tools as well. “AI is a very fast-changing field. You don’t want to settle for one tool and stick with it for the rest of your life, so you have to adapt to new tools quickly,” says Abraham.

Also think about appropriate use cases. Generative AI tools provide a quick route to learning new programming languages ​​and frameworks, and can also be a faster way to start and prototype small projects.

Clear and Accurate Conversation is Key

If you use an AI coding assistant, describe in detail what you want and treat it as an iterative process. Abraham suggests writing a comment explaining the code you need so that the assistant can generate good suggestions that meet your requirements.

As a conversational AI programmer, you need to know how best to construct your prompts. This is where prompt engineering comes into play.

One approach proposed by Abraham is to encourage thought chains. This includes the divide-and-conquer strategy, where the problem is broken down into steps and each step is addressed to solve the problem as a whole. “Demanding too much from the model at once can lead to disaster. We need to be able to manipulate manageable chunks of information and generate manageable chunks of code,” he said. say.

For example, instead of asking an AI programmer to code an entire program from scratch, consider the different tasks the program is trying to do. We divide these tasks further and ask the model to create specific functions for each. Models must be used to reason about the steps required to accomplish a task, resulting in back-and-forth conversations.

“Treat yourself like a smart intern who knows a lot about a subject but doesn’t have much experience,” says Abraham.

Accuracy and clarity are essential for rapid engineering. “You have to ask your model very clearly what you want them to do, ask them exactly what you want them to do, and make sure you follow up,” says Abraham.

It’s also beneficial to learn the basic concepts of artificial intelligence and machine learning to understand how large-scale language models work and their strengths and weaknesses. You don’t have to dig deep, but having some general knowledge provides important context for your results.

To help you get started, Abraham recommends the OpenAI Cookbook, which has sections on prompt libraries and tools, prompt guides, and video courses. Vaithilingam suggests reading Illustrated Transformer to learn more about the basics of models and machine learning.

Be critical and understand the risks

Software engineers need to be critical of the output of large language models. This is because large language models tend to hallucinate and generate incorrect or inaccurate code. “The blind use of AI-generated code can easily lead you down a debugging rabbit hole, where subtle bugs can be difficult to find,” he says.

So checking the generated code is important, but it adds an extra step that can hurt productivity rather than improve it. But Abraham said, “Sometimes it’s easier to validate code than to write it from scratch, and a quicker approach is to generate and validate code before incorporating it into your code base.” claim.

Putting the output of these models in perspective, it may be worth asking the following questions: What data was this model trained on? What was left out and not included in that data? How old is your training data, and what version of programming language, software package, or library was your model trained on? It might provide more context.

Developers should also be careful to enter their own code into these models. Some companies, such as Tabnine, offer enterprise versions of AI coding assistants that provide privacy while learning your organization’s coding patterns and styles.

Copyright is also a factor to consider, but if you use these tools to complete a few lines of code or generate code for common or simple tasks, you may want to avoid large chunks of code. It’s less of a concern than creating one.

“Programmers need to have some understanding of how original and specific to their context what they are doing,” says Solar-Lezama. “If the model is generating somewhat original code, it’s important to be skeptical and skeptical before incorporating it into a production codebase.”

An even bigger issue is security, as these models can generate code that contains vulnerabilities. According to Vaithilingam, software development best practices such as code reviews and strong test pipelines can help prevent this risk.

“One of the things that experienced software engineers bring to the table is an awareness of the most common vulnerabilities in code and the most common ways code can become vulnerable,” says Solar-Lezama. say. “They build an intuition about what to pay attention to and what triggers red flags. Moving forward, this kind of technology will become a more important part of the software engineering mix.”

For programmers to survive in a world of generative AI, they must embrace AI as a tool and incorporate it into their workflows. On the other hand, we must recognize the opportunities and limitations of these tools and still rely on human coding ability to succeed.

from an article on your site

Related articles on the web



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *