Close

Code via chatGPT-4

A project log for Toddler's Cyberdeck

I'm building a cyberdeck for my son. He just turned 2.

joshJosh 07/16/2023 at 05:032 Comments

I don't have time to write my own code for this so I employed the help of chat GPT over the past week. I will share my complete conversation in a link when it's finish but I'm not sure anyone would want to read it completely. Here are a few tips for coding with chat GPT:

  1. Chat GPT has a limited token memory, so it's a good idea once your code gets to be a decent length to copy and paste your entire code into the chat window to refresh chat GPT's memory. Once you get code that will likely exceed the token count this won't work and you will have to just paste snippets where you want to ask questions.
  2. Ask ChatGPT less rather than more. Because it's training set is vast it will very likely give you a different method to accomplish what you're looking for. If you're not sure you like the code it gives you simply ask it if there's a different or more efficient way.
  3. If you're not sure how to hook things up, let it help you develop the architecture before you develop the code.
  4. If you know where you have everything plugged in, give it a list of the pin assignments and have it help you choose variable names if you want.
  5. Once you start developing code, use something like wokwi.com or directly run the code on hardware. You're not going to get working code the first time with a moderatly complex project.
  6. When something doesn't work on the simulator, you can simply ask chat GPT why it didn't work and usually based on the previous conversation it can tell you why without having took paste in the code again. However after going back and forth a few times and fixing your code, feel like they want to repaste all of your code again for the smaller projects to refresh the token memory.

Right now I have lights set to light up when nearly every switch position is set, so that my son gets a 1:1 cause/effect. 

I'm still fighting with ChatGPT about how to make the Simon says buttons work...

You can check out the current state of the code by going here:

https://wokwi.com/projects/370089092702920705

Here's the ChatGPT conversation. It stops as of yesterday, July 16, which hasn't solved the buttons yet, but you can get a good sense of how I'm using it to code.

https://chat.openai.com/share/f3a343bd-bc55-4c10-8a58-99d2a97e2f24

Discussions

Melissa Mosier wrote 07/27/2023 at 09:17 point

Don't underestimate the value of sharing your experience! Even if it's a lengthy conversation, there might be many fellow developers and enthusiasts eager to see how ChatGPT can be utilized effectively in coding and also check some good ChatGPT prompts to get best AI work. Your insights and tips could be immensely helpful to others looking to enhance their coding workflow with AI assistance.

  Are you sure? yes | no

Josh wrote 07/17/2023 at 12:40 point

Added the GPT conversation to the post.

  Are you sure? yes | no