chatgpt能替代程序员等研发工作吗(最近chatgpt真的太火了)
2023-05-16 来源:文库网
研发的工作真的会被chatgpt替代吗?熟悉互联网的小伙伴们最近一定被铺天盖地的有关chatgpt的信息霸屏了。大家一边感叹ai人工智能的强大,一边担心人工智能将会替代自己的工作。尤其像一些“Ctrl A / Ctrl C”的工作,更容易被人工智能所取代。
此时正在看文章的你是否已经联想到了正在看文章的自己??
于是我大胆谨慎的“挑战”了一下chatgpt写代码以及架构的能力,看看chatgpt具体是否能够“胜任”研发人员的工作。
研发决策
研发决策不仅包括接下来是用java还是golang,redis还是memcache这样的问题,同样包括对于自己不熟悉领域的分析。 一个实际的例子,假设现在有数据要进行etl,如果决策者不熟悉流和批的区别,可能会在搜索引擎上搜索batch vs streaming,很容易得到类似于chatgpt的回答:
Batch processing refers to a method of handling large amounts of data by dividing it into small, manageable chunks (batches) that can be processed in a specific order. The results of each batch are combined to produce the final outcome. Batch processing is typically done in offline mode and is best suited for tasks that can be run in parallel, without the need for real-time processing.
Streaming, on the other hand, refers to the continuous processing of data as it arrives in real-time. Streaming data can be thought of as a constant flow of data that needs to be processed and analyzed in near real-time. This is opposed to waiting until all data is received before processing it, as is the case in batch processing. Streaming is well suited for real-time applications, such as financial transactions, IoT data analysis, and live event analytics.
虽然描述的很全面,但没有直观印象。因此需要接着查看其他的搜索内容。整个过程可能耗时几小时。 在chatgpt中,可以接着问
code example to show difference between batch vs streaming
chatgpt直接给出了代码事例,这样非常的"show me the code"
# Batch processing example
def batch_process(data):
# Divide the data into batches
batches = [data[i:i 100] for i in range(0, len(data), 100)]
result = []
for batch in batches:
# Process each batch and store the results
processed_batch = process_batch(batch)
result.extend(processed_batch)
return result
def process_batch(batch):
# Do some processing on the batch
processed_batch = [x**2 for x in batch]
return processed_batch
# Data to process
data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# Call the batch processing function
result = batch_process(data)
print(result)
# Streaming example
def stream_process(data_stream):
result = []
for data in data_stream:
# Process each chunk of data as it arrives
processed_data = process_data(data)
result.extend(processed_data)
return result
def process_data(data):
# Do some processing on the chunk of data
processed_data = [x**2 for x in data]
return processed_data
# Data stream to process
data_stream = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# Call the streaming processing function
result = stream_process(data_stream)
print(result)
也同样给出了代码区别的解释
In the batch processing example, all data is collected and stored in a list before processing. In the streaming example, the data is processed as it arrives, without having to wait for all data to be collected.
由此可以整个决策过程变得非常快,可能会压缩至分钟级
架构
试试架构设计
问:design an architect for a CMS system
Here is a high-level architecture for a CMS system:
Front-end: The front-end of the CMS system is responsible for displaying the website's content to visitors. It is usually built using HTML, CSS, and JavaScript and interacts with the back-end through APIs.
Back-end: The back-end of the CMS system is responsible for managing the content and data of the website. It is usually built using a server-side programming language such as PHP, Python, or Ruby and communicates with the front-end through APIs.
Database: The CMS system uses a database to store the website's content and data. Popular databases for CMS systems include MySQL, PostgreSQL, and MongoDB.
Content Management System: This is the core of the CMS system and is responsible for managing the content and data of the website. It provides an interface for administrators and editors to add, modify, and delete content and data, and to manage the website's structure and organization.
API: An API is used to provide a secure and flexible way for the front-end and back-end to communicate with each other. It enables the front-end to retrieve content and data from the back-end, and vice versa.
Search Engine: A search engine is used to provide fast and efficient search capabilities to visitors. It indexes the website's content and data, and provides search results based on keywords and phrases entered by visitors.
Cache: A cache system is used to improve the performance of the CMS system by storing frequently used content and data in memory, so that it can be quickly retrieved when needed.
Load Balancer: A load balancer is used to distribute incoming traffic across multiple servers and to ensure that the CMS system remains available and responsive even under heavy load.
This is a basic architecture for a CMS system, and the specific components and their implementations can vary based on the requirements of the specific project.
再继续深入:
show the database schema about the cms system
users:
- id (primary key, auto-incrementing integer)
- username (string)
- password (hashed string)
- email (string)
- role (string, e.g. "admin", "editor", "user")
- created_at (timestamp)
- updated_at (timestamp)
pages:
- id (primary key, auto-incrementing integer)
- title (string)
- content (text)
- slug (string)
- status (string, e.g. "published", "draft")
- author_id (integer, foreign key referencing users.id)
- created_at (timestamp)
- updated_at (timestamp)
categories:
- id (primary key, auto-incrementing integer)
- name (string)
- slug (string)
- created_at (timestamp)
- updated_at (timestamp)
page_categories:
- id (primary key, auto-incrementing integer)
- page_id (integer, foreign key referencing pages.id)
- category_id (integer, foreign key referencing categories.id)
images:
- id (primary key, auto-incrementing integer)
- filename (string)
- alt (string)
- created_at (timestamp)
- updated_at (timestamp)
page_images:
- id (primary key, auto-incrementing integer)
- page_id (integer, foreign key referencing pages.id)
- image_id (integer, foreign key referencing images.id)
还特别说明了:
This is just an example of a basic database scheme for a CMS system. The specific requirements of the CMS system may require additional tables or different relationships between tables. For example, if the CMS system supports multiple languages, there could be a separate table to store the translations of pages and categories.
我还让它把yaml的数据库设计转换成sql了,也输出结果,这应该是比较简单的工作。 接着问微服务的设计:
User management microservice: handles user authentication, authorization, and profile management.
Content management microservice: handles the creation, management, and retrieval of pages, categories, and images.
Search microservice: handles searching and filtering of content.
Notification microservice: handles sending notifications to users about changes in content or their accounts.
Image management microservice: handles uploading, resizing, and storage of images.
总体可以看出,ai已经可以完成基础的架构设计,对于架构师的工作而言,也可以完成基础模型的搭建,极大的提升了效率。 特别是搜索、缓存和负载这类容易被忽略的内容,由ai在基础上继续进行设计,可以极大的减少工作量。
编码
我尝试了以下提问
example about quick sort and merge sort example about quick sort and merge sort in java example about quick sort and merge sort in golang example about quick sort and merge sort in rust
默认给出了python的回答,加入语言的定义后,给出了相对应语言的回答。至少在这类问题中,搜索引擎已经完败
尝试具体需求:
show example about: read a csv file, make first row to column name, other rows to the data, replace data of column named "abc" to 123, then save all data to excel file
拿到给出的代码去运行,发现依赖库有问题,又问
show package.json of this example
给出的是比较老的版本,运行没问题了
总体来说已经能够完全实现简单需求,但是结果不一定准确,需要仔细考虑下怎么描述需求。 如果能够进一步提升,在一些比较简单独立的模块上,“技术产品经理”这个职位完全可以替代过去的技术 产品的组合了
其他
注意要分辨结果内容,在尝试一个问题的时候,遇到了错误。 当问及如何在mysql中生成连续数字,回答是可以使用GENERATE_SERIES函数
You can use the GENERATE_SERIES function, which is available in MySQL 8.0 and later versions.
继续问他关于GENERATE_SERIES
show the url for GENERATE_SERIES in mysql8
给出了这样一个链接
https://dev.mysql.com/doc/refman/8.https://imgs.wenkuwang.org/upload/0/en/mathematical-functions.html#function_generate-series 但这个链接中并没有GENERATE_SERIES的内容,于是告诉它内容是不存在的 chatgpt承认了错误并给出了其他解决方案
I apologize for the incorrect URL. The GENERATE_SERIES function is not a built-in function in MySQL 8.0. To achieve the same functionality, you can use a recursive common table expression (CTE) or create a temporary table with a sequence of numbers and join it with your data table
一板一眼的骗人,如果不熟悉的人很容易被骗,所有的结果一定要自己试一下才行。
总体
在日常使用的大概1个月时间里,感觉chatgpt在写代码这件事上,就好像一个强大但非常粗心的程序员。如果能够发现他的错误,就只剩下强大了。
在很多领域,chatgpt所表现出来的能力,已经可以替代过去的流程,比如简单架构设计、数据库设计、工具类脚本、简单算法、新技术学习,甚至在线面试等。 不能完整替代的部分,至少也能搭个简单的脚手架,例如在csv转换excel的实例中,不熟悉三方库的人需要先找可用的三方库,还要找实例代码并转换为自己需要的内容,这个过程至少也需要1-2个小时,在chatgpt中可以缩短为1分钟内,而且有代码运行问题可以直接进行提问,只要方向是对的,ai对这类问题总能给出比较满意的回答。 chatgpt能够支持中文,但是对英文的支持似乎更好一些。
对开发者而言,ai暂时还不能完全替代人工,但是虽然流程的变更,可能会逐步引发一些变化。 只要合理使用,ai可以让新技术的壁垒降低。过去我们学习数据库设计,要先理解字段定义,数据库123范式等等。通过ai,虽然还是需要学习这个过程,通过现成的示例,速度可以极快的提升 学习一个新的语言,过去可能会被某个不熟悉的语法卡住,现在符合需求的示例直接展示在面前,可能会少走很多弯路。

