Tawfiq Hussein Farid’s Post

Got a bug in your code? Still prompting AI with just “Fix this code”? That won’t give you the best results. To get accurate and production-ready solutions, you need smarter prompts. Here are 5 proven prompting techniques tailored for your tech stack: 1️⃣ Clearly mention your stack & environment Start with something like: “I am using Java 17, Spring Boot 3, Angular 16, MySQL/PostgreSQL.” This ensures AI gives version-specific and relevant solutions. 2️⃣ Share the exact error message Instead of saying “API not working” or “query failing,” paste the exact exception or error (e.g., HTTP 500, SQL syntax error, CORS issue). 3️⃣ Provide only the relevant code Share only the Controller/Service/Repository (Spring Boot) or Component/Service (Angular) where the issue exists. Avoid dumping the entire project. 4️⃣ Explain what you already tried For example: “I already checked DB connection, validated DTO, and tested API in Postman, but still getting error.” This helps AI skip basic suggestions. 5️⃣ Ask for both fix & explanation Always add: “Explain why this issue happened and how your solution fixes it.” This will level up your backend & frontend debugging skills. 💡 Example of a perfect prompt: “I am working on a Spring Boot REST API with Angular frontend. Getting a ‘500 Internal Server Error’ when calling an endpoint. Using PostgreSQL as database. Already checked entity mapping and repository query. Here is my controller and service code: [Insert Code]. Please fix this and explain the root cause.” 🚀 Smarter prompts = Faster debugging = Better developer #Java #SpringBoot #Angular #MySQL #PostgreSQL #BackendDevelopment #FrontendDevelopment #Debugging #AI #SoftwareDevelopment

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories