How to be a successful coder in the ChatGPT world

How to be a successful coder in the ChatGPT world

Artificial intelligence, and especially generative AI based on large language models (LLM), can turn the lives of many coders upside down. But some experts say AI won’t replace human programmers…at least not right away.

“You have to worry about people using AI that replaces you,” says Tanishk Matthew Abraham, a doctoral student in biomedical engineering at the University of California and CEO of MedARC Medical AI Research Center.

How can software developers become more useful and relevant in the coming era of LLM-based coding? We’ll offer tips and techniques for coders to survive and thrive in the world of generative AI.

Follow the basics and guidelines

While many AI coding assistants help with auto-completion and code generation, the fundamentals of programming remain the same: the ability to read and think about your own and other people’s code, understanding how the code you write fits into a larger system.

“I believe that AI can significantly improve the productivity of software developers, but software development is much more than just generating code, it’s also about identifying user requirements, debugging, testing, and more,” says graduate student Priyan Whitehillingam, who works at intersection in human-computer interaction and programming languages ​​at the John A. Paulson School of Engineering and Applied Sciences at Harvard University.

One of the most indispensable skills of a programmer, as before, remains the domain of live coders — it is problem solving. Analyzing a task and finding an elegant solution is still a highly valued coder skill.

“There’s a creativity aspect to it, and a lot of those problem-solving skills are more important than languages ​​or tools,” says Python Software Foundation Fellow, Explosion co-founder and CEO Ines Montani. Explosion is a developer tools company for AI and natural language processing. “Don’t fall into the trap of comparing yourself to an AI that is more or less the statistical output of a large model. There’s a difference between what developers do and what a model produces—a developer isn’t just writing random lines of code.”

In addition, good software development practices are even more valuable today than ever before. Such practices include planning system structure and software architecture, which serve as good context for AI tools to more effectively predict what code you’ll need next.

“It’s the live coder that still has to define the structure of the code, the necessary abstractions around it for ordering, as well as the various interfaces,” says Armando Solar-Lezama, deputy director and COO of MIT’s Computer Science and Artificial Intelligence Laboratory. “All of this is very important to the practice of software development, and these aspects will be with us for a long time to come.”

Find the tool that fits your needs

Choosing the right tool with AI in mind is critical. Each tool has its own ways of interacting, and different ways of implementing each tool into the development workflow—automating the creation of unit tests, generating test data, or writing documentation.

For example, GitHub Copilot and other AI coding assistants can complement programming by offering hints as you write code. ChatGPT and Google Bard, on the other hand, behave more like conversational AI programmers and can be used to answer questions about APIs (application programming interfaces) or to generate code snippets. On the other hand, Google’s ChatGPT and Bard can act as conversational AI programmers that can be used to answer API questions to generate code snippets.

The difficulty is that you need to experiment. Play with AI tools, understand how they work, take into account the quality of the results of their work, but also do not forget about the capabilities of other tools. “AI is a rapidly developing field. You can’t just stop at one tool and use it for the rest of your life, you need to quickly adapt to new ones,” says Abraham.

It is also worth thinking about the relevant usage scenarios. Generative AI tools can help quickly learn new programming languages ​​or frameworks, and speed up the creation of small projects and prototypes.

The most important thing is clear and specific conversations

When using AI assistants in coding, be specific about what you need and treat the conversation as an iterative process. Abraham suggests writing a comment that explains the code you need so that the assistant can generate appropriate suggestions for your requirements.

When working with AI programmers, you need to find the best way to shape prompts. Industrial engineering comes to our aid here.

Abraham suggests using prompts in the form of a chain of reasoning. This technique is a divide-and-conquer strategy where you break the task into several steps and implement each one to solve the whole task. “If you ask the model to do too much at once, it can lead to disaster. You need it to be able to work with chunks of information and create chunks of code.”

Instead of asking an AI programmer to write an entire program from scratch, think about the different tasks that the program should perform. Break these tasks into smaller parts and ask the model to write specific functions for each. You may need to think with the model about the steps that are required to complete the task, leading to a two-way discussion.

“Treat her almost like a smart intern who knows a lot about the subject but isn’t particularly experienced,” Abraham says.

Accuracy and clarity are vital in industrial engineering. “You have to be very specific about what you want from the model, be very specific and make sure she understands.”

It can also be valuable to learn the basic concepts of artificial intelligence and machine learning, and to gain insight into how large language models work and understand their strengths and weaknesses. You don’t have to go deep, but general knowledge can give you important context for the results.

Abraham recommends starting with the OpenAI Cookbook, which has sections on prompting libraries and tools, tutorials and video tutorials on prompting, and Whitehilling recommends reading the Illustrated Transformer to learn more about machine learning models and basics.

Be critical and aware of the risks

Software developers should be critical of the results of language models, as they are prone to


and generating inaccurate or incorrect code. “When blindly using generated AI code, it’s easy to fall into the trap of endless debugging, and hidden bugs can be hard to find,” says Whitehillingham.

Therefore, checking the generated code is necessary, but it adds an extra step that can hurt more than help performance. But Abraham says that “in some cases, it’s easier to test code than to write it from scratch, so it’s faster to generate and test it and then build the code into your codebase.”

It might be worth taking a broader look at these models and answering the following questions: What data was this model trained on? What is filtered out and not included in this data? How old is the training data, what version of programming language, software package or library was the model trained with? The answers to these questions can influence the results and provide more context about them.

Developers should also be aware that these models implement proprietary code. Some companies, such as Tabnine, sell enterprise versions of their AI programming assistants, providing privacy while learning the organization’s coding patterns and styles.

Another factor to consider is copyright, but this is less of an issue if you’re using intelligent tools to complete a few lines of code or perform common or trivial tasks rather than creating large chunks of code.

“Programmers need to understand how original they want to be, and how unique it is to their context,” Solar-Lezama muses. If a model produces a fairly original piece of code, it’s important to be suspicious and skeptical before putting it into the production codebase.

An even more important concern is security, because such models can generate code with vulnerabilities. According to Whitehillingham, software development practices such as code review and robust test pipelines will help protect against this risk.

“One of the attributes of experienced software developers is to be aware of most of the common vulnerabilities in the code and the options for how the code can become vulnerable,” says Solar-Lezama. “They develop an intuition about what is worth paying attention to and what are “red flags”. In the future, these techniques will become the most important part of the toolkit of software developers.”

For programmers to survive in the world of generative AI, they need to embrace AI as a tool and build it into their workflows, while being aware of the tools’ capabilities and limitations. And to be successful, they need to rely on their coding skills.

Related posts