此时正在看文章的你是否已经联想到了正在看文章的自己??
于是我大胆谨慎的“挑战”了一下chatgpt写代码以及架构的能力,看看chatgpt具体是否能够“胜任”研发人员的工作。
研发决策
研发决策不仅包括接下来是用java还是golang,redis还是memcache这样的问题,同样包括对于自己不熟悉领域的分析。 一个实际的例子,假设现在有数据要进行etl,如果决策者不熟悉流和批的区别,可能会在搜索引擎上搜索batch vs streaming,很容易得到类似于chatgpt的回答:
Batch processing refers to a method of handling large amounts of data by dividing it into small, manageable chunks (batches) that can be processed in a specific order. The results of each batch are combined to produce the final outcome. Batch processing is typically done in offline mode and is best suited for tasks that can be run in parallel, without the need for real-time processing.
Streaming, on the other hand, refers to the continuous processing of data as it arrives in real-time. Streaming data can be thought of as a constant flow of data that needs to be processed and analyzed in near real-time. This is opposed to waiting until all data is received before processing it, as is the case in batch processing. Streaming is well suited for real-time applications, such as financial transactions, IoT data analysis, and live event analytics.
虽然描述的很全面,但没有直观印象。因此需要接着查看其他的搜索内容。整个过程可能耗时几小时。 在chatgpt中,可以接着问
code example to show difference between batch vs streaming
chatgpt直接给出了代码事例,这样非常的"show me the code"
# Batch processing example
def batch_process(data):
# Divide the data into batches
batches = [data[i:i 100] for i in range(0, len(data), 100)]
result = []
for batch in batches:
# Process each batch and store the results
processed_batch = process_batch(batch)
result.extend(processed_batch)
return result
def process_batch(batch):
# Do some processing on the batch
processed_batch = [x**2 for x in batch]
return processed_batch
# Data to process
data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# Call the batch processing function
result = batch_process(data)
print(result)
# Streaming example
def stream_process(data_stream):
result = []
for data in data_stream:
# Process each chunk of data as it arrives

