This function clears the text area every 24 hours at midnight The ASCII image of the dog is centered on the page. I know! Modify the code above so that an ASCII image of a dog appears over the text fields for name and time. Looks better, but it’s still missing something. I'll spare you that code snippet as it's largely the same. Edit the code above so that the three text fields are centered on the page and there are three line breaks between the name and time fields.Īnd just like that, the changes are made. Ok, let’s drop the code it generated into my WordPress CMS just to take a peek and…by George, it works. Use JavaScript to send data from the frontend to the backend APIī. Connect to a MongoDB database to store and fetch the submitted dataĪ. Create API endpoints to handle data submission and retrievalĬ. Add JavaScript to handle form submission and send data to the backend APIīackend (Node.js with Express and a database like MongoDB)ī. Create an HTML form for user input (user's name, dog's name, and intended visit time)Ĭ. Second - write the code for this app and share it as a single code snippet.įirst, let me outline the general structure and pseudo-code for the app.Ī. First - Please explain how you would create this app using pseudo-code examples. I need front end code and a database on the backend that can store state. After users submit this information, it is displayed for anyone who visits the page. Normally, to get started, I would brush up on my paltry HTML skills and prepare a sacrifice to the JavaScript gods, but, in 2023, I can just ask an AI: I want to build a single page web app that will allow users to submit their name, their dog's name, and the time they intend to visit the local dog park. Delete: At the end of each day, the database deletes all entries so the slate is blank for the following morning.Update: I’m not even trying to get this fancy! Also, no take-backsies!.Read: Other users can see who is planning to visit and what time they’ll be there.Create: a web form where users can input the name of their dog and the time they plan to arrive at the park.After some discussion, I found that this is a basic CRUD app: The app I had in mind is fairly simple: people can list let others know when they are going to be at the local dog park. Maybe, I thought, my basic understanding of how a web app gets built will allow me to engineer the right prompts, and the AI can handle writing and debugging the actual code. But asking me to whip up a simple CRUD app is a recipe for disappointment.Īnyway, over the last month, I decided to try diving back in, inspired by a steady stream of posts I saw on social media that showed people writing natural language instructions that today’s AI assistants can transform into working code. I can have an intelligent discussion about the value of microservices vs monoliths, strongly typed languages, cloud vs on-prem, or large language models. Over my four years here, I’ve gained a pretty good understanding of software at the macro level. The grand irony of my role here at Stack Overflow is that I work to create great content for developers, but am absolutely hopeless when it comes to programming on my own.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |