Programming has traditionally been a complex and technical skill that requires years of training and experience. However, recent advancements in AI are changing the landscape of programming, making it more accessible for non-programmers. This shift towards democratizing programming is enabling individuals across industries and backgrounds to create their own software applications, solve unique problems, and drive innovation.
ChatGPT or other similar Large Language Models have been trained on vast amounts of text data, allowing it to generate natural language responses to a wide range of programming-related queries. With its ability to understand complex programming concepts and generate code snippets on the fly, ChatGPT and similar models allow non-programmers to generate code and automate programming tasks through natural language commands, bypassing the need for extensive coding knowledge or experience.
In this post, I will simply demonstrate how to interact with ChatGPT to accomplish some simple programming tasks, which were not possible to be done by a non-programmer. Many examples have illustrated that ChatGPT can do a great job of writing very common algorithms like sorting. Here, I will let ChatGPT help me finish two tasks.
Question: As an ITAD company who sell memory, I want to you help me write some scripts to read the barcodes of the computer RAM tags.
ChatGPT:
Comments: This code uses pyzbar to decode barcodes in the image, and then loops through each barcode found and prints its type and data. Although I do not know if this code can successfully read barcodes from images, I did check that pyzbar is a library for barcode reading.
Now, let us try a more complicated task, which may not be easy to understand at the first glance. Of course, I may not able to describe it precisely in the beginning. So it may need multiple interactions.
Question: Here is my need. I have a lot of computer memory images, named with the following fields: brand, speed, ram-type, and capacity, and they are separated by "_". Can you write a python code to rename all images in a folder, and make their names follow this pattern: brand-ramtype-speed-capacity?
ChatGPT:
Comments: So it does not understand my question. It assumes the old image names follow the same naming pattern, but actually, these names do not follow any pattern. This is a challenge. But I think ChatGPT can prepare this code is very impressive. It can even save some time for a programmer by initializing some codes.
Question: Not exactly what I need. The order of brand, ram type, speed, and capacity are not fixed. I mean their order is different in the old images.
ChatGPT:
Comments: Now, it looks better, as least it starts to search each field. However, it does not understand that the field names such as ‘brand’ and ‘ramtype’ are not included in the image file name. It took me several rounds to let ChatGPT understand this issue and fix it. One of the reasons may be due to my instruction is not clear. As an average non-programmer, it is reasonable to give unclear instructions. I also give more instructions such as all brands, ramtypes, speeds and capacities should be nitilized as a list or set… I will skip to show all the steps, and the following is the finial codes, which is acceptable, I think.
Take-away messages: It may still need more time for ChatGPT to be trained to generate useful programming scripts for a non-programmer user. At this moment, it can be a good assistant for users who has some basic knowledge of coding, but not very familiar with the libraries, functions, or syntax. ChatGPT can help them to initilize the scripts as the starting point.
For instance, I have no knowledge about computer vision, how to segment a person from the background, how to generate mask, and ChatGPT can help me quickly generate such code. Of course, I do need to modify the codes for fit my needs. But it saved me a lot of time. “can you write python code to create a mask for an image by mouse click”, this simple task, the first version of the generated code works. “please write python scripts to segment people out in an image”: in the first round it leverages opencv library. Then, I asked for a more advanced one, it started to use some deep learning models such as mask RCNN model.
I also asked ChatGPT a worry from some software programmers that if programmers should worry about losing jobs due to AI products like ChatGPT. It does not think so 🙂
Question: Do you think software developer will face a big challenge since AI can code now?
ChatGPT:
While AI has made significant progress in areas such as natural language processing, image and speech recognition, and game playing, AI is not yet capable of completely replacing human software developers.
AI is good at automating repetitive and mundane tasks such as generating code templates, formatting code, or finding patterns in large datasets. However, AI is not able to come up with new ideas, solve complex problems or understand human context, creativity and intuition that are required for developing complex software systems.
Software development is not just about writing code, it involves design, architecture, testing, and collaboration with other team members. All these tasks require a deep understanding of software engineering principles and methodologies, which are difficult to automate with AI.
Furthermore, AI systems still require significant human intervention and guidance to ensure they are correctly configured and used appropriately. In fact, AI can assist and enhance human software developers' productivity, rather than replacing them altogether.
In summary, while AI can provide significant benefits to the software development process, it is not yet capable of completely replacing human software developers. Human software developers will still play a critical role in developing and maintaining software systems, and their creativity, intuition, and problem-solving skills will continue to be essential.