processed_data = process_data(data)
result.extend(processed_data)
return result
def process_data(data):
# Do some processing on the chunk of data
processed_data = [x**2 for x in data]
return processed_data
# Data stream to process
data_stream = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# Call the streaming processing function
result = stream_process(data_stream)
print(result)
也同样给出了代码区别的解释
In the batch processing example, all data is collected and stored in a list before processing. In the streaming example, the data is processed as it arrives, without having to wait for all data to be collected.
由此可以整个决策过程变得非常快,可能会压缩至分钟级
架构
试试架构设计
问:design an architect for a CMS system
Here is a high-level architecture for a CMS system:
Front-end: The front-end of the CMS system is responsible for displaying the website's content to visitors. It is usually built using HTML, CSS, and JavaScript and interacts with the back-end through APIs.
Back-end: The back-end of the CMS system is responsible for managing the content and data of the website. It is usually built using a server-side programming language such as PHP, Python, or Ruby and communicates with the front-end through APIs.
Database: The CMS system uses a database to store the website's content and data. Popular databases for CMS systems include MySQL, PostgreSQL, and MongoDB.
Content Management System: This is the core of the CMS system and is responsible for managing the content and data of the website. It provides an interface for administrators and editors to add, modify, and delete content and data, and to manage the website's structure and organization.
API: An API is used to provide a secure and flexible way for the front-end and back-end to communicate with each other. It enables the front-end to retrieve content and data from the back-end, and vice versa.
Search Engine: A search engine is used to provide fast and efficient search capabilities to visitors. It indexes the website's content and data, and provides search results based on keywords and phrases entered by visitors.
Cache: A cache system is used to improve the performance of the CMS system by storing frequently used content and data in memory, so that it can be quickly retrieved when needed.
Load Balancer: A load balancer is used to distribute incoming traffic across multiple servers and to ensure that the CMS system remains available and responsive even under heavy load.
This is a basic architecture for a CMS system, and the specific components and their implementations can vary based on the requirements of the specific project.
再继续深入:
show the database schema about the cms system
users:
- id (primary key, auto-incrementing integer)
- username (string)

