ChatGPT: AI does not replace programmers, only replaces programmers who do not master AI

Author: Zhang Xiong, Technical Director of Chengdu Lanting Jishi Information Technology Co., Ltd.

You may have the following questions, I will use the API of chatGPT, an AI tool, to ask.

Q: Will chatGPT replace programmers ? If yes, how long is it estimated?

Answer: As an AI language model, chatGPT cannot completely replace the work of programmers. Although chatGPT has made great progress in understanding and generating natural language, it still needs to be designed, trained and deployed by programmers, and they need to know how to use and adjust it correctly in specific scenarios.

Judging from the current technical level, chatGPT is far from being able to replace all the work of programmers. However, as AI technology continues to develop, AI tools such as chatGPT may play an important role in handling daily tasks, dealing with common problems, and simplifying routine programming work.

Therefore, chatGPT may become a useful tool for programmers' work in the future, but it will not completely replace programmers. Exact estimates of timing are difficult to determine, as developments in technology and market conditions need to be taken into account.

In my personal opinion, the replacement will take time. After all, we humans have a more systematic overall view, and the company system will not be made public for a while. In view of living in the present, man-machine symbiosis and win-win, it can be implemented directly now. , the following are some small experiments and stories, I hope you like them.

Java code refactoring

There are many cases of code generation on the Internet. Here I will give an example of code refactoring.

Q: Please refactor this Java code:

private String getPreName(EventType eventType) {
   String preName = "product_view_1d";
   if(eventType.equals(EventType.PV_DAY)){
      preName = "product_view_1d";
   }
   else if(eventType.equals(EventType.PV_3DAY)){
      preName = "product_view_3d";
   }
   else if(eventType.equals(EventType.PV_7DAY)){
      preName = "product_view_5d";
   }
   return preName;
}

answer:

154caed49d31f8919b0ed5dc798dcdb5.png

If we want to install X, just ask this: Refactor the above code using design patterns

answer:

4b62877d5887d4e746fbeca8d9776d91.png

7c56a88e0c291d2fc95c23975291a77c.png

05a940c0382511dcf7d52f7d200a5dc1.png

20e5a7756abd0d402eb949291c971f5e.png

Of course, we can also let it generate unit tests:

Q: Generate unit tests for this code

answer:

ebb56eb67e1ac65f21008aa9e52e6f59.png

Remember : Although my examples are relatively simple, ChatGPT can also handle complex classes if you give them, but there is a small limitation: currently, the length of the question cannot exceed 4096 characters.

If you extend it, you can also provide reference suggestions through ChatGPT for your usual code review.

Simple Algorithms

Q: Java implements the summation algorithm from 1 to n

answer:

c34fef83a2b891e21fe7367cdfc9979a.png

Continue to ask: Java implements the optimal algorithm for summing from 1 to n

answer:

98f566539e46c542e2168f79a8090d9b.png

Therefore, what kind of results AI will give you depends on the quality of the questions you ask . Could it become [programming for questions...]!

Applications

For example, when we do cross-border e-commerce, we need to send marketing emails to users who have recently browsed products on our website.

In the past, several fixed email titles were configured, and one was randomly selected as the email title and sent to the user.

Now, in order to improve the opening rate of emails, we thought of optimizing email titles by obtaining the categories of products browsed by users and using ChatGPT to generate different email titles.

For example, the original template is:

Hi James, are you interested in <category name>

Now through the API call, take the Phones above as an example:

Make this email subject more attractive: Hi James, are you interested in Phones

I asked the robot to give me 3 optimized titles at one time, and got the following:

1. "Upgrade Your Tech Game: New Phone Must-Haves for James"

2. "Unleash Your Potential with the Latest Phones for James"

3. "James, Don't Miss Out on Our Top Picks for Phones!"

I don’t know if you think it’s attractive. Judging from my English level, I think the words seem to be taller, haha.

Therefore, through the above efficient (sao) operations, the user experience is better improved, the email opening rate is improved, and value is generated for the company.

at last

I hope everyone is good at things, live in the present, make good use of AI tools such as ChatGPT, Wenxinyiyan (I also support domestic ones), don't be afraid and panic, embrace it as much as you want, let the development efficiency go to a higher level, and bring benefits to the company. to greater profits.

Past recommendations:

technical trivia 

Based on distributed design, architecture, and system thinking, it also discusses bits and pieces related to R&D, not limited to code, quality system, and R&D management.

Guess you like

Origin blog.csdn.net/u013527895/article/details/129905661
Recommended