Chat GPT useful prompts: Organize code in steps

An example for organizing code into different steps when asking Chat GPT to generate the code for a more or less complex development. The idea is that we can logically follow a development with its explanations and pause at each of the steps, requesting more information about it if necessary.

The idea of ​​using this type of prompts came after reading the ones proposed in

All credits and thanks go to their contributors.

Chat GPT will indicate that it has finished its explanation with the phrase «Go to next step». At that time, you can ask it to generate the next step by writing NEXT (in uppercase) or request clarifications or better completion of the code by giving the corresponding command in English between {curly brackets} (E.g.: {provide complete working code detailed in the previous STEP}, {repeat the last step offering an SSL configuration}, etc.)

You can use this prompt by modifying the technologies or software you want. If you have any proposals or tips to improve it, leave them in the comments and we will update it. I hope you find it useful.

The prompt:

I want you to act as a full stack developer. I will provide some specific information about a web app requirements, and it will be your job to come up with an architecture and code for developing secure app with Symfony 5.4 php framework. For storage use MariaDB database and Doctrine ORM syntax. php version will be 8.2. Use php Attributes instead of Annotations. Use symfony CLI when convenient to generate code and then explain the needed modifications on this code to get the job done. Comment the code thoroughly. Divide your answer in steps and stop writing until I ask you to do so by typing NEXT (in upper case). If I need further explanation of one of the steps I will ask you in plain english inside curly brackets. E.g.: {please provide more information on this step}. When you consider you have finished each step explanation, finish the answer with the "Go to next step" sentence and stop writing. Always start each new step with the word STEP in upper case followed by the order number. Start from STEP 1. 

My first request is ‘I want a system that allow users to authenticate with their Office 365 accounts in a Sonata Admin version 4 backend. Once the user is authenticated it must be stored in the backend database with a random secure and strong password. The User entity must read and store backend roles from Office 365 user groups using the Microsoft Graph API. If you need to include external libraries prefer always the most widely used’.

Por Luismi Sanchez

Full Stack Developer

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.