- password (hashed string)
- email (string)
- role (string, e.g. "admin", "editor", "user")
- created_at (timestamp)
- updated_at (timestamp)
pages:
- id (primary key, auto-incrementing integer)
- title (string)
- content (text)
- slug (string)
- status (string, e.g. "published", "draft")
- author_id (integer, foreign key referencing users.id)
- created_at (timestamp)
- updated_at (timestamp)
categories:
- id (primary key, auto-incrementing integer)
- name (string)
- slug (string)
- created_at (timestamp)
- updated_at (timestamp)
page_categories:
- id (primary key, auto-incrementing integer)
- page_id (integer, foreign key referencing pages.id)
- category_id (integer, foreign key referencing categories.id)
images:
- id (primary key, auto-incrementing integer)
- filename (string)
- alt (string)
- created_at (timestamp)
- updated_at (timestamp)
page_images:
- id (primary key, auto-incrementing integer)
- page_id (integer, foreign key referencing pages.id)

- image_id (integer, foreign key referencing images.id)
还特别说明了:
This is just an example of a basic database scheme for a CMS system. The specific requirements of the CMS system may require additional tables or different relationships between tables. For example, if the CMS system supports multiple languages, there could be a separate table to store the translations of pages and categories.
我还让它把yaml的数据库设计转换成sql了,也输出结果,这应该是比较简单的工作。 接着问微服务的设计:
User management microservice: handles user authentication, authorization, and profile management.
Content management microservice: handles the creation, management, and retrieval of pages, categories, and images.
Search microservice: handles searching and filtering of content.
Notification microservice: handles sending notifications to users about changes in content or their accounts.
Image management microservice: handles uploading, resizing, and storage of images.
总体可以看出,ai已经可以完成基础的架构设计,对于架构师的工作而言,也可以完成基础模型的搭建,极大的提升了效率。 特别是搜索、缓存和负载这类容易被忽略的内容,由ai在基础上继续进行设计,可以极大的减少工作量。
编码
我尝试了以下提问
example about quick sort and merge sort example about quick sort and merge sort in java example about quick sort and merge sort in golang example about quick sort and merge sort in rust
默认给出了python的回答,加入语言的定义后,给出了相对应语言的回答。至少在这类问题中,搜索引擎已经完败
尝试具体需求:
show example about: read a csv file, make first row to column name, other rows to the data, replace data of column named "abc" to 123, then save all data to excel file
拿到给出的代码去运行,发现依赖库有问题,又问
show package.json of this example
给出的是比较老的版本,运行没问题了
总体来说已经能够完全实现简单需求,但是结果不一定准确,需要仔细考虑下怎么描述需求。 如果能够进一步提升,在一些比较简单独立的模块上,“技术产品经理”这个职位完全可以替代过去的技术 产品的组合了
其他
注意要分辨结果内容,在尝试一个问题的时候,遇到了错误。 当问及如何在mysql中生成连续数字,回答是可以使用GENERATE_SERIES函数
You can use the GENERATE_SERIES function, which is available in MySQL 8.0 and later versions.
继续问他关于GENERATE_SERIES
show the url for GENERATE_SERIES in mysql8
给出了这样一个链接
https://dev.mysql.com/doc/refman/8.https://imgs.wenkuwang.org/upload/0/en/mathematical-functions.html#function_generate-series 但这个链接中并没有GENERATE_SERIES的内容,于是告诉它内容是不存在的 chatgpt承认了错误并给出了其他解决方案
I apologize for the incorrect URL. The GENERATE_SERIES function is not a built-in function in MySQL 8.0. To achieve the same functionality, you can use a recursive common table expression (CTE) or create a temporary table with a sequence of numbers and join it with your data table
一板一眼的骗人,如果不熟悉的人很容易被骗,所有的结果一定要自己试一下才行。
总体
在日常使用的大概1个月时间里,感觉chatgpt在写代码这件事上,就好像一个强大但非常粗心的程序员。如果能够发现他的错误,就只剩下强大了。
在很多领域,chatgpt所表现出来的能力,已经可以替代过去的流程,比如简单架构设计、数据库设计、工具类脚本、简单算法、新技术学习,甚至在线面试等。 不能完整替代的部分,至少也能搭个简单的脚手架,例如在csv转换excel的实例中,不熟悉三方库的人需要先找可用的三方库,还要找实例代码并转换为自己需要的内容,这个过程至少也需要1-2个小时,在chatgpt中可以缩短为1分钟内,而且有代码运行问题可以直接进行提问,只要方向是对的,ai对这类问题总能给出比较满意的回答。 chatgpt能够支持中文,但是对英文的支持似乎更好一些。
对开发者而言,ai暂时还不能完全替代人工,但是虽然流程的变更,可能会逐步引发一些变化。 只要合理使用,ai可以让新技术的壁垒降低。过去我们学习数据库设计,要先理解字段定义,数据库123范式等等。通过ai,虽然还是需要学习这个过程,通过现成的示例,速度可以极快的提升 学习一个新的语言,过去可能会被某个不熟悉的语法卡住,现在符合需求的示例直接展示在面前,可能会少走很多弯路。
