Plesk veya cPanel'den geçiş yapın ve bir yıllık ücretsiz ispmanager lisansına sahip olun →

Home
Blog
ChatGPT, Ensign Data as an errand boy
17 February 2023
4 minutes
Lisa
web developer
ChatGPT, Ensign Data as an errand boy

ChatGPT, Ensign Data as an errand boy

Hi, I’m Lisa, web developer at ispmanager marketing. I’m here to share my experience with ChatGPT, the neural network that helps to write code, writes its own posts, and gives short answers to any questions.

The coolest thing about GPT is that it will remember the query context: you can add or clarify stuff without repeating what you’d said before. I wanted to know if the chat was able to create a fully functional page complete with all the markup, styles, and script rather than a single function, so I dared it to try and do it.

For starters, I asked on the chat which web development jobs GPT could help me with.

I asked GPT which web development jobs the chat could help me with, and the neural network gave me a long list of options.
I asked GPT which web development jobs the chat could help me with, and the neural network gave me a long list of options.

GPT promised to assist with website design and development from scratch, which sounded awesome. Maybe a little over-the-top awesome. Debugging, functional enhancement, API integration, optimization, SEO, and more. And the chat will tell you how to do everything right. What if some smartypants decides it’s time to lay off all web developers and replace them with a neural network? After all, the neural has no kids to feed and no mortgage loan to pay back.

I checked out the queries that article writers and video creators had tested before: there had been tasks like writing a specific function or using API to visualize the outcome on the web page. It was all perfectly sequenced with complexity levels gradually rising. Everything looked nice and smooth. I figured I would ask for the whole thing at once. I wanted a full web page with scripts and styles. It’s my make-or-break attempt to see if the neural network has what it takes to make web developers redundant. It would make a nice article or video with a clickbait title like Neural Network Makes Programmers Redundant. We’ll see about that.

Get to work, Jarvis!

Let’s make a page with an image and a video play button. With a mouse-click, the image and the button would fade away, replaced by a video that would start playing.

I articulated my query in English and gave it to my new pro bono web developer to work on, expecting my page-long website to be ready in a jiffy. As a step one, I ask my helper to create an image with a superimposed video play button.

In response to my request to generate an HTML page, I receive the markup and the styles, all packed into a single file.
In response to my request to generate an HTML page, I receive the markup and the styles, all packed into a single file.

Eventually I receive an HTML page and a stylized button. I just need to add an image file next to it or ask the neural to find a specific image for me.

I choose to find my own picture, figuring it would take too long to explain what I wanted. For now, I feel more at home with the familiar search engine than a chat network, but this may all change going forward. It is quite likely that, a couple of years from now, neural networks and voice assistants will be giving us answers more readily than the customary search bar ever could.

I copy the generated HTML code into a file, add an image next to it, and open the whole thing in my browser. Here is the outcome I’ve got.
I copy the generated HTML code into a file, add an image next to it, and open the whole thing in my browser. Here is the outcome I’ve got.

The interim result is in: I have my image, button, and basic styles, the entire code is packed into the same file. I’ll try to split the HTML, CSS and JS into separate files a little later. Now I start on the second iteration, asking the neural to make the video play on a button click.

As my second step, I ask the neural to add the video and make it start at a click. GPT adds functions to JavaScript and connects the YouTube Player API library.
As my second step, I ask the neural to add the video and make it start at a click. GPT adds functions to JavaScript and connects the YouTube Player API library.

The GPT chat goes on to tell me I should use the YouTube API library, and it supplements the code: the correct video and the JavaScript are all in place. Now all I’ve got to do is test it in action. At this point, the smartypants who had fired his web developers would get a little nervous, for the neural network does the job according to its lights, and the outcome isn’t quite what the man who gave the orders had intended.

The image is there, and so is the play button. But the video simply sits below the image, instead of getting hidden. When you click Play, the video starts playing. But this is not quite what I wanted, now is it? Now I have to explain what needs to be fixed, or I have to manually fix the code to make the job complete.

The outcome at second iteration. The video is below the image. The video starts playing when you click the button, but the image never disappears.
The outcome at second iteration. The video is below the image. The video starts playing when you click the button, but the image never disappears.

Now you get the feeling that the neural network is this Ensign Data who tries too hard and uses stackoverflow search like a pro, but is in such a rush to do the job that he never really "gets it".

I try to explain that the image has to be hidden when the video starts, but GPT does not hear me. Instead, it hides the image once the page gets loaded with JavaScript. I have to admit I got so sick of explaining things at this point that I decided it would be easier to tweak the code myself to get the result I wanted.

My face when my attempts to explain GPT what I need fail
My face when my attempts to explain GPT what I need fail

The only part remaining was to see if the neural network was able to separate HTML, CSS and JavaScript into different files. It did an excellent job of it. GPT copes eminently with clearly articulated tasks and questions, but it has to take them one action or function at a time.

GPT split the page code into three different files and explained how to bind them together.
GPT split the page code into three different files and explained how to bind them together.

Log entry

GPT can be the hands that print the code or augment it, but the developer’s brain has to be present to tweak and test the code, to articulate the task correctly and think the logic through.

The GPT chat definitely makes the grade as an assistant. But don’t expect Jarvis-level intelligence from it. This tool can slash the amount of routine operations, but it is no replacement for a human professional. In any event, these novelties really resonate with my geek nature. Let there be more of them! The dreamer in me hopes they bring us closer to a world where humans are in charge of the creative part while the machines handle the routine.

Subscribe to news
Subscribe to the ispmanager newsletter and get the best content every week